@mindfusion/diagramming-controls 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,792 @@
1
+ /// <reference types="../../@mindfusion/controls" />
2
+ /// <reference types="../../@mindfusion/diagramming" />
3
+ /// <reference types="../../@mindfusion/common-ui" />
4
+ /// <reference types="../../@mindfusion/common-collections" />
5
+ /// <reference types="../../@mindfusion/drawing" />
6
+ declare module "Diagramming.Controls/Enum" {
7
+ /**
8
+ * Specifies the alignment of a tab strip relative to its container control.
9
+ */
10
+ export type TabAlignment = number;
11
+ export namespace TabAlignment {
12
+ const None: number;
13
+ const Top: number;
14
+ const Bottom: number;
15
+ }
16
+ export namespace AnchorType {
17
+ const In: number;
18
+ const Out: number;
19
+ const BothWays: number;
20
+ }
21
+ }
22
+ declare module "Diagramming.Controls/Events" {
23
+ /**
24
+ * @namespace MindFusion.Diagramming.Controls
25
+ */
26
+ /**
27
+ * @class Defines all events raised by the controls in the MindFusion.Diagrammming.Controls namespace.
28
+ */
29
+ export class Events {
30
+ /**
31
+ * Raised before the selected page in a TabbedDiagramView control is changed.
32
+ * @type {String}
33
+ * @summary A string containing the event name.
34
+ */
35
+ static get pageChanging(): string;
36
+ /**
37
+ * Raised when the selected page in a TabbedDiagramView control has changed.
38
+ * @type {String}
39
+ * @summary A string containing the event name.
40
+ */
41
+ static get pageChanged(): string;
42
+ /**
43
+ * Raised before a page is added to a TabbedDiagramView control.
44
+ * @type {String}
45
+ * @summary A string containing the event name.
46
+ */
47
+ static get pageAdding(): string;
48
+ /**
49
+ * Raised when a page has been added to a TabbedDiagramView control.
50
+ * @type {String}
51
+ * @summary A string containing the event name.
52
+ */
53
+ static get pageAdded(): string;
54
+ /**
55
+ * Raised before a page is removed from a TabbedDiagramView control.
56
+ * @type {String}
57
+ * @summary A string containing the event name.
58
+ */
59
+ static get pageRemoving(): string;
60
+ /**
61
+ * Raised when a page has been removed from a TabbedDiagramView control.
62
+ * @type {String}
63
+ * @summary A string containing the event name.
64
+ */
65
+ static get pageRemoved(): string;
66
+ /**
67
+ * Raised when the shape drawing changes in a ShapeDesigner control.
68
+ * @type {String}
69
+ * @summary A string containing the event name.
70
+ */
71
+ static get shapeChanged(): string;
72
+ }
73
+ }
74
+ declare module "Diagramming.Controls/EventArgs" {
75
+ /**
76
+ * @class Contains the arguments passed to handlers of page-related events in a TabbedDiagramView.
77
+ * @augments CancelEventArgs
78
+ */
79
+ export class PageEventArgs extends CancelEventArgs {
80
+ /**
81
+ * Initializes a new instance of the PageEventArgs class.
82
+ * @constructor
83
+ * @param {Object} args
84
+ */
85
+ constructor(args: any);
86
+ sender: any;
87
+ _page: any;
88
+ _oldPage: any;
89
+ /**
90
+ * Gets the page for which the event is raised.
91
+ * @type {DiagramPage}
92
+ * @summary A DiagramPage instance.
93
+ */
94
+ get page(): any;
95
+ /**
96
+ * Gets the page before the event.
97
+ * @type {DiagramPage}
98
+ * @summary A DiagramPage instance.
99
+ */
100
+ get oldPage(): any;
101
+ }
102
+ import { CancelEventArgs } from "@mindfusion/controls";
103
+ }
104
+ declare module "Diagramming.Controls/TabbedDiagramView" {
105
+ /**
106
+ * @class Represents a DiagramView that can display DiagramDocument objects.
107
+ * The individual diagram pages can be activated through the tabs in the
108
+ * tray located at one of the view sides.
109
+ * @augments DiagramView
110
+ */
111
+ export class TabbedDiagramView extends DiagramView {
112
+ /**
113
+ * Creates and initializes a new TabbedDiagramView from the specified element.
114
+ * This method is static and can be called without creating an instance of the class.
115
+ * @param {HTMLCanvasElement} element The DOM element that the DiagramView should be attached to.
116
+ * @param {DiagramDocument} [document] The DiagramDocument instance this control is associated with.
117
+ * @returns {TabbedDiagramView} The newly created TabbedDiagramView object.
118
+ */
119
+ static create(element: HTMLCanvasElement, document?: DiagramDocument): TabbedDiagramView;
120
+ /**
121
+ * Initializes a new instance of the TabbedDiagramView class.
122
+ * @constructor
123
+ * @param {HTMLCanvasElement} element The Canvas DOM Element this TabbedDiagramView is associated with.
124
+ * @param {DiagramDocument} [document] The DiagramDocument instance this control is associated with.
125
+ */
126
+ constructor(element: HTMLCanvasElement, document?: DiagramDocument);
127
+ _tabAlignment: number;
128
+ tabStrip: TabStrip;
129
+ pageRenameStartHandler: (sender: any, args: any) => void;
130
+ pageRenameEndHandler: (sender: any, args: any) => void;
131
+ set tabsSize(arg: number);
132
+ /**
133
+ * Gets or sets the height of the tab strip.
134
+ * @type {Number}
135
+ * @summary The height.
136
+ */
137
+ get tabsSize(): number;
138
+ _showTabCloseButtons: boolean;
139
+ _showNavigationButtons: boolean;
140
+ _allowRenamePages: boolean;
141
+ documentChangedDelegate: (sender: any, args: any) => void;
142
+ set document(arg: DiagramDocument);
143
+ /**
144
+ * Gets or sets the diagram document displayed by this view.
145
+ * @type {DiagramDocument}
146
+ * @summary The DiagramDocument instance displayed by this view.
147
+ */
148
+ get document(): DiagramDocument;
149
+ _lastIndex: number;
150
+ items: List<any>;
151
+ _tabMouseDownHandler: (sender: any, args: any) => void;
152
+ _tabDropHandler: (sender: any, args: any) => void;
153
+ set selectedPage(arg: DiagramPage);
154
+ /**
155
+ * Gets or sets the currently selected tab page.
156
+ * @type {DiagramPage}
157
+ * @summary The selected diagram page.
158
+ */
159
+ get selectedPage(): DiagramPage;
160
+ set tabAlignment(arg: number);
161
+ /**
162
+ * Gets or sets the tab alignment.
163
+ * @type {TabAlignment}
164
+ * @summary A member of the TabAlignment enumeration.
165
+ */
166
+ get tabAlignment(): number;
167
+ set showNavigationButtons(arg: boolean);
168
+ /**
169
+ * Gets or sets a value indicating whether to show tab navigation buttons.
170
+ * @type {Boolean}
171
+ * @summary true if the tab navigation buttons are visible, or false otherwise.
172
+ * The default value is false.
173
+ */
174
+ get showNavigationButtons(): boolean;
175
+ set showAddButton(arg: boolean);
176
+ /**
177
+ * Gets or sets a value indicating whether to display the 'Add Tab' button.
178
+ * @type {Boolean}
179
+ * @summary true if the 'Add Tab' button is visible, or false otherwise.
180
+ * The default value is false.
181
+ */
182
+ get showAddButton(): boolean;
183
+ set showTabCloseButtons(arg: boolean);
184
+ /**
185
+ * Gets or sets a value indicating whether to display a close button for each tab.
186
+ * @type {Boolean}
187
+ * @summary true if the tabs close buttons are visible, or false otherwise.
188
+ * The default value is false.
189
+ */
190
+ get showTabCloseButtons(): boolean;
191
+ set allowReorder(arg: boolean);
192
+ /**
193
+ * Gets or sets a value indicating whether tabs can be rearranged interactively.
194
+ * @type {Boolean}
195
+ * @summary true if tabs can be rearranged interactively, or false otherwise. The default value is false.
196
+ */
197
+ get allowReorder(): boolean;
198
+ set allowRenamePages(arg: boolean);
199
+ /**
200
+ * Gets or sets a value indicating whether DiagramPage titles can be renamed interactively.
201
+ * @type {Boolean}
202
+ * @summary true if tabs can be renamed interactively, or false otherwise. The default value is false.
203
+ */
204
+ get allowRenamePages(): boolean;
205
+ set theme(arg: Theme);
206
+ /**
207
+ * Gets or sets the theme of the control.
208
+ * @type {Theme}
209
+ * @summary An instance of the Theme class.
210
+ */
211
+ get theme(): Theme;
212
+ set selectedIndex(arg: number);
213
+ /**
214
+ * Gets or sets the index of the currently selected diagram page.
215
+ * @type {Number}
216
+ * @summary The index of the selected diagram page.
217
+ */
218
+ get selectedIndex(): number;
219
+ resetTabAlignment(): void;
220
+ resetTabs(): void;
221
+ addPage(page: any): void;
222
+ removePage(page: any): void;
223
+ onTabMouseDown(sender: any, args: any): void;
224
+ onTabDrop(sender: any, args: any): void;
225
+ _selectedPage: DiagramPage;
226
+ /**
227
+ * @private
228
+ */
229
+ private getItemByHeader;
230
+ _document: any;
231
+ _theme: any;
232
+ set themesPath(arg: string);
233
+ /**
234
+ * Gets or sets the path to the control's css themes.
235
+ * @type {String}
236
+ * @summary A string specifying the path.
237
+ * @remarks Only applies to web components.
238
+ */
239
+ get themesPath(): string;
240
+ _themesPath: any;
241
+ /**
242
+ * Sets the current theme of the control and its pages.
243
+ * @param {Theme} theme The theme.
244
+ * @param {Boolean} [setToPages] true to set pages' themes, otherwise false.
245
+ */
246
+ setTheme(theme: Theme, setToPages?: boolean): void;
247
+ onDocumentChanged(sender: any, args: any): void;
248
+ onPageValidateAction(event: any, page: any, oldPage: any): boolean;
249
+ onPageRenameStart(sender: any, args: any): void;
250
+ inplaceController: any;
251
+ inplaceHandler: () => void;
252
+ onPageRenameEnd(sender: any, args: any): void;
253
+ /**
254
+ * Raised before the selected page is changed.
255
+ * @event pageChanging
256
+ * @type {EventDispatcher}
257
+ * @property {TabbedDiagramView} sender
258
+ * @property {PageEventArgs} args
259
+ */
260
+ get pageChanging(): EventDispatcher;
261
+ _pageChanging: EventDispatcher;
262
+ /**
263
+ * Raised when the selected page is changed.
264
+ * @event pageChanged
265
+ * @type {EventDispatcher}
266
+ * @property {TabbedDiagramView} sender
267
+ * @property {PageEventArgs} args
268
+ */
269
+ get pageChanged(): EventDispatcher;
270
+ _pageChanged: EventDispatcher;
271
+ /**
272
+ * Raised before a page is added.
273
+ * @event pageAdding
274
+ * @type {EventDispatcher}
275
+ * @property {TabbedDiagramView} sender
276
+ * @property {PageEventArgs} args
277
+ */
278
+ get pageAdding(): EventDispatcher;
279
+ _pageAdding: EventDispatcher;
280
+ /**
281
+ * Raised when a page has been added.
282
+ * @event pageAdded
283
+ * @type {EventDispatcher}
284
+ * @property {TabbedDiagramView} sender
285
+ * @property {PageEventArgs} args
286
+ */
287
+ get pageAdded(): EventDispatcher;
288
+ _pageAdded: EventDispatcher;
289
+ /**
290
+ * Raised before a page is removed.
291
+ * @event pageRemoving
292
+ * @type {EventDispatcher}
293
+ * @property {TabbedDiagramView} sender
294
+ * @property {PageEventArgs} args
295
+ */
296
+ get pageRemoving(): EventDispatcher;
297
+ _pageRemoving: EventDispatcher;
298
+ /**
299
+ * Raised when a page has been removed.
300
+ * @event pageRemoved
301
+ * @type {EventDispatcher}
302
+ * @property {TabbedDiagramView} sender
303
+ * @property {PageEventArgs} args
304
+ */
305
+ get pageRemoved(): EventDispatcher;
306
+ _pageRemoved: EventDispatcher;
307
+ }
308
+ import { DiagramView } from "@mindfusion/diagramming";
309
+ import { TabStrip } from "@mindfusion/common-ui";
310
+ import { DiagramDocument } from "@mindfusion/diagramming";
311
+ import { List } from "@mindfusion/common-collections";
312
+ import { DiagramPage } from "@mindfusion/diagramming";
313
+ import { Theme } from "@mindfusion/diagramming";
314
+ import { EventDispatcher } from "@mindfusion/controls";
315
+ }
316
+ declare module "Diagramming.Controls/WebComponents" {
317
+ /**
318
+ * @class Implements registration of web components.
319
+ */
320
+ export class WebComponents {
321
+ /**
322
+ * Registers the controls in the package as web components.
323
+ */
324
+ static register(): void;
325
+ }
326
+ }
327
+ declare module "Diagramming.Controls/ShapeElements" {
328
+ export class InteractiveElement {
329
+ static get defaultSize(): Size;
330
+ drawControlPoint(context: any, size: any, location: any, brush: any): void;
331
+ get firstHandle(): number;
332
+ get lastHandle(): number;
333
+ saveState(): {
334
+ strokeColor: any;
335
+ strokeThickness: any;
336
+ strokeDashStyle: any;
337
+ };
338
+ loadState(state: any): void;
339
+ strokeColor: any;
340
+ strokeThickness: any;
341
+ strokeDashStyle: any;
342
+ isDummy(): boolean;
343
+ }
344
+ export class LineBuilder extends InteractiveElement {
345
+ static fromCenter(point: any): LineBuilder;
346
+ static default(): LineBuilder;
347
+ constructor(p1: any, p2: any);
348
+ startPoint: any;
349
+ endPoint: any;
350
+ clone(): LineBuilder;
351
+ get center(): any;
352
+ distance(point: any): number;
353
+ offset(point: any): void;
354
+ orientate(from: any, to: any): void;
355
+ scale(scale: any, center: any): void;
356
+ toShape(): Shape;
357
+ addToContext(context: any, startPath: any): void;
358
+ draw(context: any, pen: any): void;
359
+ drawControlPoints(context: any, size: any, brush: any): void;
360
+ hitTestHandle(point: any, maxDist: any): 1 | 0 | -1;
361
+ updateFromHandle(handle: any, point: any): void;
362
+ exportElement(startPath: any): string;
363
+ exportShapeElement(): any[];
364
+ }
365
+ export class BezierBuilder extends InteractiveElement {
366
+ static fromPoints(points: any): BezierBuilder;
367
+ static fromCenter(point: any): BezierBuilder;
368
+ static default(): BezierBuilder;
369
+ constructor(x1: any, y1: any, x2: any, y2: any, x3: any, y3: any, x4: any, y4: any);
370
+ points: Point[];
371
+ clone(): BezierBuilder;
372
+ get startPoint(): Point;
373
+ get endPoint(): Point;
374
+ get center(): Point;
375
+ distance(point: any): number;
376
+ offset(point: any): void;
377
+ orientate(from: any, to: any): void;
378
+ scale(scale: any, center: any): void;
379
+ addToContext(context: any, startPath: any): void;
380
+ draw(context: any, pen: any): void;
381
+ drawControlPoints(context: any, size: any, brush: any): void;
382
+ hitTestHandle(point: any, maxDist: any): number;
383
+ updateFromHandle(handle: any, point: any): void;
384
+ toShape(): Shape;
385
+ exportElement(startPath: any): string;
386
+ exportShapeElement(): any[];
387
+ }
388
+ export class ArcBuilder extends InteractiveElement {
389
+ static fromPoints(p1: any, p2: any, p3: any): ArcBuilder;
390
+ static fromCenter(point: any): ArcBuilder;
391
+ static default(): ArcBuilder;
392
+ constructor(x: any, y: any, radius: any, startAngle: any, endAngle: any, anticlockwise: any);
393
+ startPoint: Point;
394
+ controlPoint: Point;
395
+ endPoint: Point;
396
+ clone(): ArcBuilder;
397
+ get center(): Point;
398
+ distance(point: any): any;
399
+ offset(point: any): void;
400
+ orientate(from: any, to: any): void;
401
+ scale(scale: any, center: any): void;
402
+ addToContext(context: any): void;
403
+ draw(context: any, pen: any): void;
404
+ drawControlPoints(context: any, size: any, brush: any): void;
405
+ hitTestHandle(point: any, maxDist: any): 1 | 0 | 2 | -1;
406
+ updateFromHandle(handle: any, point: any): void;
407
+ toShape(): Shape;
408
+ exportElement(): string;
409
+ exportShapeElement(): any[];
410
+ }
411
+ export class RoundRectBuilder extends InteractiveElement {
412
+ static fromPoints(p1: any, p2: any): RoundRectBuilder;
413
+ static fromCenter(point: any): RoundRectBuilder;
414
+ static fromBounds(bounds: any): RoundRectBuilder;
415
+ static default(): RoundRectBuilder;
416
+ constructor(x1: any, y1: any, x2: any, y2: any, cornerRadius: any);
417
+ topLeft: Point;
418
+ bottomRight: Point;
419
+ cornerRadius: any;
420
+ clone(): RoundRectBuilder;
421
+ get startPoint(): Point;
422
+ get endPoint(): Point;
423
+ get center(): any;
424
+ distance(point: any): number;
425
+ offset(point: any): void;
426
+ orientate(from: any, to: any): void;
427
+ scale(scale: any, center: any): void;
428
+ draw(context: any, pen: any): void;
429
+ drawControlPoints(context: any, size: any, brush: any): void;
430
+ hitTestHandle(point: any, maxDist: any): 1 | 0 | -1;
431
+ updateFromHandle(handle: any, point: any): void;
432
+ toShape(): Shape;
433
+ exportElement(startPath: any): string;
434
+ exportShapeElement(): any[];
435
+ }
436
+ export class Composite {
437
+ static fromCenter(point: any, type: any): Composite;
438
+ static fromBounds(bounds: any, type: any): Composite;
439
+ constructor(type: any, bounds: any);
440
+ type: any;
441
+ bounds: any;
442
+ clone(): Composite;
443
+ getElements(bounds: any): LineBuilder[] | ArcBuilder[];
444
+ }
445
+ export class Command {
446
+ constructor(type: any, dropLocation: any, hitElement: any, element: any, elementIndex: any, outline: any, filledDecoration: any);
447
+ type: any;
448
+ states: Map<any, any>;
449
+ newStates: Map<any, any>;
450
+ dropLocation: any;
451
+ hitElement: any;
452
+ element: any;
453
+ elementIndex: any;
454
+ outline: any;
455
+ filledDecoration: any;
456
+ registerElement(element: any): void;
457
+ execute(canvas: any): void;
458
+ newDecoration: FilledDecorationBuilder;
459
+ oldOutline: any;
460
+ newOutline: any;
461
+ nextState: any;
462
+ prevState: any;
463
+ target: any;
464
+ drawHighlight(context: any): void;
465
+ undo(canvas: any): void;
466
+ redo(canvas: any): void;
467
+ removeElements(array: any, elements: any): void;
468
+ }
469
+ export class FilledDecorationBuilder extends InteractiveElement {
470
+ constructor(outline: any);
471
+ outline: any;
472
+ fillColor: string;
473
+ set bounds(arg: any);
474
+ get bounds(): any;
475
+ _bounds: any;
476
+ draw(context: any): void;
477
+ drawControlPoints(context: any, size: any, brush: any): void;
478
+ distance(point: any): any;
479
+ hitTestHandle(point: any, maxDist: any): 1 | 0 | -1;
480
+ get center(): Point;
481
+ exportElement(): {
482
+ path: string;
483
+ };
484
+ exportShapeElement(): any;
485
+ getElements(bounds: any): any[];
486
+ }
487
+ export class AnchorPointBuilder extends InteractiveElement {
488
+ static fromPoint(point: any): AnchorPointBuilder;
489
+ static default(type: any): AnchorPointBuilder;
490
+ constructor(x: any, y: any, type: any, style: any, size: any, color: any);
491
+ center: Point;
492
+ style: any;
493
+ size: any;
494
+ anchorSize: number;
495
+ anchorType: any;
496
+ clone(): AnchorPointBuilder;
497
+ distance(point: any): any;
498
+ offset(point: any): void;
499
+ setCenter(point: any): void;
500
+ toShape(): Shape;
501
+ draw(context: any, pen: any): void;
502
+ drawControlPoints(context: any, size: any, brush: any): void;
503
+ hitTestHandle(point: any, maxDist: any): 0 | -1;
504
+ updateFromHandle(handle: any, point: any): void;
505
+ exportElement(startPath: any): string;
506
+ }
507
+ import { Size } from "@mindfusion/drawing";
508
+ import { Shape } from "@mindfusion/diagramming";
509
+ import { Point } from "@mindfusion/drawing";
510
+ }
511
+ declare module "Diagramming.Controls/ShapeBuilder" {
512
+ export class ShapeBuilder {
513
+ static createShape(id: any, outlineElements: any, decorationElements: any, shapeDecorationElements: any, anchorPattern: any, fillMode: any): Shape;
514
+ constructor(shape: any, offset: any);
515
+ outline: any[];
516
+ decorations: any[];
517
+ filledDecorations: any[];
518
+ anchorPoints: any[];
519
+ shape: any;
520
+ offset: any;
521
+ draw(context: any): void;
522
+ parseShape(): void;
523
+ createBuilders(commands: any): any[];
524
+ lastPoint: any;
525
+ createBuilder(command: any): any;
526
+ exportShape(shapeId: any): Shape;
527
+ exportElements(elementBuilders: any, merge: any, array: any): string | any[];
528
+ exportShapeElements(elementBuilders: any, array: any): any[];
529
+ allElements(): any[];
530
+ nearestElement(point: any, maxDist: any, elements: any): any;
531
+ hitTestDropTarget(point: any, newElement: any): Command;
532
+ hitTestOutlineTarget(outline: any, point: any, newElement: any): Command;
533
+ hitTest(point: any, activeElement: any): ElementController;
534
+ hitTestOutline(outline: any, child: any, point: any, filledDecoration: any): ElementController;
535
+ }
536
+ import { Shape } from "@mindfusion/diagramming";
537
+ import { Command } from "Diagramming.Controls/ShapeElements";
538
+ class ElementController {
539
+ constructor(type: any, element: any, handle: any, filledDecoration: any, adjacent: any, adjacentHandle: any);
540
+ type: any;
541
+ element: any;
542
+ handle: any;
543
+ filledDecoration: any;
544
+ adjacent: any;
545
+ adjacentHandle: any;
546
+ changeCommand: Command;
547
+ center: any;
548
+ currentScale: number;
549
+ onMouseDown(point: any): void;
550
+ hasMoved: boolean;
551
+ previousPosition: any;
552
+ initialDistance: any;
553
+ onMouseMove(point: any): void;
554
+ onMouseUp(point: any): void;
555
+ }
556
+ export {};
557
+ }
558
+ declare module "Diagramming.Controls/ShapeCanvas" {
559
+ export class ShapeCanvas extends Diagram {
560
+ shapeSize: number;
561
+ selectedHandlesBrush: string;
562
+ pointedHandlesBrush: string;
563
+ clearOutline(filledDecoration: any): any;
564
+ removeFromOutline(outline: any, element: any): {
565
+ index: number;
566
+ prevState?: undefined;
567
+ nextState?: undefined;
568
+ } | {
569
+ index: any;
570
+ prevState: any;
571
+ nextState: any;
572
+ };
573
+ set selectedElement(arg: any);
574
+ get selectedElement(): any;
575
+ _selectedElement: any;
576
+ set shapeBuilder(arg: any);
577
+ get shapeBuilder(): any;
578
+ _shapeBuilder: any;
579
+ get handlesSize(): number;
580
+ }
581
+ import { Diagram } from "@mindfusion/diagramming";
582
+ }
583
+ declare module "Diagramming.Controls/ShapeView" {
584
+ export class ShapeView extends DiagramView {
585
+ /**
586
+ * Creates and initializes a new ShapeDesigner from the specified element.
587
+ * This method is static and can be called without creating an instance of the class.
588
+ * @param {HTMLCanvasElement} element The DOM element that the DiagramView should be attached to.
589
+ * @param {DiagramDocument} [document] The DiagramDocument instance this control is associated with.
590
+ * @returns {ShapeDesigner} The newly created ShapeDesigner object.
591
+ */
592
+ static create(element: HTMLCanvasElement, document?: DiagramDocument): any;
593
+ constructor(element: any);
594
+ undoHistory: any[];
595
+ currentCommand: number;
596
+ offset: Point;
597
+ onElementDrag(element: any, position: any): void;
598
+ onElementDrop(element: any): void;
599
+ onPointerDown(position: any, button: any, id: any): void;
600
+ controller: any;
601
+ onPointerMove(position: any, id: any): Promise<void>;
602
+ set pointedElement(arg: any);
603
+ get pointedElement(): any;
604
+ onPointerUp(position: any, button: any, id: any): Promise<void>;
605
+ set selectedElement(arg: any);
606
+ get selectedElement(): any;
607
+ onKeyUp(target: any, keyCode: any, recorded: any, value: any): Promise<void>;
608
+ removeElement(element: any): void;
609
+ saveCommand(command: any): void;
610
+ undo(): void;
611
+ fromCommand: boolean;
612
+ redo(): void;
613
+ importShape(shape: any): void;
614
+ exportShape(): void;
615
+ alignPointToGrid(point: any): Point;
616
+ }
617
+ import { DiagramView } from "@mindfusion/diagramming";
618
+ import { Point } from "@mindfusion/drawing";
619
+ import { DiagramDocument } from "@mindfusion/diagramming";
620
+ }
621
+ declare module "Diagramming.Controls/ShapePalette" {
622
+ export class ShapePalette extends NodeListView {
623
+ static create(element: any): any;
624
+ constructor(element: any);
625
+ templatesLabel: string;
626
+ primitivesLabel: string;
627
+ anchorPointsLabel: string;
628
+ labelBrush: string;
629
+ fillShapes(): void;
630
+ }
631
+ import { NodeListView } from "@mindfusion/diagramming";
632
+ }
633
+ declare module "Diagramming.Controls/ShapeDesigner" {
634
+ /**
635
+ * @class Represents an interactive vector-drawing control that can be used to design node shapes.
636
+ */
637
+ export class ShapeDesigner extends Control {
638
+ /**
639
+ * Creates and initializes a new ShapeDesigner from the specified element.
640
+ * This method is static and can be called without creating an instance of the class.
641
+ * @param {HTMLDivElement} element The DOM element that the ShapeDesigner should be attached to.
642
+ * @returns {ShapeDesigner} The newly created ShapeDesigner object.
643
+ */
644
+ static create(element: HTMLDivElement): ShapeDesigner;
645
+ /**
646
+ * Initializes a new instance of the ShapeDesigner class.
647
+ * @constructor
648
+ * @param {HTMLDivElement} element The DOM Element this ShapeDesigner is associated with.
649
+ */
650
+ constructor(element: HTMLDivElement);
651
+ view: any;
652
+ palette: any;
653
+ propertyPanel: Window;
654
+ set showShapeProperties(arg: boolean);
655
+ /**
656
+ * Gets or sets a value indicating whether to display the property panel.
657
+ * @type {Boolean}
658
+ * @summary true to display the property panel, or false otherwise.
659
+ * The default value is true.
660
+ */
661
+ get showShapeProperties(): boolean;
662
+ getContent(): HTMLElement;
663
+ generatePropertyPanelTemplate(): string;
664
+ rebindPropertyPanel(element: any): void;
665
+ setProp(e: any): void;
666
+ /**
667
+ * Imports a Shape into the designer's drawing canvas.
668
+ * @param {Shape} shape A Shape instance.
669
+ */
670
+ importShape(shape: any): void;
671
+ set selectedElement(arg: InteractiveElement);
672
+ /**
673
+ * Gets or sets the selected element in the shape designer.
674
+ * @type {InteractiveElement}
675
+ * @summary An InteractiveElement instance.
676
+ */
677
+ get selectedElement(): InteractiveElement;
678
+ /**
679
+ * Creates a new Shape from the current content of the design canvas.
680
+ * @param {String} shapeId The shape's string identifier.
681
+ */
682
+ exportShape(shapeId: string): any;
683
+ /**
684
+ * Undoes the most recent user action.
685
+ */
686
+ undo(): void;
687
+ /**
688
+ * Executes again the most recently undone user action.
689
+ */
690
+ redo(): void;
691
+ removeElement(element: any): void;
692
+ /**
693
+ * Copies the currently selected element to the clipboard.
694
+ */
695
+ copyToClipboard(): void;
696
+ /**
697
+ * Pastes a previously copied element from the clipboard.
698
+ */
699
+ pasteFromClipboard(offsetX: any, offsetY: any): void;
700
+ refresh(): void;
701
+ _showShapeProperties: any;
702
+ set templatesLabel(arg: string);
703
+ /**
704
+ * Gets or sets a string specifying the label of outline templates category in shape designer toolbox.
705
+ * @type {String}
706
+ * @summary The label of outline templates category.
707
+ */
708
+ get templatesLabel(): string;
709
+ set primitivesLabel(arg: string);
710
+ /**
711
+ * Gets or sets a string specifying the label of graphic primitives category in shape designer toolbox.
712
+ * @type {String}
713
+ * @summary The label of graphic primitives category.
714
+ */
715
+ get primitivesLabel(): string;
716
+ set anchorPointsLabel(arg: string);
717
+ /**
718
+ * Gets or sets a string specifying the label of graphic AnchorPoints category in shape designer toolbox.
719
+ * @type {String}
720
+ * @summary The label of graphic AnchorPoints category.
721
+ */
722
+ get anchorPointsLabel(): string;
723
+ set showGrid(arg: boolean);
724
+ /**
725
+ * Gets or sets a value indicating whether the alignment grid is visible.
726
+ * @type {Boolean}
727
+ * @summary true if the alignment grid is visible, or false otherwise.
728
+ */
729
+ get showGrid(): boolean;
730
+ set alignToGrid(arg: boolean);
731
+ /**
732
+ * Gets or sets a value indicating whether the diagram items should be aligned to a grid.
733
+ * @type {Boolean}
734
+ * @summary true if the diagram items should be aligned to a grid, or false otherwise.
735
+ */
736
+ get alignToGrid(): boolean;
737
+ set gridSizeX(arg: number);
738
+ /**
739
+ * Gets or sets the horizontal distance between adjacent grid points.
740
+ * @type {Number}
741
+ * @summary The horizontal distance between adjacent grid points.
742
+ */
743
+ get gridSizeX(): number;
744
+ set gridSizeY(arg: number);
745
+ /**
746
+ * Gets or sets the vertical distance between adjacent grid points.
747
+ * @type {Number}
748
+ * @summary The vertical distance between adjacent grid points.
749
+ */
750
+ get gridSizeY(): number;
751
+ set theme(arg: Theme);
752
+ /**
753
+ * Gets or sets the theme of the control.
754
+ * @type {Theme}
755
+ * @summary An instance of the Theme class.
756
+ */
757
+ get theme(): Theme;
758
+ _theme: any;
759
+ set themesPath(arg: string);
760
+ /**
761
+ * Gets or sets the path to the control's css themes.
762
+ * @type {String}
763
+ * @summary A string specifying the path.
764
+ * @remarks Only applies to web components.
765
+ */
766
+ get themesPath(): string;
767
+ _themesPath: any;
768
+ /**
769
+ * Raised when the shape has changed.
770
+ * @event shapeChanged
771
+ * @type {EventDispatcher}
772
+ * @property {ShapeDesigner} sender
773
+ * @property {EventArgs} args
774
+ */
775
+ get shapeChanged(): EventDispatcher;
776
+ _shapeChanged: EventDispatcher;
777
+ connectedCallback(): void;
778
+ }
779
+ import { Control } from "@mindfusion/controls";
780
+ import { Window } from "@mindfusion/common-ui";
781
+ import { InteractiveElement } from "Diagramming.Controls/ShapeElements";
782
+ import { Theme } from "@mindfusion/diagramming";
783
+ import { EventDispatcher } from "@mindfusion/controls";
784
+ }
785
+ declare module "@mindfusion/diagramming-controls" {
786
+ export { TabAlignment } from "Diagramming.Controls/Enum";
787
+ export { Events } from "Diagramming.Controls/Events";
788
+ export { PageEventArgs } from "Diagramming.Controls/EventArgs";
789
+ export { TabbedDiagramView } from "Diagramming.Controls/TabbedDiagramView";
790
+ export { WebComponents } from "Diagramming.Controls/WebComponents";
791
+ export { ShapeDesigner } from "Diagramming.Controls/ShapeDesigner";
792
+ }