@progress/kendo-angular-diagrams 19.3.0-develop.9 → 19.3.1-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/README.md CHANGED
@@ -1,32 +1,58 @@
1
- <a href="https://www.telerik.com/kendo-angular-ui/" target="_blank">
2
- <img width="631" src="https://demos.telerik.com/kendo-angular-ui/assets/banner/npm-banner.svg">
1
+ <a href="https://www.telerik.com/kendo-angular-ui/components/diagrams" target="_blank">
2
+ <img width="631" src="https://demos.telerik.com/kendo-angular-ui/assets/banner/npm-banner.svg" alt="Kendo UI for Angular Diagram">
3
3
  </a>
4
4
 
5
- ## Kendo UI for Angular Diagrams Component
5
+ ## Kendo UI for Angular Diagram Component
6
6
 
7
- > **Important**
7
+ > * This package is part of [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/)&mdash;a commercial UI library.
8
+ > * To use this package, you must install a license key file, whether you are on a paid license or a 30-day free trial. To receive a license key, either [purchase a license](https://www.telerik.com/purchase/kendo-ui) or start a [free trial](https://www.telerik.com/download-login-v2-kendo-angular-ui).
9
+ > * Adding a valid license key file ensures a seamless experience during the trial period&mdash;no watermarks, no warnings, and full access to all components and features.
10
+ > * Trial users can register for a free license key file. Without it, your trial may be interrupted by visual indicators or functionality limitations.
11
+ > * Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Angular team!
12
+ > * Learn more: https://www.telerik.com/kendo-angular-ui/components/licensing
8
13
  >
9
- > - This package is part of [Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-diagrams)&mdash;a commercial library designed and built for developing business applications with Angular. Every UI component in the Kendo UI for Angular suite has been built from the ground-up specifically for Angular.
10
- > - You will need to install a license key when adding the package to your project. For more information, please refer to the [Kendo UI for Angular My License page](https://www.telerik.com/kendo-angular-ui/my-license?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-diagrams).
11
- > - To receive a license key, you need to either [purchase a license](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-diagrams) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-diagrams). Doing so indicates that you [accept the Kendo UI for Angular License Agreement](https://www.telerik.com/purchase/license-agreement/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-diagrams).
12
- > - The 30-day free trial gives you access to all the Kendo UI for Angular components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Angular dev team!
13
- >
14
- > [Start using Kendo UI for Angular](https://www.telerik.com/download-login-v2-kendo-angular-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-angular-trial-diagrams) and speed up your development process!
14
+ > [Start using Kendo UI for Angular](https://www.telerik.com/download-login-v2-kendo-angular-ui) and speed up your development process!
15
+
16
+ The [Kendo UI for Angular Diagram](https://www.telerik.com/kendo-angular-ui/components/diagrams) enables you to create interactive diagrams, flowcharts, organizational charts, mind maps, and other visual representations of data and processes. The component provides rich functionality for building, editing, and visualizing complex hierarchical and network structures. This Diagram Component is built on Angular from the ground up, by a company with a long history of making enterprise-ready components, resulting in a highly performant and customizable solution.
17
+
18
+ ## Key Features
19
+
20
+ Among the many features which the Kendo UI for Angular Diagram delivers are:
21
+
22
+ * Workflow Diagram&mdash;Create workflow diagrams that visually represent a sequence of steps or processes. Workflow diagrams are useful for illustrating the flow of tasks, decisions, and actions in a process, making it easier to understand complex workflows. [Read more about Workflow Diagram...](https://www.telerik.com/kendo-angular-ui/components/diagrams/workflow-diagram)
23
+ * Shapes and Customization&mdash;Create and customize shapes to represent your data visually. The component supports various shape types including circles, rectangles, images, and custom SVG shapes. Customize shape appearance with styles, colors, and text content. [Read more about Diagram shapes...](https://www.telerik.com/kendo-angular-ui/components/diagrams/shapes)
24
+ * Connections and Relationships&mdash;Connect shapes to visualize relationships and data flow through flexible connection options. The component supports different connection types including cascading and polyline connections, with customizable routing, styling, and interactive behavior. [Read more about Diagram connections...](https://www.telerik.com/kendo-angular-ui/components/diagrams/connections)
25
+ * Automatic Layouts&mdash;Organize your Diagram automatically with built-in layout algorithms. Choose from tree, layered, force-directed, and radial layouts to create professional-looking diagrams without manual positioning. Each layout type offers extensive configuration options for fine-tuning the arrangement. [Read more about Diagram layouts...](https://www.telerik.com/kendo-angular-ui/components/diagrams/layouts)
26
+ * Data Binding&mdash;Bind diagram shapes and connections to your data models for dynamic diagram generation. Support for hierarchical data structures makes it easy to create organizational charts, decision trees, and other data-driven visualizations. [Read more about Diagram data binding...](https://www.telerik.com/kendo-angular-ui/components/diagrams/data-binding)
27
+ * Interactive Events&mdash;Respond to user interactions with a comprehensive set of events covering shape manipulation, connection changes, navigation, and selection. The event system enables you to build dynamic and responsive diagram applications. [Read more about Diagram events...](https://www.telerik.com/kendo-angular-ui/components/diagrams/events)
28
+ * Editing and Manipulation&mdash;Enable users to create, modify, and delete diagram elements through intuitive drag-and-drop interactions. Control editing permissions per shape or globally, and provide tools for connecting, resizing, and repositioning elements.
29
+ * Export Options&mdash;Export your Diagram to various formats including PDF, SVG, and PNG. The export feature provides options for customizing the output, such as page size, orientation, and quality. [Read more about Diagram export...](https://www.telerik.com/kendo-angular-ui/components/diagrams/pdf-export)
30
+ * Zoom and Navigation&mdash;The Diagram allows users to zoom the graph in and out for better perception. The zoom feature supports both mouse wheel and pinch gestures, providing a smooth user experience. You can also programmatically control the zoom level and set limits to prevent excessive zooming.
31
+ * Styling&mdash;Our components are designed to look great out of the box, but we understand that every application is different. That's why the [Progress Design System Kit](https://www.telerik.com/design-system) provides resources to help you customize the look and feel of your Kendo UI for Angular Diagram component. If time is of the essence, our [ThemeBuilder application](https://www.telerik.com/themebuilder) can help you quickly and seamlessly modify the component's appearance.
32
+
33
+ ## Support Options
34
+
35
+ For any issues you might encounter while working with the Kendo UI for Angular Diagram, you have the following support channels available:
36
+
37
+ * Industry-leading technical support&mdash;Kendo UI for Angular paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use the [dedicated Kendo UI for Angular support system](https://www.telerik.com/account/support-center/contact-us/technical-support).
38
+ * Product forums&mdash;The [Kendo UI for Angular forums](https://www.telerik.com/forums/kendo-angular-ui) are part of the free support you can get from the community and from the Kendo UI for Angular team.
39
+ * Feedback portal&mdash;The [Kendo UI for Angular feedback portal](https://feedback.telerik.com/kendo-angular-ui) is where you can request and vote for new features to be added.
15
40
 
16
41
  ## Resources
17
42
 
18
- - [Get Started with Kendo UI for Angular (requires trial registration)](https://www.telerik.com/kendo-angular-ui/getting-started)
19
- - [Demos, documentation, and component reference](https://www.telerik.com/kendo-angular-ui/components)
20
- - [Blogs](https://www.telerik.com/blogs/kendo-ui)
21
- - [Kendo UI for Angular pricing and licensing](https://www.telerik.com/purchase/kendo-ui)
43
+ * [Getting Started with Kendo UI for Angular](https://www.telerik.com/kendo-angular-ui/getting-started)
44
+ * [Getting Started with the Kendo UI for Angular Diagram](https://www.telerik.com/kendo-angular-ui/components/diagrams/installation/getting-started)
45
+ * [Demos, documentation, and component reference](https://www.telerik.com/kendo-angular-ui/components)
46
+ * [Blogs](http://www.telerik.com/blogs/kendo-ui)
47
+ * [Kendo UI for Angular pricing and licensing](https://www.telerik.com/purchase/kendo-ui)
22
48
 
23
49
  ## Questions and Feedback
24
50
 
25
- - [Official Forums](https://www.telerik.com/forums/kendo-angular-ui)
26
- - [GitHub Issues](https://github.com/telerik/kendo-angular/issues)
27
- - [Feedback Portal](https://feedback.telerik.com/kendo-angular-ui)
28
- - [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-ui-angular2)
51
+ * [Official Forums](https://www.telerik.com/forums/kendo-angular-ui)
52
+ * [GitHub Issues](https://github.com/telerik/kendo-angular/issues)
53
+ * [Feedback Portal](https://feedback.telerik.com/kendo-angular-ui)
54
+ * [StackOverflow](https://stackoverflow.com/questions/tagged/kendo-ui-angular2)
29
55
 
30
- _Copyright © 2025 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved._
56
+ *Copyright © 2025 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.*
31
57
 
32
- _Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries._
58
+ *Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.*
@@ -7,7 +7,7 @@ import { ConnectionDefaults, ConnectionOptions, DiagramEditable, DiagramLayout,
7
7
  import { Group } from '@progress/kendo-drawing';
8
8
  import * as i0 from "@angular/core";
9
9
  /**
10
- * Represents the [Kendo UI Diagram component for Angular({% slug overview_diagrams %}).
10
+ * Represents the [Kendo UI Diagram component for Angular](slug:overview_diagram).
11
11
  *
12
12
  * The Diagram component is used to create organizational charts, and other types of diagrams.
13
13
  *
@@ -144,7 +144,7 @@ export declare class DiagramComponent implements AfterViewInit, OnChanges, OnDes
144
144
  * @hidden
145
145
  * Represents the Diagram instance, holding the core functionality of the Diagram.
146
146
  */
147
- diagram: Diagram;
147
+ diagramWidget: Diagram;
148
148
  /**
149
149
  * The currently selected items in the Diagram.
150
150
  */
@@ -161,6 +161,10 @@ export declare class DiagramComponent implements AfterViewInit, OnChanges, OnDes
161
161
  * @hidden
162
162
  */
163
163
  showLicenseWatermark: boolean;
164
+ /**
165
+ * @hidden
166
+ */
167
+ licenseMessage?: string;
164
168
  private options;
165
169
  constructor(wrapperElement: ElementRef<HTMLElement>, renderer: Renderer2, zone: NgZone);
166
170
  ngOnChanges(changes: SimpleChanges): void;
@@ -6,13 +6,13 @@ import { Component, ElementRef, EventEmitter, HostBinding, Input, NgZone, Output
6
6
  import { Diagram } from '@progress/kendo-diagram-common';
7
7
  import { validatePackage } from '@progress/kendo-licensing';
8
8
  import { packageMetadata } from './package-metadata';
9
- import { hasObservers, shouldShowValidationUI, WatermarkOverlayComponent } from '@progress/kendo-angular-common';
9
+ import { hasObservers, shouldShowValidationUI, getLicenseMessage, WatermarkOverlayComponent, isDocumentAvailable } from '@progress/kendo-angular-common';
10
10
  import { NgIf } from '@angular/common';
11
11
  import { events, loadTheme } from '@progress/kendo-diagram-common';
12
12
  import { CONNECTION_DEFAULTS, SHAPE_DEFAULTS } from './utils';
13
13
  import * as i0 from "@angular/core";
14
14
  /**
15
- * Represents the [Kendo UI Diagram component for Angular({% slug overview_diagrams %}).
15
+ * Represents the [Kendo UI Diagram component for Angular](slug:overview_diagram).
16
16
  *
17
17
  * The Diagram component is used to create organizational charts, and other types of diagrams.
18
18
  *
@@ -35,7 +35,7 @@ export class DiagramComponent {
35
35
  * Defines the connections that render between the shapes in the Diagram.
36
36
  * Changing this property dynamically reinitializes the Diagram.
37
37
  */
38
- connections;
38
+ connections = [];
39
39
  /**
40
40
  * A set of settings to configure the Diagram behavior when the user attempts to drag, resize, or remove shapes.
41
41
  * Changing the property value dynamically triggers a reinitialization of the Diagram.
@@ -46,7 +46,7 @@ export class DiagramComponent {
46
46
  * The layout of a diagram consists of arranging the shapes (sometimes also the connections) in some fashion in order to achieve an aesthetically pleasing experience to the user.
47
47
  * Changing the property value dynamically triggers a reinitialization of the Diagram.
48
48
  */
49
- layout = { type: 'tree' };
49
+ layout;
50
50
  /**
51
51
  * Defines the pannable options. Use this setting to disable Diagram pan or change the key that activates the pan behavior.
52
52
  * @default true
@@ -72,7 +72,7 @@ export class DiagramComponent {
72
72
  * Defines the shapes that render in the Diagram.
73
73
  * Changing the property value dynamically triggers a reinitialization of the Diagram.
74
74
  */
75
- shapes;
75
+ shapes = [];
76
76
  /**
77
77
  * Defines the zoom level of the Diagram.
78
78
  *
@@ -149,29 +149,33 @@ export class DiagramComponent {
149
149
  * @hidden
150
150
  * Represents the Diagram instance, holding the core functionality of the Diagram.
151
151
  */
152
- diagram;
152
+ diagramWidget;
153
153
  /**
154
154
  * The currently selected items in the Diagram.
155
155
  */
156
156
  get selection() {
157
- return this.diagram?.select();
157
+ return this.diagramWidget?.select();
158
158
  }
159
159
  /**
160
160
  * The actual shapes created by the Diagram.
161
161
  */
162
162
  get diagramShapes() {
163
- return this.diagram?.shapes;
163
+ return this.diagramWidget?.shapes;
164
164
  }
165
165
  /**
166
166
  * The actual connections created by the Diagram.
167
167
  */
168
168
  get diagramConnections() {
169
- return this.diagram?.connections;
169
+ return this.diagramWidget?.connections;
170
170
  }
171
171
  /**
172
172
  * @hidden
173
173
  */
174
174
  showLicenseWatermark = false;
175
+ /**
176
+ * @hidden
177
+ */
178
+ licenseMessage;
175
179
  options = {
176
180
  shapes: this.shapes,
177
181
  connections: this.connections,
@@ -182,14 +186,14 @@ export class DiagramComponent {
182
186
  zoomMin: this.zoomMin,
183
187
  zoomRate: this.zoomRate,
184
188
  shapeDefaults: this.shapeDefaults,
185
- connectionDefaults: this.connectionDefaults,
186
- layout: this.layout,
189
+ connectionDefaults: this.connectionDefaults
187
190
  };
188
191
  constructor(wrapperElement, renderer, zone) {
189
192
  this.wrapperElement = wrapperElement;
190
193
  this.renderer = renderer;
191
194
  this.zone = zone;
192
195
  const isValid = validatePackage(packageMetadata);
196
+ this.licenseMessage = getLicenseMessage(packageMetadata);
193
197
  this.showLicenseWatermark = shouldShowValidationUI(isValid);
194
198
  }
195
199
  ngOnChanges(changes) {
@@ -245,14 +249,14 @@ export class DiagramComponent {
245
249
  }
246
250
  if (changes['layout']) {
247
251
  this.updateOptions('layout');
248
- this.diagram?.layout(this.options.layout);
252
+ this.diagramWidget?.layout(this.options.layout);
249
253
  }
250
254
  if (changes['pannable']) {
251
255
  this.updateOptions('pannable');
252
256
  }
253
257
  if (changes['zoom']) {
254
258
  this.updateOptions('zoom');
255
- this.diagram?.zoom(this.diagram.options.zoom);
259
+ this.diagramWidget?.zoom(this.diagramWidget.options.zoom);
256
260
  }
257
261
  if (recreate) {
258
262
  this.init();
@@ -262,7 +266,7 @@ export class DiagramComponent {
262
266
  this.renderer.setStyle(this.wrapperElement.nativeElement, 'display', 'block');
263
267
  this.init();
264
268
  events.forEach((eventName) => {
265
- this.diagram.bind(eventName, (e) => {
269
+ this.diagramWidget.bind(eventName, (e) => {
266
270
  if (eventName === 'click') {
267
271
  eventName = 'diagramClick';
268
272
  }
@@ -285,27 +289,27 @@ export class DiagramComponent {
285
289
  });
286
290
  }
287
291
  ngOnDestroy() {
288
- this.diagram?.destroy();
292
+ this.diagramWidget?.destroy();
289
293
  }
290
294
  /**
291
295
  * Provides the current Diagram's shapes and connections that can be used to create a new Diagram when needed.
292
296
  * @returns {DiagramState} Object containing shapes and connections arrays.
293
297
  */
294
298
  getState() {
295
- return this.diagram?.save();
299
+ return this.diagramWidget?.save();
296
300
  }
297
301
  /**
298
302
  * Focuses the Diagram.
299
303
  * @returns {boolean} true if focus was set successfully.
300
304
  */
301
305
  focus() {
302
- return this.diagram?.focus();
306
+ return this.diagramWidget?.focus();
303
307
  }
304
308
  /**
305
309
  * Clears the Diagram.
306
310
  */
307
311
  clear() {
308
- this.diagram?.clear();
312
+ this.diagramWidget?.clear();
309
313
  }
310
314
  /**
311
315
  * Determines whether two shapes are connected.
@@ -314,7 +318,7 @@ export class DiagramComponent {
314
318
  * @returns {boolean} true if the two shapes are connected.
315
319
  */
316
320
  connected(source, target) {
317
- return this.diagram?.connected(source, target);
321
+ return this.diagramWidget?.connected(source, target);
318
322
  }
319
323
  /**
320
324
  * Adds connection to the Diagram.
@@ -323,7 +327,7 @@ export class DiagramComponent {
323
327
  * @returns {Connection} The newly created connection.
324
328
  */
325
329
  addConnection(connection, undoable) {
326
- const newConnection = this.diagram?.addConnection(connection, undoable);
330
+ const newConnection = this.diagramWidget?.addConnection(connection, undoable);
327
331
  return newConnection;
328
332
  }
329
333
  /**
@@ -333,7 +337,7 @@ export class DiagramComponent {
333
337
  * @returns {Shape} The newly created shape.
334
338
  */
335
339
  addShape(item, undoable) {
336
- const newShape = this.diagram?.addShape(item, undoable);
340
+ const newShape = this.diagramWidget?.addShape(item, undoable);
337
341
  return newShape;
338
342
  }
339
343
  /**
@@ -342,7 +346,7 @@ export class DiagramComponent {
342
346
  * @param {Boolean} Boolean indicating if the action should be undoable.
343
347
  */
344
348
  remove(items, undoable) {
345
- this.diagram?.remove(items, undoable);
349
+ this.diagramWidget?.remove(items, undoable);
346
350
  }
347
351
  /**
348
352
  * Connects two items in the Diagram.
@@ -352,19 +356,19 @@ export class DiagramComponent {
352
356
  * @returns {Connection} The created connection.
353
357
  */
354
358
  connect(source, target, options) {
355
- return this.diagram?.connect(source, target, options);
359
+ return this.diagramWidget?.connect(source, target, options);
356
360
  }
357
361
  /**
358
362
  * Executes the next undoable action on top of the undo stack if any.
359
363
  */
360
364
  undo() {
361
- this.diagram?.undo();
365
+ this.diagramWidget?.undo();
362
366
  }
363
367
  /**
364
368
  * Executes the previous undoable action on top of the redo stack if any.
365
369
  */
366
370
  redo() {
367
- this.diagram?.redo();
371
+ this.diagramWidget?.redo();
368
372
  }
369
373
  /**
370
374
  * Selects items on the basis of the given input.
@@ -373,27 +377,27 @@ export class DiagramComponent {
373
377
  * @returns {(Shape | Connection)[]} Array of selected items.
374
378
  */
375
379
  select(items, options) {
376
- return this.diagram?.select(items, options);
380
+ return this.diagramWidget?.select(items, options);
377
381
  }
378
382
  /**
379
383
  * Selects all items in the Diagram.
380
384
  */
381
385
  selectAll() {
382
- this.diagram?.selectAll();
386
+ this.diagramWidget?.selectAll();
383
387
  }
384
388
  /**
385
389
  * Selects items in the specified area.
386
390
  * @param {Rect} rect Rectangle area to select.
387
391
  */
388
392
  selectArea(rect) {
389
- this.diagram?.selectArea(rect);
393
+ this.diagramWidget?.selectArea(rect);
390
394
  }
391
395
  /**
392
396
  * Deselects the specified items or all items if no item is specified.
393
397
  * @param {Shape | Connection | (Shape | Connection)[]} Shape, Connection or an Array of Shapes and/or Connections.
394
398
  */
395
399
  deselect(items) {
396
- this.diagram?.deselect(items);
400
+ this.diagramWidget?.deselect(items);
397
401
  }
398
402
  /**
399
403
  * Brings to front the passed items.
@@ -401,7 +405,7 @@ export class DiagramComponent {
401
405
  * @param {boolean} By default the action is undoable.
402
406
  */
403
407
  bringToFront(items, undoable) {
404
- this.diagram?.toFront(items, undoable);
408
+ this.diagramWidget?.toFront(items, undoable);
405
409
  }
406
410
  /**
407
411
  * Sends to back the passed items.
@@ -409,7 +413,7 @@ export class DiagramComponent {
409
413
  * @param {boolean} By default the action is undoable.
410
414
  */
411
415
  bringToBack(items, undoable) {
412
- this.diagram?.toBack(items, undoable);
416
+ this.diagramWidget?.toBack(items, undoable);
413
417
  }
414
418
  /**
415
419
  * Bring into view the passed item(s) or rectangle.
@@ -418,14 +422,14 @@ export class DiagramComponent {
418
422
  * "Center middle" will position the items in the center. animate - controls if the pan should be animated.
419
423
  */
420
424
  bringIntoView(item, options) {
421
- this.diagram?.bringIntoView(item, options);
425
+ this.diagramWidget?.bringIntoView(item, options);
422
426
  }
423
427
  /**
424
428
  * Aligns shapes in the specified direction.
425
429
  * @param {Direction} Direction to align shapes.
426
430
  */
427
431
  alignShapes(direction) {
428
- this.diagram?.alignShapes(direction);
432
+ this.diagramWidget?.alignShapes(direction);
429
433
  }
430
434
  /**
431
435
  * @hidden
@@ -435,33 +439,33 @@ export class DiagramComponent {
435
439
  * @returns {Point} Current pan position.
436
440
  */
437
441
  pan(pan, animate) {
438
- return this.diagram?.pan(pan, animate);
442
+ return this.diagramWidget?.pan(pan, animate);
439
443
  }
440
444
  /**
441
445
  * Gets the current `Diagram` viewport rectangle.
442
446
  * @returns {Rect} Viewport rectangle.
443
447
  */
444
448
  viewport() {
445
- return this.diagram?.viewport();
449
+ return this.diagramWidget?.viewport();
446
450
  }
447
451
  /**
448
452
  * Copies selected items to clipboard.
449
453
  */
450
454
  copy() {
451
- this.diagram?.copy();
455
+ this.diagramWidget?.copy();
452
456
  }
453
457
  /**
454
458
  * @hidden
455
459
  * Cuts selected items to clipboard.
456
460
  */
457
461
  cut() {
458
- this.diagram?.cut();
462
+ this.diagramWidget?.cut();
459
463
  }
460
464
  /**
461
465
  * Pastes items from clipboard.
462
466
  */
463
467
  paste() {
464
- this.diagram?.paste();
468
+ this.diagramWidget?.paste();
465
469
  }
466
470
  /**
467
471
  * Gets the bounding rectangle of the given items.
@@ -470,7 +474,7 @@ export class DiagramComponent {
470
474
  * @returns {Rect} Bounding rectangle.
471
475
  */
472
476
  boundingBox(items, origin) {
473
- return this.diagram?.boundingBox(items, origin);
477
+ return this.diagramWidget?.boundingBox(items, origin);
474
478
  }
475
479
  /**
476
480
  * Converts document coordinates to view coordinates.
@@ -478,7 +482,7 @@ export class DiagramComponent {
478
482
  * @returns {Point} Point in view coordinates.
479
483
  */
480
484
  documentToView(point) {
481
- return this.diagram?.documentToView(point);
485
+ return this.diagramWidget?.documentToView(point);
482
486
  }
483
487
  /**
484
488
  * Converts view coordinates to document coordinates.
@@ -486,7 +490,7 @@ export class DiagramComponent {
486
490
  * @returns {Point} Point in document coordinates.
487
491
  */
488
492
  viewToDocument(point) {
489
- return this.diagram?.viewToDocument(point);
493
+ return this.diagramWidget?.viewToDocument(point);
490
494
  }
491
495
  /**
492
496
  * Converts view coordinates to model coordinates.
@@ -494,7 +498,7 @@ export class DiagramComponent {
494
498
  * @returns {Point} Point in model coordinates.
495
499
  */
496
500
  viewToModel(point) {
497
- return this.diagram?.viewToModel(point);
501
+ return this.diagramWidget?.viewToModel(point);
498
502
  }
499
503
  /**
500
504
  * Converts model coordinates to view coordinates.
@@ -502,7 +506,7 @@ export class DiagramComponent {
502
506
  * @returns {Point} Point in view coordinates.
503
507
  */
504
508
  modelToView(point) {
505
- return this.diagram?.modelToView(point);
509
+ return this.diagramWidget?.modelToView(point);
506
510
  }
507
511
  /**
508
512
  * Converts model coordinates to layer coordinates.
@@ -510,7 +514,7 @@ export class DiagramComponent {
510
514
  * @returns {Point} Point in layer coordinates.
511
515
  */
512
516
  modelToLayer(point) {
513
- return this.diagram?.modelToLayer(point);
517
+ return this.diagramWidget?.modelToLayer(point);
514
518
  }
515
519
  /**
516
520
  * Converts layer coordinates to model coordinates.
@@ -518,7 +522,7 @@ export class DiagramComponent {
518
522
  * @returns {Point} Point in model coordinates.
519
523
  */
520
524
  layerToModel(point) {
521
- return this.diagram?.layerToModel(point);
525
+ return this.diagramWidget?.layerToModel(point);
522
526
  }
523
527
  /**
524
528
  * Converts document coordinates to model coordinates.
@@ -526,7 +530,7 @@ export class DiagramComponent {
526
530
  * @returns {Point} Point in model coordinates.
527
531
  */
528
532
  documentToModel(point) {
529
- return this.diagram?.documentToModel(point);
533
+ return this.diagramWidget?.documentToModel(point);
530
534
  }
531
535
  /**
532
536
  * Converts model coordinates to document coordinates.
@@ -534,7 +538,7 @@ export class DiagramComponent {
534
538
  * @returns {Point} Point in document coordinates.
535
539
  */
536
540
  modelToDocument(point) {
537
- return this.diagram?.modelToDocument(point);
541
+ return this.diagramWidget?.modelToDocument(point);
538
542
  }
539
543
  /**
540
544
  * Gets a shape on the basis of its identifier.
@@ -542,7 +546,7 @@ export class DiagramComponent {
542
546
  * @returns {Shape} The shape with the specified ID.
543
547
  */
544
548
  getShapeById(id) {
545
- return this.diagram?.getShapeById(id);
549
+ return this.diagramWidget?.getShapeById(id);
546
550
  }
547
551
  /**
548
552
  * Exports the diagram's DOM visual representation for rendering or export purposes.
@@ -550,7 +554,7 @@ export class DiagramComponent {
550
554
  * @returns {Group} A drawing Group element containing the exported DOM visual
551
555
  */
552
556
  exportDOMVisual() {
553
- return this.diagram?.exportDOMVisual();
557
+ return this.diagramWidget?.exportDOMVisual();
554
558
  }
555
559
  /**
556
560
  * Exports the diagram's visual representation with proper scaling based on zoom level.
@@ -558,7 +562,7 @@ export class DiagramComponent {
558
562
  * @returns {Group} A drawing Group element containing the exported visual with inverse zoom scaling
559
563
  */
560
564
  exportVisual() {
561
- return this.diagram?.exportVisual();
565
+ return this.diagramWidget?.exportVisual();
562
566
  }
563
567
  activeEmitter(name) {
564
568
  const emitter = this[name];
@@ -567,26 +571,28 @@ export class DiagramComponent {
567
571
  }
568
572
  }
569
573
  init() {
570
- if (this.diagram) {
571
- this.diagram.destroy();
574
+ if (!isDocumentAvailable) {
575
+ return;
576
+ }
577
+ if (this.diagramWidget) {
578
+ this.diagramWidget.destroy();
572
579
  }
573
580
  this.zone.runOutsideAngular(() => {
574
581
  const theme = loadTheme(this.wrapperElement.nativeElement);
575
- this.diagram = new Diagram(this.wrapperElement.nativeElement, this.options, theme);
576
- this.diagram._createOptionElements();
577
- this.diagram.zoom(this.diagram.options.zoom);
578
- this.diagram.canvas.draw();
579
- this.diagram.bringIntoView(this.diagram.shapes);
582
+ this.diagramWidget = new Diagram(this.wrapperElement.nativeElement, this.options, theme);
583
+ this.diagramWidget._createOptionElements();
584
+ this.diagramWidget.zoom(this.diagramWidget.options.zoom);
585
+ this.diagramWidget.canvas.draw();
580
586
  });
581
587
  }
582
588
  updateOptions(prop) {
583
589
  this.options[prop] = this[prop];
584
- this.diagram?.setOptions(this.options);
590
+ this.diagramWidget?.setOptions(this.options);
585
591
  }
586
592
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DiagramComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
587
593
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DiagramComponent, isStandalone: true, selector: "kendo-diagram", inputs: { connectionDefaults: "connectionDefaults", connections: "connections", editable: "editable", layout: "layout", pannable: "pannable", selectable: "selectable", shapeDefaults: "shapeDefaults", shapes: "shapes", zoom: "zoom", zoomMax: "zoomMax", zoomMin: "zoomMin", zoomRate: "zoomRate" }, outputs: { change: "change", diagramClick: "diagramClick", drag: "drag", dragEnd: "dragEnd", dragStart: "dragStart", shapeBoundsChange: "shapeBoundsChange", mouseEnter: "mouseEnter", mouseLeave: "mouseLeave", onPan: "pan", onSelect: "select", zoomEnd: "zoomEnd", zoomStart: "zoomStart" }, host: { properties: { "class.k-diagram": "this.diagramClass" } }, exportAs: ["kendoDiagram"], usesOnChanges: true, ngImport: i0, template: `
588
- <div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
589
- `, isInline: true, dependencies: [{ kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
594
+ <div kendoWatermarkOverlay *ngIf="showLicenseWatermark" [licenseMessage]="licenseMessage"></div>
595
+ `, isInline: true, dependencies: [{ kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]", inputs: ["licenseMessage"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
590
596
  }
591
597
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DiagramComponent, decorators: [{
592
598
  type: Component,
@@ -595,7 +601,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
595
601
  exportAs: 'kendoDiagram',
596
602
  selector: 'kendo-diagram',
597
603
  template: `
598
- <div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
604
+ <div kendoWatermarkOverlay *ngIf="showLicenseWatermark" [licenseMessage]="licenseMessage"></div>
599
605
  `,
600
606
  imports: [WatermarkOverlayComponent, NgIf]
601
607
  }]
package/esm2022/index.mjs CHANGED
@@ -2,7 +2,7 @@
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
- export { Shape, Connection, Connector, Diagram, Point, Rect } from '@progress/kendo-diagram-common';
5
+ export { Shape, Connection, Connector, Diagram, Point, Rect, Circle, Group, FlowchartShapeType, ArrowMarker, CircleMarker, Collate, DataInputOutput, DataStorage, Database, Decision, Delay, DirectAccessStorage, Display, Document, MultipleDocuments, Extract, Image, InternalStorage, Layout, Line, LogicalOr, ManualInputOutput, ManualOperation, Merge, MultiLineTextBlock, OffPageConnector, OnPageConnector, Path, Polyline, PredefinedProcess, Preparation, Process, Rectangle, Sort, SummingJunction, Terminator, TextBlock, MarkerType } from '@progress/kendo-diagram-common';
6
6
  export { DiagramModule } from './diagram.module';
7
7
  export { DiagramComponent } from './diagram.component';
8
8
  export * from './directives';
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-diagrams',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1752672505,
13
- version: '19.3.0-develop.9',
12
+ publishDate: 1755502878,
13
+ version: '19.3.1-develop.1',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning',
15
15
  };
@@ -3,11 +3,11 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { events, loadTheme, Diagram } from '@progress/kendo-diagram-common';
6
- export { Connection, Connector, Diagram, Point, Rect, Shape } from '@progress/kendo-diagram-common';
6
+ export { ArrowMarker, Circle, CircleMarker, Collate, Connection, Connector, DataInputOutput, DataStorage, Database, Decision, Delay, Diagram, DirectAccessStorage, Display, Document, Extract, FlowchartShapeType, Group, Image, InternalStorage, Layout, Line, LogicalOr, ManualInputOutput, ManualOperation, MarkerType, Merge, MultiLineTextBlock, MultipleDocuments, OffPageConnector, OnPageConnector, Path, Point, Polyline, PredefinedProcess, Preparation, Process, Rect, Rectangle, Shape, Sort, SummingJunction, Terminator, TextBlock } from '@progress/kendo-diagram-common';
7
7
  import * as i0 from '@angular/core';
8
8
  import { EventEmitter, Component, HostBinding, Input, Output, NgModule } from '@angular/core';
9
9
  import { validatePackage } from '@progress/kendo-licensing';
10
- import { shouldShowValidationUI, hasObservers, WatermarkOverlayComponent } from '@progress/kendo-angular-common';
10
+ import { getLicenseMessage, shouldShowValidationUI, hasObservers, isDocumentAvailable, WatermarkOverlayComponent } from '@progress/kendo-angular-common';
11
11
  import { NgIf } from '@angular/common';
12
12
 
13
13
  /**
@@ -17,8 +17,8 @@ const packageMetadata = {
17
17
  name: '@progress/kendo-angular-diagrams',
18
18
  productName: 'Kendo UI for Angular',
19
19
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
20
- publishDate: 1752672505,
21
- version: '19.3.0-develop.9',
20
+ publishDate: 1755502878,
21
+ version: '19.3.1-develop.1',
22
22
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning',
23
23
  };
24
24
 
@@ -49,7 +49,7 @@ const SHAPE_DEFAULTS = {
49
49
  };
50
50
 
51
51
  /**
52
- * Represents the [Kendo UI Diagram component for Angular({% slug overview_diagrams %}).
52
+ * Represents the [Kendo UI Diagram component for Angular](slug:overview_diagram).
53
53
  *
54
54
  * The Diagram component is used to create organizational charts, and other types of diagrams.
55
55
  *
@@ -72,7 +72,7 @@ class DiagramComponent {
72
72
  * Defines the connections that render between the shapes in the Diagram.
73
73
  * Changing this property dynamically reinitializes the Diagram.
74
74
  */
75
- connections;
75
+ connections = [];
76
76
  /**
77
77
  * A set of settings to configure the Diagram behavior when the user attempts to drag, resize, or remove shapes.
78
78
  * Changing the property value dynamically triggers a reinitialization of the Diagram.
@@ -83,7 +83,7 @@ class DiagramComponent {
83
83
  * The layout of a diagram consists of arranging the shapes (sometimes also the connections) in some fashion in order to achieve an aesthetically pleasing experience to the user.
84
84
  * Changing the property value dynamically triggers a reinitialization of the Diagram.
85
85
  */
86
- layout = { type: 'tree' };
86
+ layout;
87
87
  /**
88
88
  * Defines the pannable options. Use this setting to disable Diagram pan or change the key that activates the pan behavior.
89
89
  * @default true
@@ -109,7 +109,7 @@ class DiagramComponent {
109
109
  * Defines the shapes that render in the Diagram.
110
110
  * Changing the property value dynamically triggers a reinitialization of the Diagram.
111
111
  */
112
- shapes;
112
+ shapes = [];
113
113
  /**
114
114
  * Defines the zoom level of the Diagram.
115
115
  *
@@ -186,29 +186,33 @@ class DiagramComponent {
186
186
  * @hidden
187
187
  * Represents the Diagram instance, holding the core functionality of the Diagram.
188
188
  */
189
- diagram;
189
+ diagramWidget;
190
190
  /**
191
191
  * The currently selected items in the Diagram.
192
192
  */
193
193
  get selection() {
194
- return this.diagram?.select();
194
+ return this.diagramWidget?.select();
195
195
  }
196
196
  /**
197
197
  * The actual shapes created by the Diagram.
198
198
  */
199
199
  get diagramShapes() {
200
- return this.diagram?.shapes;
200
+ return this.diagramWidget?.shapes;
201
201
  }
202
202
  /**
203
203
  * The actual connections created by the Diagram.
204
204
  */
205
205
  get diagramConnections() {
206
- return this.diagram?.connections;
206
+ return this.diagramWidget?.connections;
207
207
  }
208
208
  /**
209
209
  * @hidden
210
210
  */
211
211
  showLicenseWatermark = false;
212
+ /**
213
+ * @hidden
214
+ */
215
+ licenseMessage;
212
216
  options = {
213
217
  shapes: this.shapes,
214
218
  connections: this.connections,
@@ -219,14 +223,14 @@ class DiagramComponent {
219
223
  zoomMin: this.zoomMin,
220
224
  zoomRate: this.zoomRate,
221
225
  shapeDefaults: this.shapeDefaults,
222
- connectionDefaults: this.connectionDefaults,
223
- layout: this.layout,
226
+ connectionDefaults: this.connectionDefaults
224
227
  };
225
228
  constructor(wrapperElement, renderer, zone) {
226
229
  this.wrapperElement = wrapperElement;
227
230
  this.renderer = renderer;
228
231
  this.zone = zone;
229
232
  const isValid = validatePackage(packageMetadata);
233
+ this.licenseMessage = getLicenseMessage(packageMetadata);
230
234
  this.showLicenseWatermark = shouldShowValidationUI(isValid);
231
235
  }
232
236
  ngOnChanges(changes) {
@@ -282,14 +286,14 @@ class DiagramComponent {
282
286
  }
283
287
  if (changes['layout']) {
284
288
  this.updateOptions('layout');
285
- this.diagram?.layout(this.options.layout);
289
+ this.diagramWidget?.layout(this.options.layout);
286
290
  }
287
291
  if (changes['pannable']) {
288
292
  this.updateOptions('pannable');
289
293
  }
290
294
  if (changes['zoom']) {
291
295
  this.updateOptions('zoom');
292
- this.diagram?.zoom(this.diagram.options.zoom);
296
+ this.diagramWidget?.zoom(this.diagramWidget.options.zoom);
293
297
  }
294
298
  if (recreate) {
295
299
  this.init();
@@ -299,7 +303,7 @@ class DiagramComponent {
299
303
  this.renderer.setStyle(this.wrapperElement.nativeElement, 'display', 'block');
300
304
  this.init();
301
305
  events.forEach((eventName) => {
302
- this.diagram.bind(eventName, (e) => {
306
+ this.diagramWidget.bind(eventName, (e) => {
303
307
  if (eventName === 'click') {
304
308
  eventName = 'diagramClick';
305
309
  }
@@ -322,27 +326,27 @@ class DiagramComponent {
322
326
  });
323
327
  }
324
328
  ngOnDestroy() {
325
- this.diagram?.destroy();
329
+ this.diagramWidget?.destroy();
326
330
  }
327
331
  /**
328
332
  * Provides the current Diagram's shapes and connections that can be used to create a new Diagram when needed.
329
333
  * @returns {DiagramState} Object containing shapes and connections arrays.
330
334
  */
331
335
  getState() {
332
- return this.diagram?.save();
336
+ return this.diagramWidget?.save();
333
337
  }
334
338
  /**
335
339
  * Focuses the Diagram.
336
340
  * @returns {boolean} true if focus was set successfully.
337
341
  */
338
342
  focus() {
339
- return this.diagram?.focus();
343
+ return this.diagramWidget?.focus();
340
344
  }
341
345
  /**
342
346
  * Clears the Diagram.
343
347
  */
344
348
  clear() {
345
- this.diagram?.clear();
349
+ this.diagramWidget?.clear();
346
350
  }
347
351
  /**
348
352
  * Determines whether two shapes are connected.
@@ -351,7 +355,7 @@ class DiagramComponent {
351
355
  * @returns {boolean} true if the two shapes are connected.
352
356
  */
353
357
  connected(source, target) {
354
- return this.diagram?.connected(source, target);
358
+ return this.diagramWidget?.connected(source, target);
355
359
  }
356
360
  /**
357
361
  * Adds connection to the Diagram.
@@ -360,7 +364,7 @@ class DiagramComponent {
360
364
  * @returns {Connection} The newly created connection.
361
365
  */
362
366
  addConnection(connection, undoable) {
363
- const newConnection = this.diagram?.addConnection(connection, undoable);
367
+ const newConnection = this.diagramWidget?.addConnection(connection, undoable);
364
368
  return newConnection;
365
369
  }
366
370
  /**
@@ -370,7 +374,7 @@ class DiagramComponent {
370
374
  * @returns {Shape} The newly created shape.
371
375
  */
372
376
  addShape(item, undoable) {
373
- const newShape = this.diagram?.addShape(item, undoable);
377
+ const newShape = this.diagramWidget?.addShape(item, undoable);
374
378
  return newShape;
375
379
  }
376
380
  /**
@@ -379,7 +383,7 @@ class DiagramComponent {
379
383
  * @param {Boolean} Boolean indicating if the action should be undoable.
380
384
  */
381
385
  remove(items, undoable) {
382
- this.diagram?.remove(items, undoable);
386
+ this.diagramWidget?.remove(items, undoable);
383
387
  }
384
388
  /**
385
389
  * Connects two items in the Diagram.
@@ -389,19 +393,19 @@ class DiagramComponent {
389
393
  * @returns {Connection} The created connection.
390
394
  */
391
395
  connect(source, target, options) {
392
- return this.diagram?.connect(source, target, options);
396
+ return this.diagramWidget?.connect(source, target, options);
393
397
  }
394
398
  /**
395
399
  * Executes the next undoable action on top of the undo stack if any.
396
400
  */
397
401
  undo() {
398
- this.diagram?.undo();
402
+ this.diagramWidget?.undo();
399
403
  }
400
404
  /**
401
405
  * Executes the previous undoable action on top of the redo stack if any.
402
406
  */
403
407
  redo() {
404
- this.diagram?.redo();
408
+ this.diagramWidget?.redo();
405
409
  }
406
410
  /**
407
411
  * Selects items on the basis of the given input.
@@ -410,27 +414,27 @@ class DiagramComponent {
410
414
  * @returns {(Shape | Connection)[]} Array of selected items.
411
415
  */
412
416
  select(items, options) {
413
- return this.diagram?.select(items, options);
417
+ return this.diagramWidget?.select(items, options);
414
418
  }
415
419
  /**
416
420
  * Selects all items in the Diagram.
417
421
  */
418
422
  selectAll() {
419
- this.diagram?.selectAll();
423
+ this.diagramWidget?.selectAll();
420
424
  }
421
425
  /**
422
426
  * Selects items in the specified area.
423
427
  * @param {Rect} rect Rectangle area to select.
424
428
  */
425
429
  selectArea(rect) {
426
- this.diagram?.selectArea(rect);
430
+ this.diagramWidget?.selectArea(rect);
427
431
  }
428
432
  /**
429
433
  * Deselects the specified items or all items if no item is specified.
430
434
  * @param {Shape | Connection | (Shape | Connection)[]} Shape, Connection or an Array of Shapes and/or Connections.
431
435
  */
432
436
  deselect(items) {
433
- this.diagram?.deselect(items);
437
+ this.diagramWidget?.deselect(items);
434
438
  }
435
439
  /**
436
440
  * Brings to front the passed items.
@@ -438,7 +442,7 @@ class DiagramComponent {
438
442
  * @param {boolean} By default the action is undoable.
439
443
  */
440
444
  bringToFront(items, undoable) {
441
- this.diagram?.toFront(items, undoable);
445
+ this.diagramWidget?.toFront(items, undoable);
442
446
  }
443
447
  /**
444
448
  * Sends to back the passed items.
@@ -446,7 +450,7 @@ class DiagramComponent {
446
450
  * @param {boolean} By default the action is undoable.
447
451
  */
448
452
  bringToBack(items, undoable) {
449
- this.diagram?.toBack(items, undoable);
453
+ this.diagramWidget?.toBack(items, undoable);
450
454
  }
451
455
  /**
452
456
  * Bring into view the passed item(s) or rectangle.
@@ -455,14 +459,14 @@ class DiagramComponent {
455
459
  * "Center middle" will position the items in the center. animate - controls if the pan should be animated.
456
460
  */
457
461
  bringIntoView(item, options) {
458
- this.diagram?.bringIntoView(item, options);
462
+ this.diagramWidget?.bringIntoView(item, options);
459
463
  }
460
464
  /**
461
465
  * Aligns shapes in the specified direction.
462
466
  * @param {Direction} Direction to align shapes.
463
467
  */
464
468
  alignShapes(direction) {
465
- this.diagram?.alignShapes(direction);
469
+ this.diagramWidget?.alignShapes(direction);
466
470
  }
467
471
  /**
468
472
  * @hidden
@@ -472,33 +476,33 @@ class DiagramComponent {
472
476
  * @returns {Point} Current pan position.
473
477
  */
474
478
  pan(pan, animate) {
475
- return this.diagram?.pan(pan, animate);
479
+ return this.diagramWidget?.pan(pan, animate);
476
480
  }
477
481
  /**
478
482
  * Gets the current `Diagram` viewport rectangle.
479
483
  * @returns {Rect} Viewport rectangle.
480
484
  */
481
485
  viewport() {
482
- return this.diagram?.viewport();
486
+ return this.diagramWidget?.viewport();
483
487
  }
484
488
  /**
485
489
  * Copies selected items to clipboard.
486
490
  */
487
491
  copy() {
488
- this.diagram?.copy();
492
+ this.diagramWidget?.copy();
489
493
  }
490
494
  /**
491
495
  * @hidden
492
496
  * Cuts selected items to clipboard.
493
497
  */
494
498
  cut() {
495
- this.diagram?.cut();
499
+ this.diagramWidget?.cut();
496
500
  }
497
501
  /**
498
502
  * Pastes items from clipboard.
499
503
  */
500
504
  paste() {
501
- this.diagram?.paste();
505
+ this.diagramWidget?.paste();
502
506
  }
503
507
  /**
504
508
  * Gets the bounding rectangle of the given items.
@@ -507,7 +511,7 @@ class DiagramComponent {
507
511
  * @returns {Rect} Bounding rectangle.
508
512
  */
509
513
  boundingBox(items, origin) {
510
- return this.diagram?.boundingBox(items, origin);
514
+ return this.diagramWidget?.boundingBox(items, origin);
511
515
  }
512
516
  /**
513
517
  * Converts document coordinates to view coordinates.
@@ -515,7 +519,7 @@ class DiagramComponent {
515
519
  * @returns {Point} Point in view coordinates.
516
520
  */
517
521
  documentToView(point) {
518
- return this.diagram?.documentToView(point);
522
+ return this.diagramWidget?.documentToView(point);
519
523
  }
520
524
  /**
521
525
  * Converts view coordinates to document coordinates.
@@ -523,7 +527,7 @@ class DiagramComponent {
523
527
  * @returns {Point} Point in document coordinates.
524
528
  */
525
529
  viewToDocument(point) {
526
- return this.diagram?.viewToDocument(point);
530
+ return this.diagramWidget?.viewToDocument(point);
527
531
  }
528
532
  /**
529
533
  * Converts view coordinates to model coordinates.
@@ -531,7 +535,7 @@ class DiagramComponent {
531
535
  * @returns {Point} Point in model coordinates.
532
536
  */
533
537
  viewToModel(point) {
534
- return this.diagram?.viewToModel(point);
538
+ return this.diagramWidget?.viewToModel(point);
535
539
  }
536
540
  /**
537
541
  * Converts model coordinates to view coordinates.
@@ -539,7 +543,7 @@ class DiagramComponent {
539
543
  * @returns {Point} Point in view coordinates.
540
544
  */
541
545
  modelToView(point) {
542
- return this.diagram?.modelToView(point);
546
+ return this.diagramWidget?.modelToView(point);
543
547
  }
544
548
  /**
545
549
  * Converts model coordinates to layer coordinates.
@@ -547,7 +551,7 @@ class DiagramComponent {
547
551
  * @returns {Point} Point in layer coordinates.
548
552
  */
549
553
  modelToLayer(point) {
550
- return this.diagram?.modelToLayer(point);
554
+ return this.diagramWidget?.modelToLayer(point);
551
555
  }
552
556
  /**
553
557
  * Converts layer coordinates to model coordinates.
@@ -555,7 +559,7 @@ class DiagramComponent {
555
559
  * @returns {Point} Point in model coordinates.
556
560
  */
557
561
  layerToModel(point) {
558
- return this.diagram?.layerToModel(point);
562
+ return this.diagramWidget?.layerToModel(point);
559
563
  }
560
564
  /**
561
565
  * Converts document coordinates to model coordinates.
@@ -563,7 +567,7 @@ class DiagramComponent {
563
567
  * @returns {Point} Point in model coordinates.
564
568
  */
565
569
  documentToModel(point) {
566
- return this.diagram?.documentToModel(point);
570
+ return this.diagramWidget?.documentToModel(point);
567
571
  }
568
572
  /**
569
573
  * Converts model coordinates to document coordinates.
@@ -571,7 +575,7 @@ class DiagramComponent {
571
575
  * @returns {Point} Point in document coordinates.
572
576
  */
573
577
  modelToDocument(point) {
574
- return this.diagram?.modelToDocument(point);
578
+ return this.diagramWidget?.modelToDocument(point);
575
579
  }
576
580
  /**
577
581
  * Gets a shape on the basis of its identifier.
@@ -579,7 +583,7 @@ class DiagramComponent {
579
583
  * @returns {Shape} The shape with the specified ID.
580
584
  */
581
585
  getShapeById(id) {
582
- return this.diagram?.getShapeById(id);
586
+ return this.diagramWidget?.getShapeById(id);
583
587
  }
584
588
  /**
585
589
  * Exports the diagram's DOM visual representation for rendering or export purposes.
@@ -587,7 +591,7 @@ class DiagramComponent {
587
591
  * @returns {Group} A drawing Group element containing the exported DOM visual
588
592
  */
589
593
  exportDOMVisual() {
590
- return this.diagram?.exportDOMVisual();
594
+ return this.diagramWidget?.exportDOMVisual();
591
595
  }
592
596
  /**
593
597
  * Exports the diagram's visual representation with proper scaling based on zoom level.
@@ -595,7 +599,7 @@ class DiagramComponent {
595
599
  * @returns {Group} A drawing Group element containing the exported visual with inverse zoom scaling
596
600
  */
597
601
  exportVisual() {
598
- return this.diagram?.exportVisual();
602
+ return this.diagramWidget?.exportVisual();
599
603
  }
600
604
  activeEmitter(name) {
601
605
  const emitter = this[name];
@@ -604,26 +608,28 @@ class DiagramComponent {
604
608
  }
605
609
  }
606
610
  init() {
607
- if (this.diagram) {
608
- this.diagram.destroy();
611
+ if (!isDocumentAvailable) {
612
+ return;
613
+ }
614
+ if (this.diagramWidget) {
615
+ this.diagramWidget.destroy();
609
616
  }
610
617
  this.zone.runOutsideAngular(() => {
611
618
  const theme = loadTheme(this.wrapperElement.nativeElement);
612
- this.diagram = new Diagram(this.wrapperElement.nativeElement, this.options, theme);
613
- this.diagram._createOptionElements();
614
- this.diagram.zoom(this.diagram.options.zoom);
615
- this.diagram.canvas.draw();
616
- this.diagram.bringIntoView(this.diagram.shapes);
619
+ this.diagramWidget = new Diagram(this.wrapperElement.nativeElement, this.options, theme);
620
+ this.diagramWidget._createOptionElements();
621
+ this.diagramWidget.zoom(this.diagramWidget.options.zoom);
622
+ this.diagramWidget.canvas.draw();
617
623
  });
618
624
  }
619
625
  updateOptions(prop) {
620
626
  this.options[prop] = this[prop];
621
- this.diagram?.setOptions(this.options);
627
+ this.diagramWidget?.setOptions(this.options);
622
628
  }
623
629
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DiagramComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
624
630
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DiagramComponent, isStandalone: true, selector: "kendo-diagram", inputs: { connectionDefaults: "connectionDefaults", connections: "connections", editable: "editable", layout: "layout", pannable: "pannable", selectable: "selectable", shapeDefaults: "shapeDefaults", shapes: "shapes", zoom: "zoom", zoomMax: "zoomMax", zoomMin: "zoomMin", zoomRate: "zoomRate" }, outputs: { change: "change", diagramClick: "diagramClick", drag: "drag", dragEnd: "dragEnd", dragStart: "dragStart", shapeBoundsChange: "shapeBoundsChange", mouseEnter: "mouseEnter", mouseLeave: "mouseLeave", onPan: "pan", onSelect: "select", zoomEnd: "zoomEnd", zoomStart: "zoomStart" }, host: { properties: { "class.k-diagram": "this.diagramClass" } }, exportAs: ["kendoDiagram"], usesOnChanges: true, ngImport: i0, template: `
625
- <div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
626
- `, isInline: true, dependencies: [{ kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
631
+ <div kendoWatermarkOverlay *ngIf="showLicenseWatermark" [licenseMessage]="licenseMessage"></div>
632
+ `, isInline: true, dependencies: [{ kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]", inputs: ["licenseMessage"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
627
633
  }
628
634
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DiagramComponent, decorators: [{
629
635
  type: Component,
@@ -632,7 +638,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
632
638
  exportAs: 'kendoDiagram',
633
639
  selector: 'kendo-diagram',
634
640
  template: `
635
- <div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
641
+ <div kendoWatermarkOverlay *ngIf="showLicenseWatermark" [licenseMessage]="licenseMessage"></div>
636
642
  `,
637
643
  imports: [WatermarkOverlayComponent, NgIf]
638
644
  }]
package/index.d.ts CHANGED
@@ -2,7 +2,7 @@
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
- export { DiagramOptions, ShapeConnector, ShapeContent, EditableDefaults, ShapeDefaultsEditable, ShapeEditable, ShapeFillGradientStop, ShapeFillGradient, ShapeFill, ShapeHover, ShapeRotation, Fill, Stroke, DashType, ShapeType, ShapeConnectorHover, ShapeConnectorDefaults, ShapeDefaults, ShapeOptions, Selectable, Pannable, LayoutGrid, DiagramLayout, DiagramEditable, Coordinate, ConnectionOptions, ConnectionDefaults, DiagramDragEvent, DiagramDomEvent, DiagramZoomStartEvent, DiagramZoomEndEvent, DiagramPanEvent, DiagramSelectEvent, DiagramChangeEvent, DiagramItemBoundsChangeEvent, Shape, Connection, Connector, Diagram, Point, Rect, DiagramState, BringIntoViewOptions, SelectionOptions, Direction } from '@progress/kendo-diagram-common';
5
+ export { DiagramOptions, ShapeConnector, ShapeContent, EditableDefaults, ShapeDefaultsEditable, ShapeEditable, ShapeFillGradientStop, ShapeFillGradient, ShapeFill, ShapeHover, ShapeRotation, Fill, Stroke, DashType, ShapeType, ShapeConnectorHover, ShapeConnectorDefaults, ShapeDefaults, ShapeOptions, Selectable, Pannable, LayoutGrid, DiagramLayout, DiagramEditable, Coordinate, ConnectionOptions, ConnectionDefaults, DiagramDragEvent, DiagramDomEvent, DiagramZoomStartEvent, DiagramZoomEndEvent, DiagramPanEvent, DiagramSelectEvent, DiagramChangeEvent, DiagramItemBoundsChangeEvent, Shape, Connection, Connector, Diagram, Point, Rect, DiagramState, BringIntoViewOptions, SelectionOptions, Direction, Circle, Group, FlowchartShapeType, ArrowMarker, CircleMarker, Collate, DataInputOutput, DataStorage, Database, Decision, Delay, DirectAccessStorage, Display, Document, MultipleDocuments, Extract, Image, InternalStorage, Layout, Line, LogicalOr, ManualInputOutput, ManualOperation, Merge, MultiLineTextBlock, OffPageConnector, OnPageConnector, Path, Polyline, PredefinedProcess, Preparation, Process, Rectangle, Sort, SummingJunction, Terminator, TextBlock, MarkerType } from '@progress/kendo-diagram-common';
6
6
  export { DiagramModule } from './diagram.module';
7
7
  export { DiagramComponent } from './diagram.component';
8
8
  export * from './directives';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-diagrams",
3
- "version": "19.3.0-develop.9",
3
+ "version": "19.3.1-develop.1",
4
4
  "description": "Kendo UI Angular diagrams component",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -18,7 +18,7 @@
18
18
  "friendlyName": "Diagrams",
19
19
  "package": {
20
20
  "productName": "Kendo UI for Angular",
21
- "publishDate": 1752672505,
21
+ "publishDate": 1755502878,
22
22
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"
23
23
  }
24
24
  },
@@ -27,20 +27,20 @@
27
27
  "@angular/common": "16 - 20",
28
28
  "@angular/core": "16 - 20",
29
29
  "@angular/platform-browser": "16 - 20",
30
- "@progress/kendo-licensing": "^1.5.0",
31
- "@progress/kendo-angular-common": "19.3.0-develop.9",
32
- "@progress/kendo-angular-buttons": "19.3.0-develop.9",
33
- "@progress/kendo-angular-dialog": "19.3.0-develop.9",
34
- "@progress/kendo-angular-dropdowns": "19.3.0-develop.9",
35
- "@progress/kendo-angular-icons": "19.3.0-develop.9",
36
- "@progress/kendo-angular-inputs": "19.3.0-develop.9",
37
- "@progress/kendo-angular-popup": "19.3.0-develop.9",
30
+ "@progress/kendo-licensing": "^1.7.0",
31
+ "@progress/kendo-angular-common": "19.3.1-develop.1",
32
+ "@progress/kendo-angular-buttons": "19.3.1-develop.1",
33
+ "@progress/kendo-angular-dialog": "19.3.1-develop.1",
34
+ "@progress/kendo-angular-dropdowns": "19.3.1-develop.1",
35
+ "@progress/kendo-angular-icons": "19.3.1-develop.1",
36
+ "@progress/kendo-angular-inputs": "19.3.1-develop.1",
37
+ "@progress/kendo-angular-popup": "19.3.1-develop.1",
38
38
  "rxjs": "^6.5.3 || ^7.0.0"
39
39
  },
40
40
  "dependencies": {
41
41
  "tslib": "^2.3.1",
42
- "@progress/kendo-angular-schematics": "19.3.0-develop.9",
43
- "@progress/kendo-diagram-common": "1.1.0"
42
+ "@progress/kendo-angular-schematics": "19.3.1-develop.1",
43
+ "@progress/kendo-diagram-common": "1.2.2"
44
44
  },
45
45
  "schematics": "./schematics/collection.json",
46
46
  "module": "fesm2022/progress-kendo-angular-diagrams.mjs",