@progress/kendo-angular-diagrams 24.2.2 → 25.0.0-develop.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/fesm2022/progress-kendo-angular-diagrams.mjs +15 -15
- package/index.d.ts +806 -7
- package/package-metadata.mjs +2 -2
- package/package.json +14 -14
- package/connection-tooltip-template.directive.d.ts +0 -38
- package/diagram.component.d.ts +0 -480
- package/diagram.module.d.ts +0 -44
- package/directives.d.ts +0 -27
- package/models.d.ts +0 -208
- package/package-metadata.d.ts +0 -9
- package/shape-tooltip-template.directive.d.ts +0 -38
- package/utils.d.ts +0 -7
package/index.d.ts
CHANGED
|
@@ -2,10 +2,809 @@
|
|
|
2
2
|
* Copyright © 2026 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
|
-
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
import { ConnectionDefaultsBase, ConnectionOptionsBase, ShapeDefaultsBase, NavigationOptions, ShapeOptionsBase, DiagramEditable, DiagramLayout, Pannable, Selectable, DiagramChangeEvent, DiagramDomEvent, DiagramDragEvent, DiagramItemBoundsChangeEvent, DiagramPanEvent, DiagramSelectEvent, DiagramZoomEndEvent, DiagramZoomStartEvent, Diagram, Shape, Connection, DiagramState, Point, Connector, SelectionOptions, Rect, BringIntoViewOptions, Direction } from '@progress/kendo-diagram-common';
|
|
6
|
+
export { ArrowMarker, BringIntoViewOptions, Circle, CircleMarker, Collate, Connection, ConnectionCap, ConnectionContent, ConnectionDefaultsBase, ConnectionDefaultsEditable, ConnectionEditingPoint, ConnectionMapping, ConnectionOptionsBase, ConnectionPointsEditable, ConnectionRichTextContent, Connector, ConvertResult, Coordinate, DashType, DataInputOutput, DataStorage, Database, Decision, Delay, DiagramChangeEvent, DiagramDomEvent, DiagramDragEvent, DiagramEditable, DiagramItemBoundsChangeEvent, DiagramLayout, DiagramMapping, DiagramPanEvent, DiagramSelectEvent, DiagramState, DiagramZoomEndEvent, DiagramZoomStartEvent, DirectAccessStorage, Direction, Display, Document, EditableDefaults, Extract, Fill, FlowchartShapeType, FromPathOrFn, Group, Image, InlineImage, InternalStorage, Layout, LayoutGrid, Line, LineBreak, LogicalOr, ManualInputOutput, ManualOperation, MapSpec, MarkerType, Merge, MultiLineTextBlock, MultipleDocuments, OffPageConnector, OnPageConnector, Padding, Pannable, Paragraph, ParagraphMargin, Path, Point, Polyline, PredefinedProcess, Preparation, Process, Rect, Rectangle, Selectable, SelectionOptions, Shape, ShapeConnector, ShapeConnectorDefaults, ShapeConnectorHover, ShapeContent, ShapeDefaultsBase, ShapeDefaultsEditable, ShapeEditable, ShapeFill, ShapeFillGradient, ShapeFillGradientStop, ShapeHover, ShapeMapping, ShapeOptionsBase, ShapeRichTextContent, ShapeRotation, ShapeType, Sort, Stroke, SummingJunction, Terminator, TextBlock, TextRun, convertToDiagramModel } from '@progress/kendo-diagram-common';
|
|
7
|
+
import * as i0 from '@angular/core';
|
|
8
|
+
import { TemplateRef, AfterViewInit, OnChanges, OnDestroy, EventEmitter, ElementRef, Renderer2, NgZone, ViewContainerRef, SimpleChanges } from '@angular/core';
|
|
9
|
+
import { LicenseMessage } from '@progress/kendo-licensing';
|
|
10
|
+
import { PopupService } from '@progress/kendo-angular-popup';
|
|
11
|
+
import { Group } from '@progress/kendo-drawing';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Defines the navigation configuration options for the `Diagram`.
|
|
15
|
+
*/
|
|
16
|
+
interface DiagramNavigationOptions extends Pick<NavigationOptions, 'smallStep' | 'largeStep'> {
|
|
17
|
+
/**
|
|
18
|
+
* Controls whether navigation is enabled.
|
|
19
|
+
*/
|
|
20
|
+
enabled?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Defines the tooltip configuration for shapes and connections.
|
|
24
|
+
* Controls the visibility, content, and styling of tooltips.
|
|
25
|
+
*/
|
|
26
|
+
interface TooltipOptions {
|
|
27
|
+
/**
|
|
28
|
+
* Controls whether the tooltip displays when you hover over the item.
|
|
29
|
+
*/
|
|
30
|
+
visible?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Sets custom CSS classes for the Tooltip wrapper element. Accepts any value supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
|
|
33
|
+
*/
|
|
34
|
+
cssClass?: any;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Defines the configuration options for diagram shapes.
|
|
38
|
+
* Extends the base shape options and adds tooltip support.
|
|
39
|
+
*/
|
|
40
|
+
interface ShapeOptions extends Omit<ShapeOptionsBase, ''> {
|
|
41
|
+
/**
|
|
42
|
+
* Configures the tooltip that displays when you hover over the shape.
|
|
43
|
+
*/
|
|
44
|
+
tooltip?: TooltipOptions;
|
|
45
|
+
/**
|
|
46
|
+
* Sets the text content displayed in the tooltip.
|
|
47
|
+
*/
|
|
48
|
+
tooltipText?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Defines the configuration options for diagram connections.
|
|
52
|
+
* Extends the base connection options and adds tooltip support.
|
|
53
|
+
*/
|
|
54
|
+
interface ConnectionOptions extends Omit<ConnectionOptionsBase, ''> {
|
|
55
|
+
/**
|
|
56
|
+
* Configures the tooltip that displays when you hover over the connection.
|
|
57
|
+
*/
|
|
58
|
+
tooltip?: TooltipOptions;
|
|
59
|
+
/**
|
|
60
|
+
* Sets the text content displayed in the tooltip.
|
|
61
|
+
*/
|
|
62
|
+
tooltipText?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Defines the default configuration options for all connections in the `Diagram`.
|
|
66
|
+
* These settings apply to connections unless overridden by individual connection options.
|
|
67
|
+
*/
|
|
68
|
+
interface ConnectionDefaults extends Omit<ConnectionDefaultsBase, ''> {
|
|
69
|
+
/**
|
|
70
|
+
* Configures the default tooltip settings for all connections.
|
|
71
|
+
*/
|
|
72
|
+
tooltip?: TooltipOptions;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Defines the default configuration options for all shapes in the `Diagram`.
|
|
76
|
+
* These settings apply to shapes unless overridden by individual shape options.
|
|
77
|
+
*/
|
|
78
|
+
interface ShapeDefaults extends Omit<ShapeDefaultsBase, ''> {
|
|
79
|
+
/**
|
|
80
|
+
* Configures the default tooltip settings for all shapes.
|
|
81
|
+
*/
|
|
82
|
+
tooltip?: TooltipOptions;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Defines the field mapping configuration for shapes data binding.
|
|
86
|
+
* Maps source object properties to `Diagram` shape properties.
|
|
87
|
+
*/
|
|
88
|
+
interface ShapeModelFields {
|
|
89
|
+
/**
|
|
90
|
+
* The field that contains the unique identifier of the shape.
|
|
91
|
+
*/
|
|
92
|
+
id?: string;
|
|
93
|
+
/**
|
|
94
|
+
* The field that contains the connectors configuration.
|
|
95
|
+
*/
|
|
96
|
+
connectors?: string;
|
|
97
|
+
/**
|
|
98
|
+
* The field that contains the connector defaults configuration.
|
|
99
|
+
*/
|
|
100
|
+
connectorDefaults?: string;
|
|
101
|
+
/**
|
|
102
|
+
* The field that contains the content configuration.
|
|
103
|
+
*/
|
|
104
|
+
content?: string;
|
|
105
|
+
/**
|
|
106
|
+
* The field that contains the editable configuration.
|
|
107
|
+
*/
|
|
108
|
+
editable?: string;
|
|
109
|
+
/**
|
|
110
|
+
* The field that contains the fill configuration.
|
|
111
|
+
*/
|
|
112
|
+
fill?: string;
|
|
113
|
+
/**
|
|
114
|
+
* The field that contains the height value.
|
|
115
|
+
*/
|
|
116
|
+
height?: string;
|
|
117
|
+
/**
|
|
118
|
+
* The field that contains the hover configuration.
|
|
119
|
+
*/
|
|
120
|
+
hover?: string;
|
|
121
|
+
/**
|
|
122
|
+
* The field that contains the minimum height value.
|
|
123
|
+
*/
|
|
124
|
+
minHeight?: string;
|
|
125
|
+
/**
|
|
126
|
+
* The field that contains the minimum width value.
|
|
127
|
+
*/
|
|
128
|
+
minWidth?: string;
|
|
129
|
+
/**
|
|
130
|
+
* The field that contains the path configuration.
|
|
131
|
+
*/
|
|
132
|
+
path?: string;
|
|
133
|
+
/**
|
|
134
|
+
* The field that contains the rotation configuration.
|
|
135
|
+
*/
|
|
136
|
+
rotation?: string;
|
|
137
|
+
/**
|
|
138
|
+
* The field that contains the selectable configuration.
|
|
139
|
+
*/
|
|
140
|
+
selectable?: string;
|
|
141
|
+
/**
|
|
142
|
+
* The field that contains the source configuration.
|
|
143
|
+
*/
|
|
144
|
+
source?: string;
|
|
145
|
+
/**
|
|
146
|
+
* The field that contains the stroke configuration.
|
|
147
|
+
*/
|
|
148
|
+
stroke?: string;
|
|
149
|
+
/**
|
|
150
|
+
* The field that contains the type configuration.
|
|
151
|
+
*/
|
|
152
|
+
type?: string;
|
|
153
|
+
/**
|
|
154
|
+
* The field that contains the visual configuration.
|
|
155
|
+
*/
|
|
156
|
+
visual?: string;
|
|
157
|
+
/**
|
|
158
|
+
* The field that contains the width value.
|
|
159
|
+
*/
|
|
160
|
+
width?: string;
|
|
161
|
+
/**
|
|
162
|
+
* The field that contains the x coordinate.
|
|
163
|
+
*/
|
|
164
|
+
x?: string;
|
|
165
|
+
/**
|
|
166
|
+
* The field that contains the y coordinate.
|
|
167
|
+
*/
|
|
168
|
+
y?: string;
|
|
169
|
+
/**
|
|
170
|
+
* The field that contains the corner radius value.
|
|
171
|
+
*/
|
|
172
|
+
cornerRadius?: string;
|
|
173
|
+
/**
|
|
174
|
+
* The field that contains the center configuration.
|
|
175
|
+
*/
|
|
176
|
+
center?: string;
|
|
177
|
+
/**
|
|
178
|
+
* The field that contains the radius value.
|
|
179
|
+
*/
|
|
180
|
+
radius?: string;
|
|
181
|
+
/**
|
|
182
|
+
* The field that contains the data item reference.
|
|
183
|
+
*/
|
|
184
|
+
dataItem?: string;
|
|
185
|
+
/**
|
|
186
|
+
* The field that contains the tooltip text.
|
|
187
|
+
*/
|
|
188
|
+
tooltipText?: string;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Defines the field mapping configuration for connections data binding.
|
|
192
|
+
* Maps source object properties to `Diagram` connection properties.
|
|
193
|
+
*/
|
|
194
|
+
interface ConnectionModelFields {
|
|
195
|
+
/**
|
|
196
|
+
* The field that contains the source shape identifier.
|
|
197
|
+
*/
|
|
198
|
+
from?: string;
|
|
199
|
+
/**
|
|
200
|
+
* The field that contains the target shape identifier.
|
|
201
|
+
*/
|
|
202
|
+
to?: string;
|
|
203
|
+
/**
|
|
204
|
+
* The field that contains the connection points.
|
|
205
|
+
*/
|
|
206
|
+
points?: string;
|
|
207
|
+
/**
|
|
208
|
+
* The field that contains the data item reference.
|
|
209
|
+
*/
|
|
210
|
+
dataItem?: string;
|
|
211
|
+
/**
|
|
212
|
+
* The field that contains the tooltip text.
|
|
213
|
+
*/
|
|
214
|
+
tooltipText?: string;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Defines a custom template for shape tooltips within the `kendo-diagram` component.
|
|
219
|
+
* Use this directive to customize how tooltips appear when hovering over shapes.
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* ```ts
|
|
223
|
+
* import { Component } from '@angular/core';
|
|
224
|
+
*
|
|
225
|
+
* _@Component({
|
|
226
|
+
* selector: 'my-app',
|
|
227
|
+
* template: `
|
|
228
|
+
* <kendo-diagram>
|
|
229
|
+
* <ng-template kendoDiagramShapeTooltipTemplate let-dataItem>
|
|
230
|
+
* {{dataItem.tooltipContent}}
|
|
231
|
+
* </ng-template>
|
|
232
|
+
* </kendo-diagram>
|
|
233
|
+
* `
|
|
234
|
+
* })
|
|
235
|
+
* class AppComponent {
|
|
236
|
+
* }
|
|
237
|
+
*
|
|
238
|
+
* ```
|
|
239
|
+
*/
|
|
240
|
+
declare class ShapeTooltipTemplateDirective {
|
|
241
|
+
/**
|
|
242
|
+
* @hidden
|
|
243
|
+
*/
|
|
244
|
+
templateRef: TemplateRef<any>;
|
|
245
|
+
constructor(templateRef: TemplateRef<any>);
|
|
246
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShapeTooltipTemplateDirective, never>;
|
|
247
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ShapeTooltipTemplateDirective, "[kendoDiagramShapeTooltipTemplate]", never, {}, {}, never, never, true, never>;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Defines a custom template for connection tooltips within the `kendo-diagram` component.
|
|
252
|
+
* Use this directive to customize how tooltips appear when hovering over connections.
|
|
253
|
+
*
|
|
254
|
+
* @example
|
|
255
|
+
* ```ts
|
|
256
|
+
* import { Component } from '@angular/core';
|
|
257
|
+
*
|
|
258
|
+
* _@Component({
|
|
259
|
+
* selector: 'my-app',
|
|
260
|
+
* template: `
|
|
261
|
+
* <kendo-diagram>
|
|
262
|
+
* <ng-template kendoDiagramConnectionTooltipTemplate let-dataItem>
|
|
263
|
+
* {{dataItem.tooltipContent}}
|
|
264
|
+
* </ng-template>
|
|
265
|
+
* </kendo-diagram>
|
|
266
|
+
* `
|
|
267
|
+
* })
|
|
268
|
+
* class AppComponent {
|
|
269
|
+
* }
|
|
270
|
+
*
|
|
271
|
+
* ```
|
|
272
|
+
*/
|
|
273
|
+
declare class ConnectionTooltipTemplateDirective {
|
|
274
|
+
/**
|
|
275
|
+
* @hidden
|
|
276
|
+
*/
|
|
277
|
+
templateRef: TemplateRef<any>;
|
|
278
|
+
constructor(templateRef: TemplateRef<any>);
|
|
279
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConnectionTooltipTemplateDirective, never>;
|
|
280
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ConnectionTooltipTemplateDirective, "[kendoDiagramConnectionTooltipTemplate]", never, {}, {}, never, never, true, never>;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Represents the [Kendo UI Diagram component for Angular](https://www.telerik.com/kendo-angular-ui/components/diagrams).
|
|
285
|
+
*
|
|
286
|
+
* The Diagram component is used to create organizational charts, and other types of diagrams.
|
|
287
|
+
*
|
|
288
|
+
* @example
|
|
289
|
+
* ```html
|
|
290
|
+
* <kendo-diagram [shapes]="shapesData"></kendo-diagram>
|
|
291
|
+
* ```
|
|
292
|
+
*/
|
|
293
|
+
declare class DiagramComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
294
|
+
private wrapperElement;
|
|
295
|
+
private renderer;
|
|
296
|
+
private zone;
|
|
297
|
+
private popupService;
|
|
298
|
+
private viewContainer;
|
|
299
|
+
diagramClass: boolean;
|
|
300
|
+
/**
|
|
301
|
+
* Defines the default configuration options applicable to all connections.
|
|
302
|
+
*
|
|
303
|
+
*/
|
|
304
|
+
connectionDefaults?: ConnectionDefaults;
|
|
305
|
+
/**
|
|
306
|
+
* Defines the connections that render between the shapes in the `Diagram` (see [Connections article](https://www.telerik.com/kendo-angular-ui/components/diagrams/connections)).
|
|
307
|
+
* Accepts either an array of `ConnectionOptions` or an array of any objects
|
|
308
|
+
* that will be mapped using the `connectionModelFields` configuration.
|
|
309
|
+
*
|
|
310
|
+
*/
|
|
311
|
+
connections?: any[];
|
|
312
|
+
/**
|
|
313
|
+
* Defines the field mapping configuration for connections data binding ([see example](https://www.telerik.com/kendo-angular-ui/components/diagrams/data-binding#field-mapping)).
|
|
314
|
+
* Maps source object properties to `Diagram` connection properties.
|
|
315
|
+
* Only used when `connections` is an array of custom objects instead of `ConnectionOptions`.
|
|
316
|
+
*/
|
|
317
|
+
connectionModelFields?: ConnectionModelFields;
|
|
318
|
+
/**
|
|
319
|
+
* A set of settings to configure the `Diagram` behavior when the user attempts to drag, resize, or remove shapes.
|
|
320
|
+
* Changing the property value dynamically triggers a reinitialization of the `Diagram`.
|
|
321
|
+
*
|
|
322
|
+
* @default true
|
|
323
|
+
*/
|
|
324
|
+
editable?: boolean | DiagramEditable;
|
|
325
|
+
/**
|
|
326
|
+
* Defines the layout configuration for arranging shapes and connections in the `Diagram` (see [Layout article](https://www.telerik.com/kendo-angular-ui/components/diagrams/layouts)).
|
|
327
|
+
*
|
|
328
|
+
*/
|
|
329
|
+
layout?: DiagramLayout;
|
|
330
|
+
/**
|
|
331
|
+
* Defines the pannable options. Use this setting to disable `Diagram` pan or change the key that activates the pan behavior.
|
|
332
|
+
*
|
|
333
|
+
* @default true
|
|
334
|
+
*/
|
|
335
|
+
pannable?: boolean | Pannable;
|
|
336
|
+
/**
|
|
337
|
+
* Defines the `Diagram` selection options.
|
|
338
|
+
*
|
|
339
|
+
* By default, you can select shapes in the `Diagram` in one of two ways:
|
|
340
|
+
* - Clicking a single shape to select it and deselect any previously selected shapes.
|
|
341
|
+
* - Holding the `Ctrl/Cmd on MacOS` key while clicking multiple shapes to select them and any other shapes between them.
|
|
342
|
+
*
|
|
343
|
+
* 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.
|
|
344
|
+
*
|
|
345
|
+
* @default true
|
|
346
|
+
*/
|
|
347
|
+
selectable?: boolean | Selectable;
|
|
348
|
+
/**
|
|
349
|
+
* Defines the default configuration options applicable to all shapes.
|
|
350
|
+
*/
|
|
351
|
+
shapeDefaults?: ShapeDefaults;
|
|
352
|
+
/**
|
|
353
|
+
* Defines the shapes that render in the `Diagram` (see [Shapes article](https://www.telerik.com/kendo-angular-ui/components/diagrams/shapes)).
|
|
354
|
+
* Accepts either an array of `ShapeOptions` or an array of any objects
|
|
355
|
+
* that will be mapped using the `shapeModelFields` configuration.
|
|
356
|
+
*
|
|
357
|
+
*/
|
|
358
|
+
shapes?: any[];
|
|
359
|
+
/**
|
|
360
|
+
* Defines the field mapping configuration for shapes data binding ([see example](https://www.telerik.com/kendo-angular-ui/components/diagrams/data-binding#field-mapping)).
|
|
361
|
+
* Maps source object properties to `Diagram` shape properties.
|
|
362
|
+
* Only used when `shapes` is an array of custom objects instead of `ShapeOptions`.
|
|
363
|
+
*/
|
|
364
|
+
shapeModelFields?: ShapeModelFields;
|
|
365
|
+
/**
|
|
366
|
+
* Defines the zoom level of the `Diagram`.
|
|
367
|
+
*
|
|
368
|
+
* @default 1
|
|
369
|
+
*/
|
|
370
|
+
zoom?: number;
|
|
371
|
+
/**
|
|
372
|
+
* Defines the maximum zoom level of the `Diagram`.
|
|
373
|
+
*
|
|
374
|
+
* @default 2
|
|
375
|
+
*/
|
|
376
|
+
zoomMax?: number;
|
|
377
|
+
/**
|
|
378
|
+
* Defines the minimum zoom level of the `Diagram`.
|
|
379
|
+
*
|
|
380
|
+
* @default 0.1
|
|
381
|
+
*/
|
|
382
|
+
zoomMin?: number;
|
|
383
|
+
/**
|
|
384
|
+
* Defines the zoom rate of the `Diagram`.
|
|
385
|
+
*
|
|
386
|
+
* @default 0.1
|
|
387
|
+
*/
|
|
388
|
+
zoomRate?: number;
|
|
389
|
+
/**
|
|
390
|
+
* Enables keyboard navigation in the `Diagram`.
|
|
391
|
+
* When set to `true`, navigate between shapes using arrow keys.
|
|
392
|
+
* Alternatively, pass a `DiagramNavigationOptions` object to customize navigation behavior.
|
|
393
|
+
*
|
|
394
|
+
* @default true
|
|
395
|
+
*
|
|
396
|
+
* @remarks
|
|
397
|
+
* This property is related to accessibility.
|
|
398
|
+
*/
|
|
399
|
+
set navigable(_navigable: boolean | DiagramNavigationOptions);
|
|
400
|
+
get navigable(): boolean | DiagramNavigationOptions;
|
|
401
|
+
/**
|
|
402
|
+
* Fires when a shape or connection is created or removed.
|
|
403
|
+
*/
|
|
404
|
+
change: EventEmitter<DiagramChangeEvent>;
|
|
405
|
+
/**
|
|
406
|
+
* Fires when the user clicks on a shape or a connection.
|
|
407
|
+
*/
|
|
408
|
+
diagramClick: EventEmitter<DiagramDomEvent>;
|
|
409
|
+
/**
|
|
410
|
+
* Fires when the user drags an item.
|
|
411
|
+
*/
|
|
412
|
+
drag: EventEmitter<DiagramDragEvent>;
|
|
413
|
+
/**
|
|
414
|
+
* Fires when the user stops dragging an item.
|
|
415
|
+
*/
|
|
416
|
+
dragEnd: EventEmitter<DiagramDragEvent>;
|
|
417
|
+
/**
|
|
418
|
+
* Fires when the user starts dragging an item.
|
|
419
|
+
*/
|
|
420
|
+
dragStart: EventEmitter<DiagramDragEvent>;
|
|
421
|
+
/**
|
|
422
|
+
* Fires when the location or size of an item are changed.
|
|
423
|
+
*/
|
|
424
|
+
shapeBoundsChange: EventEmitter<DiagramItemBoundsChangeEvent>;
|
|
425
|
+
/**
|
|
426
|
+
* Fires when the mouse pointer enters a shape or connection.
|
|
427
|
+
*/
|
|
428
|
+
mouseEnter: EventEmitter<DiagramDomEvent>;
|
|
429
|
+
/**
|
|
430
|
+
* Fires when the mouse pointer leaves a shape or connection.
|
|
431
|
+
*/
|
|
432
|
+
mouseLeave: EventEmitter<DiagramDomEvent>;
|
|
433
|
+
/**
|
|
434
|
+
* Fires when the user pans the `Diagram`.
|
|
435
|
+
*/
|
|
436
|
+
onPan: EventEmitter<DiagramPanEvent>;
|
|
437
|
+
/**
|
|
438
|
+
* Fires when the user selects one or more items.
|
|
439
|
+
*/
|
|
440
|
+
onSelect: EventEmitter<DiagramSelectEvent>;
|
|
441
|
+
/**
|
|
442
|
+
* Fires when the `Diagram` has finished zooming out.
|
|
443
|
+
*/
|
|
444
|
+
zoomEnd: EventEmitter<DiagramZoomEndEvent>;
|
|
445
|
+
/**
|
|
446
|
+
* Fires when the `Diagram` starts zooming in or out.
|
|
447
|
+
*/
|
|
448
|
+
zoomStart: EventEmitter<DiagramZoomStartEvent>;
|
|
449
|
+
/**
|
|
450
|
+
* Fires when a tooltip should shown for a shape or connection.
|
|
451
|
+
*/
|
|
452
|
+
tooltipShow: EventEmitter<ShapeOptions | ConnectionOptions>;
|
|
453
|
+
/**
|
|
454
|
+
* Fires when a tooltip should be hidden.
|
|
455
|
+
*/
|
|
456
|
+
tooltipHide: EventEmitter<ShapeOptions | ConnectionOptions>;
|
|
457
|
+
/**
|
|
458
|
+
* @hidden
|
|
459
|
+
* Represents the Diagram instance, holding the core functionality of the Diagram.
|
|
460
|
+
*/
|
|
461
|
+
diagramWidget: Diagram;
|
|
462
|
+
/**
|
|
463
|
+
* The currently selected items in the `Diagram`.
|
|
464
|
+
*/
|
|
465
|
+
get selection(): (Shape | Connection)[];
|
|
466
|
+
/**
|
|
467
|
+
* The actual shapes created by the `Diagram`.
|
|
468
|
+
*/
|
|
469
|
+
get diagramShapes(): Shape[];
|
|
470
|
+
/**
|
|
471
|
+
* The actual connections created by the `Diagram`.
|
|
472
|
+
*/
|
|
473
|
+
get diagramConnections(): Connection[];
|
|
474
|
+
/**
|
|
475
|
+
* @hidden
|
|
476
|
+
*/
|
|
477
|
+
showLicenseWatermark: boolean;
|
|
478
|
+
/**
|
|
479
|
+
* @hidden
|
|
480
|
+
*/
|
|
481
|
+
licenseMessage?: LicenseMessage;
|
|
482
|
+
/**
|
|
483
|
+
* @hidden
|
|
484
|
+
*/
|
|
485
|
+
customTemplate?: TemplateRef<any>;
|
|
486
|
+
private _navigable;
|
|
487
|
+
private options;
|
|
488
|
+
/**
|
|
489
|
+
* Stores the converted shapes from user data.
|
|
490
|
+
*/
|
|
491
|
+
private convertedShapes;
|
|
492
|
+
/**
|
|
493
|
+
* Stores the converted connections from user data.
|
|
494
|
+
*/
|
|
495
|
+
private convertedConnections;
|
|
496
|
+
/**
|
|
497
|
+
* Current popup instance for tooltip.
|
|
498
|
+
*/
|
|
499
|
+
private tooltipPopup?;
|
|
500
|
+
defaultTooltipTemplate: TemplateRef<any>;
|
|
501
|
+
customTooltipTemplate: TemplateRef<any>;
|
|
502
|
+
shapeTooltipTemplate: ShapeTooltipTemplateDirective;
|
|
503
|
+
connectionTooltipTemplate: ConnectionTooltipTemplateDirective;
|
|
504
|
+
/**
|
|
505
|
+
* @hidden
|
|
506
|
+
* The original data item provided by the user. Passed in the tooltip template context.
|
|
507
|
+
*/
|
|
508
|
+
dataItem: any;
|
|
509
|
+
constructor(wrapperElement: ElementRef<HTMLElement>, renderer: Renderer2, zone: NgZone, popupService: PopupService, viewContainer: ViewContainerRef);
|
|
510
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
511
|
+
ngAfterViewInit(): void;
|
|
512
|
+
ngOnDestroy(): void;
|
|
513
|
+
/**
|
|
514
|
+
* Provides the current `Diagram`'s shapes and connections that can be used to create a new `Diagram` when needed.
|
|
515
|
+
* @returns {DiagramState} Object containing shapes and connections arrays.
|
|
516
|
+
*/
|
|
517
|
+
getState(): DiagramState;
|
|
518
|
+
/**
|
|
519
|
+
* Focuses the `Diagram`.
|
|
520
|
+
* @returns {boolean} true if focus was set successfully.
|
|
521
|
+
*/
|
|
522
|
+
focus(): boolean;
|
|
523
|
+
/**
|
|
524
|
+
* Clears the `Diagram`.
|
|
525
|
+
*/
|
|
526
|
+
clear(): void;
|
|
527
|
+
/**
|
|
528
|
+
* Determines whether two shapes are connected.
|
|
529
|
+
* @param {Shape} Shape.
|
|
530
|
+
* @param {Shape} Shape.
|
|
531
|
+
* @returns {boolean} true if the two shapes are connected.
|
|
532
|
+
*/
|
|
533
|
+
connected(source: Shape, target: Shape): boolean;
|
|
534
|
+
/**
|
|
535
|
+
* Adds connection to the `Diagram`.
|
|
536
|
+
* @param {Connection} Connection.
|
|
537
|
+
* @param {boolean} Boolean.
|
|
538
|
+
* @returns {Connection} The newly created connection.
|
|
539
|
+
*/
|
|
540
|
+
addConnection(connection: Connection, undoable?: boolean): Connection;
|
|
541
|
+
/**
|
|
542
|
+
* Adds shape to the `Diagram`.
|
|
543
|
+
* @param {ShapeOptions | Shape | Point} If you pass a `Point`, a new Shape with default options will be created and positioned at that point.
|
|
544
|
+
* @param {boolean} Boolean indicating if the action should be undoable.
|
|
545
|
+
* @returns {Shape} The newly created shape.
|
|
546
|
+
*/
|
|
547
|
+
addShape(item: ShapeOptions | Shape | Point, undoable?: boolean): Shape;
|
|
548
|
+
/**
|
|
549
|
+
* Removes shape(s) and/or connection(s) from the `Diagram`.
|
|
550
|
+
* @param {Shape | Connection | (Shape | Connection)[]} Shape, Connection or an Array of Shapes and/or Connections.
|
|
551
|
+
* @param {Boolean} Boolean indicating if the action should be undoable.
|
|
552
|
+
*/
|
|
553
|
+
remove(items: Shape | Connection | (Shape | Connection)[], undoable?: boolean): void;
|
|
554
|
+
/**
|
|
555
|
+
* Connects two items in the `Diagram`.
|
|
556
|
+
* @param {Shape | Connector | Point} Shape, Shape's Connector or Point.
|
|
557
|
+
* @param {Shape | Connector | Point} Shape, Shape's Connector or Point.
|
|
558
|
+
* @param {ConnectionOptions} Connection options.
|
|
559
|
+
* @returns {Connection} The created connection.
|
|
560
|
+
*/
|
|
561
|
+
connect(source: Shape | Connector | Point, target: Shape | Connector | Point, options?: ConnectionOptions): Connection;
|
|
562
|
+
/**
|
|
563
|
+
* Executes the next undoable action on top of the undo stack if any.
|
|
564
|
+
*/
|
|
565
|
+
undo(): void;
|
|
566
|
+
/**
|
|
567
|
+
* Executes the previous undoable action on top of the redo stack if any.
|
|
568
|
+
*/
|
|
569
|
+
redo(): void;
|
|
570
|
+
/**
|
|
571
|
+
* Selects items on the basis of the given input.
|
|
572
|
+
* @param {Shape | Connection | (Shape | Connection)[]} Shape, Connection or an Array of Shapes and/or Connections.
|
|
573
|
+
* @param Selection options.
|
|
574
|
+
* @returns {(Shape | Connection)[]} Array of selected items.
|
|
575
|
+
*/
|
|
576
|
+
select(items: Shape | Connection | (Shape | Connection)[], options?: SelectionOptions): (Shape | Connection)[];
|
|
577
|
+
/**
|
|
578
|
+
* Selects all items in the `Diagram`.
|
|
579
|
+
*/
|
|
580
|
+
selectAll(): void;
|
|
581
|
+
/**
|
|
582
|
+
* Selects items in the specified area.
|
|
583
|
+
* @param {Rect} rect Rectangle area to select.
|
|
584
|
+
*/
|
|
585
|
+
selectArea(rect: Rect): void;
|
|
586
|
+
/**
|
|
587
|
+
* Deselects the specified items or all items if no item is specified.
|
|
588
|
+
* @param {Shape | Connection | (Shape | Connection)[]} Shape, Connection or an Array of Shapes and/or Connections.
|
|
589
|
+
*/
|
|
590
|
+
deselect(items?: Shape | Connection | (Shape | Connection)[]): void;
|
|
591
|
+
/**
|
|
592
|
+
* Brings to front the passed items.
|
|
593
|
+
* @param {Shape | Connection | (Shape | Connection)[]} Shape, Connection or an Array of Shapes and/or Connections.
|
|
594
|
+
* @param {boolean} By default the action is undoable.
|
|
595
|
+
*/
|
|
596
|
+
bringToFront(items: Shape | Connection | (Shape | Connection)[], undoable?: boolean): void;
|
|
597
|
+
/**
|
|
598
|
+
* Sends to back the passed items.
|
|
599
|
+
* @param {Shape | Connection | (Shape | Connection)[]} Shape, Connection or an Array of Shapes and/or Connections.
|
|
600
|
+
* @param {boolean} By default the action is undoable.
|
|
601
|
+
*/
|
|
602
|
+
bringToBack(items: Shape | Connection | (Shape | Connection)[], undoable?: boolean): void;
|
|
603
|
+
/**
|
|
604
|
+
* Bring into view the passed item(s) or rectangle.
|
|
605
|
+
* @param {Shape | Connection | (Shape | Connection)[]} Shape, Connection or an Array of Shapes and/or Connections.
|
|
606
|
+
* @param {DiagramAlignOptions} controls the position of the calculated rectangle relative to the viewport.
|
|
607
|
+
* "Center middle" will position the items in the center. animate - controls if the pan should be animated.
|
|
608
|
+
*/
|
|
609
|
+
bringIntoView(item: Shape | Connection | (Shape | Connection)[] | Rect, options?: BringIntoViewOptions): void;
|
|
610
|
+
/**
|
|
611
|
+
* Aligns shapes in the specified direction.
|
|
612
|
+
* @param {Direction} Direction to align shapes.
|
|
613
|
+
*/
|
|
614
|
+
alignShapes(direction: Direction): void;
|
|
615
|
+
/**
|
|
616
|
+
* @hidden
|
|
617
|
+
* Pans the Diagram.
|
|
618
|
+
* @param {Point} Pan coordinates.
|
|
619
|
+
* @param {boolean} Whether to animate the pan.
|
|
620
|
+
* @returns {Point} Current pan position.
|
|
621
|
+
*/
|
|
622
|
+
pan(pan: Point, animate?: boolean): Point;
|
|
623
|
+
/**
|
|
624
|
+
* Gets the current `Diagram` viewport rectangle.
|
|
625
|
+
* @returns {Rect} Viewport rectangle.
|
|
626
|
+
*/
|
|
627
|
+
viewport(): Rect;
|
|
628
|
+
/**
|
|
629
|
+
* Copies selected items to clipboard.
|
|
630
|
+
*/
|
|
631
|
+
copy(): void;
|
|
632
|
+
/**
|
|
633
|
+
* @hidden
|
|
634
|
+
* Cuts selected items to clipboard.
|
|
635
|
+
*/
|
|
636
|
+
cut(): void;
|
|
637
|
+
/**
|
|
638
|
+
* Pastes items from clipboard.
|
|
639
|
+
*/
|
|
640
|
+
paste(): void;
|
|
641
|
+
/**
|
|
642
|
+
* Gets the bounding rectangle of the given items.
|
|
643
|
+
* @param {Shape | Connection | (Shape | Connection)[]} Shape, Connection or an Array of Shapes and/or Connections.
|
|
644
|
+
* @param {boolean} Pass 'true' if you need to get the bounding box of the shapes without their rotation offset.
|
|
645
|
+
* @returns {Rect} Bounding rectangle.
|
|
646
|
+
*/
|
|
647
|
+
boundingBox(items: Shape | Connection | (Shape | Connection)[], origin?: boolean): Rect;
|
|
648
|
+
/**
|
|
649
|
+
* Converts document coordinates to view coordinates.
|
|
650
|
+
* @param {Point} Point in document coordinates.
|
|
651
|
+
* @returns {Point} Point in view coordinates.
|
|
652
|
+
*/
|
|
653
|
+
documentToView(point: Point): Point;
|
|
654
|
+
/**
|
|
655
|
+
* Converts view coordinates to document coordinates.
|
|
656
|
+
* @param {Point} Point in view coordinates.
|
|
657
|
+
* @returns {Point} Point in document coordinates.
|
|
658
|
+
*/
|
|
659
|
+
viewToDocument(point: Point): Point;
|
|
660
|
+
/**
|
|
661
|
+
* Converts view coordinates to model coordinates.
|
|
662
|
+
* @param {Point} Point in view coordinates.
|
|
663
|
+
* @returns {Point} Point in model coordinates.
|
|
664
|
+
*/
|
|
665
|
+
viewToModel(point: Point): any;
|
|
666
|
+
/**
|
|
667
|
+
* Converts model coordinates to view coordinates.
|
|
668
|
+
* @param {Point} Point in model coordinates.
|
|
669
|
+
* @returns {Point} Point in view coordinates.
|
|
670
|
+
*/
|
|
671
|
+
modelToView(point: Point): any;
|
|
672
|
+
/**
|
|
673
|
+
* Converts model coordinates to layer coordinates.
|
|
674
|
+
* @param {Point} Point in model coordinates.
|
|
675
|
+
* @returns {Point} Point in layer coordinates.
|
|
676
|
+
*/
|
|
677
|
+
modelToLayer(point: Point): any;
|
|
678
|
+
/**
|
|
679
|
+
* Converts layer coordinates to model coordinates.
|
|
680
|
+
* @param {Point} Point in layer coordinates.
|
|
681
|
+
* @returns {Point} Point in model coordinates.
|
|
682
|
+
*/
|
|
683
|
+
layerToModel(point: Point): any;
|
|
684
|
+
/**
|
|
685
|
+
* Converts document coordinates to model coordinates.
|
|
686
|
+
* @param {Point} Point in document coordinates.
|
|
687
|
+
* @returns {Point} Point in model coordinates.
|
|
688
|
+
*/
|
|
689
|
+
documentToModel(point: Point): any;
|
|
690
|
+
/**
|
|
691
|
+
* Converts model coordinates to document coordinates.
|
|
692
|
+
* @param {Point} Point in model coordinates.
|
|
693
|
+
* @returns {Point} Point in document coordinates.
|
|
694
|
+
*/
|
|
695
|
+
modelToDocument(point: Point): Point;
|
|
696
|
+
/**
|
|
697
|
+
* Gets a shape on the basis of its identifier.
|
|
698
|
+
* @param {string} The identifier of a shape.
|
|
699
|
+
* @returns {Shape} The shape with the specified ID.
|
|
700
|
+
*/
|
|
701
|
+
getShapeById(id: string): Shape;
|
|
702
|
+
/**
|
|
703
|
+
* Exports the diagram's DOM visual representation for rendering or export purposes.
|
|
704
|
+
* Creates a clipped group containing the canvas content with proper transformations.
|
|
705
|
+
* @returns {Group} A drawing Group element containing the exported DOM visual
|
|
706
|
+
*/
|
|
707
|
+
exportDOMVisual(): Group;
|
|
708
|
+
/**
|
|
709
|
+
* Exports the diagram's visual representation with proper scaling based on zoom level.
|
|
710
|
+
* Creates a scaled group containing the main layer content.
|
|
711
|
+
* @returns {Group} A drawing Group element containing the exported visual with inverse zoom scaling
|
|
712
|
+
*/
|
|
713
|
+
exportVisual(): Group;
|
|
714
|
+
/**
|
|
715
|
+
* Handles the tooltipShow event from the diagram widget.
|
|
716
|
+
*/
|
|
717
|
+
private handleTooltipShow;
|
|
718
|
+
private showTooltip;
|
|
719
|
+
private popupClass;
|
|
720
|
+
private setCustomTemplate;
|
|
721
|
+
/**
|
|
722
|
+
* Handles the tooltipHide event from the diagram widget.
|
|
723
|
+
*/
|
|
724
|
+
private handleTooltipHide;
|
|
725
|
+
/**
|
|
726
|
+
* Hides the current tooltip and cleans up resources.
|
|
727
|
+
*/
|
|
728
|
+
private hideTooltip;
|
|
729
|
+
protected activeEmitter(name: string): any;
|
|
730
|
+
/**
|
|
731
|
+
* Binds event handlers to the diagram widget.
|
|
732
|
+
*/
|
|
733
|
+
private bindDiagramEvents;
|
|
734
|
+
/**
|
|
735
|
+
* Converts user data to Diagram model format using field mappings.
|
|
736
|
+
*/
|
|
737
|
+
private convertUserData;
|
|
738
|
+
private addDataItemProperty;
|
|
739
|
+
/**
|
|
740
|
+
* Creates field mapping configuration from model fields.
|
|
741
|
+
*/
|
|
742
|
+
private createFieldMapping;
|
|
743
|
+
private init;
|
|
744
|
+
private updateOptions;
|
|
745
|
+
private loadOptions;
|
|
746
|
+
private getNormalizedNavigationOptions;
|
|
747
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DiagramComponent, never>;
|
|
748
|
+
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; }; "navigable": { "alias": "navigable"; "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>;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
753
|
+
* definition for the Diagram component.
|
|
754
|
+
*
|
|
755
|
+
* @example
|
|
756
|
+
*
|
|
757
|
+
* ```ts-no-run
|
|
758
|
+
* // Import the Diagram module
|
|
759
|
+
* import { DiagramModule } from '@progress/kendo-angular-diagrams';
|
|
760
|
+
*
|
|
761
|
+
* // The browser platform with a compiler
|
|
762
|
+
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
763
|
+
*
|
|
764
|
+
* import { NgModule } from '@angular/core';
|
|
765
|
+
*
|
|
766
|
+
* // Import the app component
|
|
767
|
+
* import { AppComponent } from './app.component';
|
|
768
|
+
*
|
|
769
|
+
* // Define the app module
|
|
770
|
+
* _@NgModule({
|
|
771
|
+
* declarations: [AppComponent],
|
|
772
|
+
* imports: [BrowserModule, DiagramModule],
|
|
773
|
+
* bootstrap: [AppComponent]
|
|
774
|
+
* })
|
|
775
|
+
* export class AppModule {}
|
|
776
|
+
*
|
|
777
|
+
* // Compile and launch the module
|
|
778
|
+
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
779
|
+
*
|
|
780
|
+
* ```
|
|
781
|
+
*/
|
|
782
|
+
declare class DiagramModule {
|
|
783
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DiagramModule, never>;
|
|
784
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DiagramModule, never, [typeof DiagramComponent, typeof ShapeTooltipTemplateDirective, typeof ConnectionTooltipTemplateDirective], [typeof DiagramComponent, typeof ShapeTooltipTemplateDirective, typeof ConnectionTooltipTemplateDirective]>;
|
|
785
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DiagramModule>;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Represents the utility array that that contains all `Diagram`-related components and directives.
|
|
790
|
+
*
|
|
791
|
+
* Use `KENDO_DIAGRAM` to import all Diagram components and directives at once.
|
|
792
|
+
*
|
|
793
|
+
* @example
|
|
794
|
+
* ```typescript
|
|
795
|
+
* import { Component } from '@angular/core';
|
|
796
|
+
* import { KENDO_DIAGRAM } from '@progress/kendo-angular-diagrams';
|
|
797
|
+
*
|
|
798
|
+
* @Component({
|
|
799
|
+
* selector: 'my-diagram-app',
|
|
800
|
+
* standalone: true,
|
|
801
|
+
* imports: [KENDO_DIAGRAM],
|
|
802
|
+
* template: `...`
|
|
803
|
+
* })
|
|
804
|
+
* export class DiagramAppComponent {}
|
|
805
|
+
* ```
|
|
806
|
+
*/
|
|
807
|
+
declare const KENDO_DIAGRAM: readonly [typeof DiagramComponent, typeof ShapeTooltipTemplateDirective, typeof ConnectionTooltipTemplateDirective];
|
|
808
|
+
|
|
809
|
+
export { ConnectionTooltipTemplateDirective, DiagramComponent, DiagramModule, KENDO_DIAGRAM, ShapeTooltipTemplateDirective };
|
|
810
|
+
export type { ConnectionDefaults, ConnectionModelFields, ConnectionOptions, DiagramNavigationOptions, ShapeDefaults, ShapeModelFields, ShapeOptions, TooltipOptions };
|