ngx-vis 5.0.0 → 6.0.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/types/ngxvis.d.ts DELETED
@@ -1,1462 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { EventEmitter, OnInit, OnDestroy, OnChanges, ElementRef, SimpleChange, NgZone } from '@angular/core';
3
- import { Data, Options, NetworkEvents, IdType, FitOptions, ClusterOptions, EdgeOptions, NodeOptions, OpenClusterOptions, Position, BoundingBox, MoveToOptions } from 'vis-network';
4
- export { Data, Edge, Node, Options } from 'vis-network';
5
- import { DataItemCollectionType, TimelineOptions, DataGroupCollectionType, DateType, IdType as IdType$1, TimelineAnimationOptions, TimelineEventPropertiesResult } from 'vis-timeline';
6
- export { DataGroup, DataGroupCollectionType, DataItem, DataItemCollectionType, TimelineOptions } from 'vis-timeline';
7
- import * as i1 from '@angular/common';
8
- export { DataSet } from 'vis-data';
9
-
10
- /**
11
- * A service to create, manage and control Network instances.
12
- *
13
- * @export
14
- * @class NetworkService
15
- */
16
- declare class VisNetworkService {
17
- /**
18
- * Fired when the user clicks the mouse or taps on a touchscreen device.
19
- *
20
- * @type {EventEmitter<any>}
21
- * @memberOf NetworkService
22
- */
23
- click: EventEmitter<any>;
24
- /**
25
- * Fired when the user double clicks the mouse or double taps on a touchscreen device.
26
- * Since a double click is in fact 2 clicks, 2 click events are fired, followed by a double click event.
27
- * If you do not want to use the click events if a double click event is fired,
28
- * just check the time between click events before processing them.
29
- *
30
- * @type {EventEmitter<any>}
31
- * @memberOf NetworkService
32
- */
33
- doubleClick: EventEmitter<any>;
34
- /**
35
- * Fired when the user click on the canvas with the right mouse button.
36
- * The right mouse button does not select by default.
37
- * You can use the method getNodeAt to select the node if you want.
38
- *
39
- * @type {EventEmitter<any>}
40
- * @memberOf NetworkService
41
- */
42
- oncontext: EventEmitter<any>;
43
- /**
44
- * Fired when the user clicks and holds the mouse or taps and holds on a touchscreen device.
45
- * A click event is also fired in this case.
46
- *
47
- * @type {EventEmitter<any>}
48
- * @memberOf NetworkService
49
- */
50
- hold: EventEmitter<any>;
51
- /**
52
- * Fired after drawing on the canvas has been completed.
53
- * Can be used to draw on top of the network.
54
- *
55
- * @type {EventEmitter<any>}
56
- * @memberOf NetworkService
57
- */
58
- release: EventEmitter<any>;
59
- /**
60
- * Fired when the selection has changed by user action.
61
- * This means a node or edge has been selected, added to the selection or deselected.
62
- * All select events are only triggered on click and hold.
63
- *
64
- * @type {EventEmitter<any>}
65
- * @memberOf NetworkService
66
- */
67
- select: EventEmitter<any>;
68
- /**
69
- * Fired when a node has been selected by the user.
70
- *
71
- * @type {EventEmitter<any>}
72
- * @memberOf NetworkService
73
- */
74
- selectNode: EventEmitter<any>;
75
- /**
76
- * Fired when a edge has been selected by the user.
77
- *
78
- * @type {EventEmitter<any>}
79
- * @memberOf NetworkService
80
- */
81
- selectEdge: EventEmitter<any>;
82
- /**
83
- * Fired when a node (or nodes) has (or have) been deselected by the user.
84
- * The previous selection is the list of nodes and edges that were selected before the last user event.
85
- *
86
- * @type {EventEmitter<any>}
87
- * @memberOf NetworkService
88
- */
89
- deselectNode: EventEmitter<any>;
90
- /**
91
- * Fired when a edge (or edges) has (or have) been deselected by the user.
92
- * The previous selection is the list of nodes and edges that were selected before the last user event.
93
- *
94
- * @type {EventEmitter<any>}
95
- * @memberOf NetworkService
96
- */
97
- deselectEdge: EventEmitter<any>;
98
- /**
99
- * Fired when starting a drag.
100
- *
101
- * @type {EventEmitter<any>}
102
- * @memberOf NetworkService
103
- */
104
- dragStart: EventEmitter<any>;
105
- /**
106
- * Fired when dragging node(s) or the view.
107
- *
108
- * @type {EventEmitter<any>}
109
- * @memberOf NetworkService
110
- */
111
- dragging: EventEmitter<any>;
112
- /**
113
- * Fired when the drag has finished.
114
- *
115
- * @type {EventEmitter<any>}
116
- * @memberOf NetworkService
117
- */
118
- dragEnd: EventEmitter<any>;
119
- /**
120
- * Fired if the option interaction:{hover:true} is enabled and the mouse hovers over a node.
121
- *
122
- * @type {EventEmitter<any>}
123
- * @memberOf NetworkService
124
- */
125
- hoverNode: EventEmitter<any>;
126
- /**
127
- * Fired if the option interaction:{hover:true} is enabled and
128
- * the mouse moved away from a node it was hovering over before.
129
- *
130
- * @type {EventEmitter<any>}
131
- * @memberOf NetworkService
132
- */
133
- blurNode: EventEmitter<any>;
134
- /**
135
- * Fired if the option interaction:{hover:true} is enabled and the mouse hovers over an edge.
136
- *
137
- * @type {EventEmitter<any>}
138
- * @memberOf NetworkService
139
- */
140
- hoverEdge: EventEmitter<any>;
141
- /**
142
- * Fired if the option interaction:{hover:true} is enabled and
143
- * the mouse moved away from an edge it was hovering over before.
144
- *
145
- * @type {EventEmitter<any>}
146
- * @memberOf NetworkService
147
- */
148
- blurEdge: EventEmitter<any>;
149
- /**
150
- * Fired when the user zooms in or out.
151
- *
152
- * @type {EventEmitter<any>}
153
- * @memberOf NetworkService
154
- */
155
- zoom: EventEmitter<any>;
156
- /**
157
- * Fired when the popup (tooltip) is shown.
158
- *
159
- * @type {EventEmitter<any>}
160
- * @memberOf NetworkService
161
- */
162
- showPopup: EventEmitter<any>;
163
- /**
164
- * Fired when the popup (tooltip) is hidden.
165
- *
166
- * @type {EventEmitter<any>}
167
- * @memberOf NetworkService
168
- */
169
- hidePopup: EventEmitter<any>;
170
- /**
171
- * Fired when stabilization starts.
172
- * This is also the case when you drag a node and the physics
173
- * simulation restarts to stabilize again.
174
- * Stabilization does not neccesarily imply 'without showing'.
175
- *
176
- * @type {EventEmitter<any>}
177
- * @memberOf NetworkService
178
- */
179
- startStabilizing: EventEmitter<any>;
180
- /**
181
- * Fired when a multiple of the updateInterval number of iterations is reached.
182
- * This only occurs in the 'hidden' stabilization.
183
- *
184
- * @type {EventEmitter<any>}
185
- * @memberOf NetworkService
186
- */
187
- stabilizationProgress: EventEmitter<any>;
188
- /**
189
- * Fired when the 'hidden' stabilization finishes.
190
- * This does not necessarily mean the network is stabilized;
191
- * it could also mean that the amount of iterations defined in the options has been reached.
192
- *
193
- * @type {EventEmitter<any>}
194
- * @memberOf NetworkService
195
- */
196
- stabilizationIterationsDone: EventEmitter<any>;
197
- /**
198
- * Fired when the 'hidden' stabilization finishes.
199
- * This does not necessarily mean the network is stabilized;
200
- * it could also mean that the amount of iterations defined in the options has been reached.
201
- *
202
- * @type {EventEmitter<any>}
203
- * @memberOf NetworkService
204
- */
205
- stabilized: EventEmitter<any>;
206
- /**
207
- * Fired when the size of the canvas has been resized,
208
- * either by a redraw call when the container div has changed in size,
209
- * a setSize() call with new values or a setOptions() with new width and/or height values.
210
- *
211
- * @type {EventEmitter<any>}
212
- * @memberOf NetworkService
213
- */
214
- resize: EventEmitter<any>;
215
- /**
216
- * Fired before the redrawing begins.
217
- * The simulation step has completed at this point.
218
- * Can be used to move custom elements before starting drawing the new frame.
219
- *
220
- * @type {EventEmitter<any>}
221
- * @memberOf NetworkService
222
- */
223
- initRedraw: EventEmitter<any>;
224
- /**
225
- * Fired after the canvas has been cleared, scaled and translated to
226
- * the viewing position but before all edges and nodes are drawn.
227
- * Can be used to draw behind the network.
228
- *
229
- * @type {EventEmitter<any>}
230
- * @memberOf NetworkService
231
- */
232
- beforeDrawing: EventEmitter<any>;
233
- /**
234
- * Fired after drawing on the canvas has been completed.
235
- * Can be used to draw on top of the network.
236
- *
237
- * @type {EventEmitter<any>}
238
- * @memberOf NetworkService
239
- */
240
- afterDrawing: EventEmitter<any>;
241
- /**
242
- * Fired when an animation is finished.
243
- *
244
- * @type {EventEmitter<any>}
245
- * @memberOf NetworkService
246
- */
247
- animationFinished: EventEmitter<any>;
248
- /**
249
- * Fired when a user changes any option in the configurator.
250
- * The options object can be used with the setOptions method or stringified using JSON.stringify().
251
- * You do not have to manually put the options into the network: this is done automatically.
252
- * You can use the event to store user options in the database.
253
- *
254
- * @type {EventEmitter<any>}
255
- * @memberOf NetworkService
256
- */
257
- configChange: EventEmitter<any>;
258
- private networks;
259
- /**
260
- * Creates a new network instance.
261
- *
262
- * @param {string} visNetwork The network name/identifier.
263
- * @param {HTMLElement} container The HTML element that contains the network view.
264
- * @param {Data} data The initial network nodes and edges.
265
- * @param {Options} [options] The network options.
266
- *
267
- * @throws {Error} Thrown when a network with the same name already exists.
268
- *
269
- * @memberOf NetworkService
270
- */
271
- create(visNetwork: string, container: HTMLElement, data: Data, options?: Options): void;
272
- /**
273
- * Remove the network from the DOM and remove all Hammer bindings and references.
274
- *
275
- * @param {string} visNetwork The network name/identifier.
276
- *
277
- * @memberOf NetworkService
278
- */
279
- destroy(visNetwork: string): void;
280
- /**
281
- * Activates an event.
282
- *
283
- * @param {string} visNetwork The network name/identifier.
284
- * @param {NetworkEvents} eventName The event name.
285
- * @param {boolean} preventDefault Stops the default behavior of the event.
286
- * @returns {boolean} Returns true when the event was activated.
287
- *
288
- * @memberOf NetworkService
289
- */
290
- on(visNetwork: string, eventName: NetworkEvents, preventDefault?: boolean): boolean;
291
- /**
292
- * Deactivates an event.
293
- *
294
- * @param {string} visNetwork The network name/identifier.
295
- * @param {NetworkEvents} eventName The event name.
296
- *
297
- * @memberOf NetworkService
298
- */
299
- off(visNetwork: string, eventName: NetworkEvents): void;
300
- /**
301
- * Activates an event listener only once.
302
- * After it has taken place, the event listener will be removed.
303
- *
304
- * @param {string} visNetwork The network name/identifier.
305
- * @param {NetworkEvents} eventName The event name.
306
- * @returns {boolean} Returns true when the event was activated.
307
- *
308
- * @memberOf NetworkService
309
- */
310
- once(visNetwork: string, eventName: NetworkEvents): boolean;
311
- /**
312
- * Override all the data in the network.
313
- * If stabilization is enabled in the physics module,
314
- * the network will stabilize again.
315
- * This method is also performed when first initializing the network.
316
- *
317
- * @param {string} visNetwork The network name/identifier.
318
- * @param {Data} data The network data.
319
- *
320
- * @throws {Error} Thrown when the network does not exist.
321
- *
322
- * @memberOf NetworkService
323
- */
324
- setData(visNetwork: string, data: Data): void;
325
- /**
326
- * Set the options.
327
- *
328
- * @param {string} visNetwork The network name/identifier.
329
- * @param {Options} options The network options.
330
- *
331
- * @throws {Error} Thrown when the network does not exist.
332
- *
333
- * @memberOf NetworkService
334
- */
335
- setOptions(visNetwork: string, options: Options): void;
336
- /**
337
- * Selects the nodes corresponding to the id's in the input array.
338
- * This method unselects all other objects before selecting its own objects.
339
- * Does not fire events.
340
- *
341
- * @param {string} visNetwork The network name/identifier.
342
- * @param {IdType[]} nodeIds The node ids that should be selected.
343
- * @param {boolean} [highlightEdges] If highlightEdges is true or undefined,
344
- * the neighbouring edges will also be selected.
345
- *
346
- * @throws {Error} Thrown when the network does not exist.
347
- *
348
- * @memberOf NetworkService
349
- */
350
- selectNodes(visNetwork: string, nodeIds: IdType[], highlightEdges?: boolean): void;
351
- /**
352
- * Selects the nodes and edges corresponding to the id's in the input arrays.
353
- * Does not fire events.
354
- *
355
- * @param {string} visNetwork The network name/identifier.
356
- * @param { nodes: IdType[], edges: IdType[] } selection The node and edge ids that should be selected.
357
- * @param { unselectAll?: boolean, highlightEdges?: boolean } [options]
358
- * If unselectAll is true or undefined, the other objects will be deselected.
359
- * If highlightEdges is true or undefined, the neighbouring edges will also be selected.
360
- *
361
- * @throws {Error} Thrown when the network does not exist.
362
- *
363
- * @memberOf NetworkService
364
- */
365
- setSelection(visNetwork: string, selection: {
366
- nodes: IdType[];
367
- edges: IdType[];
368
- }, options?: {
369
- unselectAll?: boolean;
370
- highlightEdges?: boolean;
371
- }): void;
372
- /**
373
- * Returns an object with selected nodes and edges ids.
374
- *
375
- * @param {string} visNetwork The network name/identifier.
376
- * @returns {{ nodes: IdType[], edges: IdType[] }}
377
- * The selected node and edge ids or undefined when the network does not exist.
378
- *
379
- * @memberOf NetworkService
380
- */
381
- getSelection(visNetwork: string): {
382
- nodes: IdType[];
383
- edges: IdType[];
384
- };
385
- /**
386
- * Returns an array of selected node ids.
387
- *
388
- * @param {string} visNetwork The network name/identifier.
389
- * @returns {IdType[]} The selected node ids or undefined when the network does not exist.
390
- *
391
- * @memberOf NetworkService
392
- */
393
- getSelectedNodes(visNetwork: string): IdType[];
394
- /**
395
- * Returns an array of selected edge ids.
396
- *
397
- * @param {string} visNetwork The network name/identifier.
398
- * @returns {IdType[]} The selected edge ids or undefined when the network does not exist.
399
- *
400
- * @memberOf NetworkService
401
- */
402
- getSelectedEdges(visNetwork: string): IdType[];
403
- /**
404
- * Unselect all objects.
405
- * Does not fire events.
406
- *
407
- * @param {string} visNetwork The network name/identifier.
408
- *
409
- * @throws {Error} Thrown when the network does not exist.
410
- *
411
- * @memberOf NetworkService
412
- */
413
- unselectAll(visNetwork: string): void;
414
- /**
415
- * Zooms out so all nodes fit on the canvas.
416
- *
417
- * @param {string} visNetwork The network name/identifier.
418
- * @param {VisFitOptions} [options] Options to customize.
419
- *
420
- * @throws {Error} Thrown when the network does not exist.
421
- *
422
- * @memberOf NetworkService
423
- */
424
- fit(visNetwork: string, options?: FitOptions): void;
425
- /**
426
- * Redraw the network.
427
- *
428
- * @param {string} visNetwork The network name/identifier.
429
- *
430
- * @throws {Error} Thrown when the network does not exist.
431
- *
432
- * @memberOf NetworkService
433
- */
434
- redraw(visNetwork: string): void;
435
- /**
436
- * Go into addNode mode. Having edit mode or manipulation enabled is not required.
437
- * To get out of this mode, call disableEditMode(). The callback functions defined in handlerFunctions still apply.
438
- * To use these methods without having the manipulation GUI, make sure you set enabled to false.
439
- *
440
- * @param {string} visNetwork The network name/identifier.
441
- *
442
- * @throws {Error} Thrown when the network does not exist.
443
- *
444
- * @memberOf NetworkService
445
- */
446
- addNodeMode(visNetwork: string): void;
447
- /**
448
- * Programatically enable the edit mode.
449
- * Similar effect to pressing the edit button.
450
- *
451
- * @param {string} visNetwork The network name/identifier.
452
- *
453
- * @throws {Error} Thrown when the network does not exist.
454
- *
455
- * @memberOf NetworkService
456
- */
457
- enableEditMode(visNetwork: string): void;
458
- /**
459
- * Go into addEdge mode.
460
- * The explaination from addNodeMode applies here as well.
461
- *
462
- * @param {string} visNetwork The network name/identifier.
463
- *
464
- * @throws {Error} Thrown when the network does not exist.
465
- *
466
- * @memberOf NetworkService
467
- */
468
- addEdgeMode(visNetwork: string): void;
469
- /**
470
- * Programatically disable the edit mode.
471
- * Similar effect to pressing the close icon
472
- * (small cross in the corner of the toolbar).
473
- *
474
- * @param {string} visNetwork The network name/identifier.
475
- *
476
- * @throws {Error} Thrown when the network does not exist.
477
- *
478
- * @memberOf NetworkService
479
- */
480
- disableEditMode(visNetwork: string): void;
481
- /**
482
- * Delete selected.
483
- * Having edit mode or manipulation enabled is not required.
484
- *
485
- * @param {string} visNetwork The network name/identifier.
486
- *
487
- * @throws {Error} Thrown when the network does not exist.
488
- *
489
- * @memberOf NetworkService
490
- */
491
- deleteSelected(visNetwork: string): void;
492
- /**
493
- * Makes a cluster.
494
- *
495
- * @param {string} visNetwork The network name/identifier.
496
- * @param {ClusterOptions} [options] The joinCondition function is presented with all nodes.
497
- *
498
- * @throws {Error} Thrown when the network does not exist.
499
- *
500
- * @memberOf NetworkService
501
- */
502
- cluster(visNetwork: string, options?: ClusterOptions): void;
503
- /**
504
- * This method looks at the provided node and makes a cluster of it and all it's connected nodes.
505
- * The behaviour can be customized by proving the options object.
506
- * All options of this object are explained below.
507
- * The joinCondition is only presented with the connected nodes.
508
- *
509
- * @param {string} visNetwork The network name/identifier.
510
- * @param {IdType} nodeId the id of the node
511
- * @param {ClusterOptions} [options] the cluster options
512
- *
513
- * @memberOf NetworkService
514
- */
515
- clusterByConnection(visNetwork: string, nodeId: IdType, options?: ClusterOptions): void;
516
- /**
517
- * This method checks all nodes in the network and those with a equal or higher
518
- * amount of edges than specified with the hubsize qualify.
519
- * If a hubsize is not defined, the hubsize will be determined as the average
520
- * value plus two standard deviations.
521
- * For all qualifying nodes, clusterByConnection is performed on each of them.
522
- * The options object is described for clusterByConnection and does the same here.
523
- *
524
- * @param {string} visNetwork The network name/identifier.
525
- * @param {number} [hubsize] optional hubsize
526
- * @param {ClusterOptions} [options] optional cluster options
527
- *
528
- * @memberOf NetworkService
529
- */
530
- clusterByHubsize(visNetwork: string, hubsize?: number, options?: ClusterOptions): void;
531
- /**
532
- * This method will cluster all nodes with 1 edge with their respective connected node.
533
- *
534
- * @param {string} visNetwork The network name/identifier.
535
- * @param {ClusterOptions} [options] optional cluster options
536
- *
537
- * @memberOf NetworkService
538
- */
539
- clusterOutliers(visNetwork: string, options?: ClusterOptions): void;
540
- /**
541
- * Nodes can be in clusters.
542
- * Clusters can also be in clusters.
543
- * This function returns an array of nodeIds showing where the node is.
544
- *
545
- * Example:
546
- * cluster 'A' contains cluster 'B', cluster 'B' contains cluster 'C',
547
- * cluster 'C' contains node 'fred'.
548
- *
549
- * network.clustering.findNode('fred') will return ['A','B','C','fred'].
550
- *
551
- * @param {string} visNetwork The network name/identifier.
552
- * @param {IdType} nodeId the node id.
553
- * @returns {IdType[]} an array of nodeIds showing where the node is
554
- *
555
- * @memberOf NetworkService
556
- */
557
- findNode(visNetwork: string, nodeId: IdType): IdType[];
558
- /**
559
- * Similar to findNode in that it returns all the edge ids that were
560
- * created from the provided edge during clustering.
561
- *
562
- * @param {string} visNetwork The network name/identifier.
563
- * @param {IdType} baseEdgeId the base edge id
564
- * @returns {IdType[]} an array of edgeIds
565
- *
566
- * @memberOf NetworkService
567
- */
568
- getClusteredEdges(visNetwork: string, baseEdgeId: IdType): IdType[];
569
- /**
570
- * When a clusteredEdgeId is available, this method will return the original
571
- * baseEdgeId provided in data.edges ie.
572
- * After clustering the 'SelectEdge' event is fired but provides only the clustered edge.
573
- * This method can then be used to return the baseEdgeId.
574
- *
575
- * @param {string} visNetwork The network name/identifier.
576
- * @param {IdType} clusteredEdgeId
577
- * @returns {IdType}
578
- *
579
- * @memberOf NetworkService
580
- *
581
- */
582
- getBaseEdge(visNetwork: string, clusteredEdgeId: IdType): IdType;
583
- /**
584
- * Visible edges between clustered nodes are not the same edge as the ones provided
585
- * in data.edges passed on network creation. With each layer of clustering, copies of
586
- * the edges between clusters are created and the previous edges are hidden,
587
- * until the cluster is opened. This method takes an edgeId (ie. a base edgeId from data.edges)
588
- * and applys the options to it and any edges that were created from it while clustering.
589
- *
590
- * @param {string} visNetwork The network name/identifier.
591
- * @param {IdType} startEdgeId
592
- * @param {VisEdgeOptions} [options]
593
- *
594
- * @memberOf NetworkService
595
- *
596
- */
597
- updateEdge(visNetwork: string, startEdgeId: IdType, options?: EdgeOptions): void;
598
- /**
599
- * Clustered Nodes when created are not contained in the original data.nodes
600
- * passed on network creation. This method updates the cluster node.
601
- *
602
- * @param {string} visNetwork The network name/identifier.
603
- * @param {IdType} clusteredNodeId
604
- * @param {NodeOptions} options
605
- *
606
- * @memberOf NetworkService
607
- */
608
- updateClusteredNode(visNetwork: string, clusteredNodeId: IdType, options?: NodeOptions): void;
609
- /**
610
- * Returns an array of all nodeIds of the nodes that
611
- * would be released if you open the cluster.
612
- *
613
- * @param {string} visNetwork The network name/identifier.
614
- * @param {IdType} clusterNodeId the id of the cluster node
615
- * @returns {IdType[]}
616
- *
617
- * @memberOf NetworkService
618
- */
619
- getNodesInCluster(visNetwork: string, clusterNodeId: IdType): IdType[];
620
- /**
621
- * Opens the cluster, releases the contained nodes and edges,
622
- * removing the cluster node and cluster edges.
623
- *
624
- * @param {string} visNetwork The network name/identifier.
625
- * @param {IdType} nodeId The node id that represents the cluster.
626
- * @param {OpenClusterOptions} [options] Cluster options.
627
- *
628
- * @throws {Error} Thrown when the network does not exist.
629
- *
630
- * @memberOf NetworkService
631
- */
632
- openCluster(visNetwork: string, nodeId: IdType, options?: OpenClusterOptions): void;
633
- /**
634
- * Returns true if the node whose ID has been supplied is a cluster.
635
- *
636
- * @param {string} visNetwork The network name/identifier.
637
- * @param {IdType} nodeId The associated node id.
638
- * @returns {boolean} True if the node whose ID has been supplied is a cluster.
639
- *
640
- * @memberOf NetworkService
641
- */
642
- isCluster(visNetwork: string, nodeId: IdType): boolean;
643
- /**
644
- * If you like the layout of your network and would like it to start in the same way next time,
645
- * ask for the seed using this method and put it in the layout.randomSeed option.
646
- *
647
- * @param {string} visNetwork The network name/identifier.
648
- * @returns {number} The seed of the current network or -1 when the network is not defined.
649
- *
650
- * @memberOf NetworkService
651
- */
652
- getSeed(visNetwork: string): number;
653
- /**
654
- * This function converts canvas coordinates to coordinates on the DOM.
655
- * Input and output are in the form of {x:Number,y:Number}.
656
- * The DOM values are relative to the network container.
657
- *
658
- * @param {string} visNetwork The network name/identifier.
659
- * @param {Position} position The canvas position.
660
- * @returns {Position} The DOM position.
661
- *
662
- * @memberOf NetworkService
663
- */
664
- canvasToDOM(visNetwork: string, position: Position): Position;
665
- /**
666
- * This function converts DOM coordinates to coordinates on the canvas.
667
- * Input and output are in the form of {x:Number,y:Number}.
668
- * The DOM values are relative to the network container.
669
- *
670
- * @param {string} visNetwork The network name/identifier.
671
- * @param {Position} position The DOM position.
672
- * @returns {Position} The canvas position.
673
- *
674
- * @memberOf NetworkService
675
- */
676
- DOMtoCanvas(visNetwork: string, position: Position): Position;
677
- /**
678
- * This function looks up the node at the given DOM coordinates on the canvas.
679
- * Input and output are in the form of {x:Number,y:Number}.
680
- * The DOM values are relative to the network container -> DOM not Canvas coords.
681
- *
682
- * @param {string} visNetwork The network name/identifier.
683
- * @param {Position} position The DOM position.
684
- * @returns {IdType} nodeId The associated node id.
685
- *
686
- * @memberOf NetworkService
687
- */
688
- getNodeAt(visNetwork: string, position: Position): IdType;
689
- /**
690
- * This function looks up the edge at the given DOM coordinates on the canvas.
691
- * Input and output are in the form of {x:Number,y:Number}.
692
- * The DOM values are relative to the network container -> DOM not Canvas coords.
693
- *
694
- * @param {string} visNetwork The network name/identifier.
695
- * @param {Position} position The DOM position.
696
- * @returns {IdType} edgeId The associated edge id.
697
- *
698
- * @memberOf NetworkService
699
- */
700
- getEdgeAt(visNetwork: string, position: Position): IdType;
701
- /**
702
- * This function looks up the edges for a given nodeId.
703
- * The DOM values are relative to the network container -> DOM not Canvas coords.
704
- *
705
- * @param {string} visNetwork The network name/identifier.
706
- * @param {IdType} nodeId The associated node id.
707
- * @returns {IdType[]} Return array of edge ids
708
- *
709
- * @memberOf NetworkService
710
- */
711
- getConnectedEdges(visNetwork: string, nodeId: IdType): IdType[];
712
- /**
713
- * Returns an array of nodeIds of the all the nodes that are directly connected to this node.
714
- * If you supply an edgeId, vis will first match the id to nodes.
715
- * If no match is found, it will search in the edgelist and return an array: [fromId, toId].
716
- *
717
- * @param {string} visNetwork The network name/identifier.
718
- * @param nodeOrEdgeId a node or edge id
719
- * @returns {IdType[]} Return array of node ids
720
- */
721
- getConnectedNodes(visNetwork: string, nodeOrEdgeId: IdType): IdType[] | {
722
- fromId: IdType;
723
- toId: IdType;
724
- }[];
725
- /**
726
- * Returns the positions of the nodes.
727
- * @param {string} visNetwork The network name/identifier.
728
- * @param {Array.<Node.id>|String} [ids] --> optional, can be array of nodeIds, can be string
729
- * @returns {{}}
730
- */
731
- getPositions(visNetwork: string, nodeIds?: IdType[]): {
732
- [nodeId: string]: Position;
733
- };
734
- /**
735
- * Returns the positions of the nodes.
736
- * @param {string} visNetwork The network name/identifier.
737
- */
738
- getBoundingBox(visNetwork: string, nodeId: IdType): BoundingBox;
739
- /**
740
- * Returns the positions of the nodes.
741
- * @param {string} visNetwork The network name/identifier.
742
- */
743
- storePositions(visNetwork: string): void;
744
- /**
745
- * You can animate or move the camera using the moveTo method.
746
- *
747
- * @param {string} visNetwork The network name/identifier.
748
- * @param {MoveToOptions} options Options for moveTo function.
749
- */
750
- moveTo(visNetwork: string, moveToOptions: MoveToOptions): void;
751
- /**
752
- * Start the physics simulation.
753
- * This is normally done whenever needed and is only really useful
754
- * if you stop the simulation yourself and wish to continue it afterwards.
755
- * @param {string} visNetwork The network name/identifier.
756
- */
757
- startSimulation(visNetwork: string): void;
758
- /**
759
- * This stops the physics simulation and triggers a stabilized event.
760
- * Tt can be restarted by dragging a node,
761
- * altering the dataset or calling startSimulation().
762
- * @param {string} visNetwork The network name/identifier.
763
- */
764
- stopSimulation(visNetwork: string): void;
765
- /**
766
- * Returns the current scale of the network. 1.0 is comparible to 100%, 0 is zoomed out infinitely.
767
- *
768
- * @param {string} visNetwork The network name/identifier.
769
- *
770
- * @throws {Error} Thrown when the network does not exist.
771
- *
772
- * @memberOf NetworkService
773
- */
774
- getScale(visNetwork: string): number;
775
- static ɵfac: i0.ɵɵFactoryDeclaration<VisNetworkService, never>;
776
- static ɵprov: i0.ɵɵInjectableDeclaration<VisNetworkService>;
777
- }
778
-
779
- /**
780
- * Use this directive with a div container to show network data.
781
- *
782
- * @export
783
- * @class VisNetworkDirective
784
- * @implements {OnInit}
785
- * @implements {OnDestroy}
786
- * @implements {OnChanges}
787
- */
788
- declare class VisNetworkDirective implements OnInit, OnDestroy, OnChanges {
789
- private elementRef;
790
- private visNetworkService;
791
- /**
792
- * The name or identifier of the network (must be unique in your application).
793
- * This property is used once on init and must not be changed.
794
- *
795
- * @type {string}
796
- * @memberOf VisNetworkDirective
797
- */
798
- visNetwork: string;
799
- /**
800
- * The data that will be used to create the network.
801
- * Changes to the nodes or edges property won't be detected but
802
- * changes to the reference of this object.
803
- * Changes lead to a call to setData of this network instance.
804
- *
805
- * @type {Data}
806
- * @memberOf VisNetworkDirective
807
- */
808
- visNetworkData: Data;
809
- /**
810
- * The options that will be used with this network instance.
811
- * Only reference changes to the whole options object will be detected
812
- * but not changes to properties.
813
- * Changes lead to a call to setOptions of the network instance.
814
- *
815
- * @type {VisOptions}
816
- * @memberOf VisNetworkDirective
817
- */
818
- visNetworkOptions: Options;
819
- /**
820
- * This event will be raised when the network is initialized.
821
- * At this point of time the network is successfully registered
822
- * with the VisNetworkService and you can register to events.
823
- * The event data is the name of the network as a string.
824
- *
825
- * @type {EventEmitter<any>}
826
- * @memberOf VisNetworkDirective
827
- */
828
- initialized: EventEmitter<any>;
829
- private visNetworkContainer;
830
- private isInitialized;
831
- /**
832
- * Creates an instance of VisNetworkDirective.
833
- *
834
- * @param {ElementRef} elementRef The HTML element reference.
835
- * @param {VisNetworkService} visNetworkService The VisNetworkService.
836
- *
837
- * @memberOf VisNetworkDirective
838
- */
839
- constructor(elementRef: ElementRef, visNetworkService: VisNetworkService);
840
- /**
841
- * Create the network when at least visNetwork and visData
842
- * are defined.
843
- *
844
- * @memberOf VisNetworkDirective
845
- */
846
- ngOnInit(): void;
847
- /**
848
- * Update the network data or options on reference changes to
849
- * the visData or visOptions properties.
850
- *
851
- * @param {{[propName: string]: SimpleChange}} changes
852
- *
853
- * @memberOf VisNetworkDirective
854
- */
855
- ngOnChanges(changes: {
856
- [propName: string]: SimpleChange;
857
- }): void;
858
- /**
859
- * Calls the destroy function for this network instance.
860
- *
861
- * @memberOf VisNetworkDirective
862
- */
863
- ngOnDestroy(): void;
864
- private createNetwork;
865
- static ɵfac: i0.ɵɵFactoryDeclaration<VisNetworkDirective, never>;
866
- static ɵdir: i0.ɵɵDirectiveDeclaration<VisNetworkDirective, "[visNetwork]", never, { "visNetwork": { "alias": "visNetwork"; "required": false; }; "visNetworkData": { "alias": "visNetworkData"; "required": false; }; "visNetworkOptions": { "alias": "visNetworkOptions"; "required": false; }; }, { "initialized": "initialized"; }, never, never, true, never>;
867
- }
868
-
869
- /**
870
- * A service to create, manage and control VisTimeline instances.
871
- *
872
- * @export
873
- * @class VisTimelineService
874
- */
875
- declare class VisTimelineService {
876
- private ngZone;
877
- /**
878
- * Fired when the current time bar redraws.
879
- * The rate depends on the zoom level.
880
- *
881
- * @type {EventEmitter<any>}
882
- * @memberOf VisTimelineService
883
- */
884
- currentTimeTick: EventEmitter<any>;
885
- /**
886
- * Fired when clicked inside the Timeline.
887
- *
888
- * @type {EventEmitter<any>}
889
- * @memberOf VisTimelineService
890
- */
891
- click: EventEmitter<any>;
892
- /**
893
- * Fired when right-clicked inside the Timeline.
894
- * Note that in order to prevent the context menu from showing up,
895
- * default behavior of the event must be stopped.
896
- *
897
- * @type {EventEmitter<any>}
898
- * @memberOf VisTimelineService
899
- */
900
- contextmenu: EventEmitter<any>;
901
- /**
902
- * Fired when double clicked inside the Timeline.
903
- *
904
- * @type {EventEmitter<any>}
905
- * @memberOf VisTimelineService
906
- */
907
- doubleClick: EventEmitter<any>;
908
- /**
909
- * Fired after the dragging of a group is finished.
910
- *
911
- * @type {EventEmitter<any>}
912
- * @memberOf VisTimelineService
913
- */
914
- groupDragged: EventEmitter<any>;
915
- /**
916
- * Fired once after each graph redraw.
917
- *
918
- * @type {EventEmitter<any>}
919
- * @memberOf VisTimelineService
920
- */
921
- changed: EventEmitter<any>;
922
- /**
923
- * Fired repeatedly when the timeline window is being changed.
924
- *
925
- * @type {EventEmitter<any>}
926
- * @memberOf VisTimelineService
927
- */
928
- rangechange: EventEmitter<any>;
929
- /**
930
- * Fired once after the timeline window has been changed.
931
- *
932
- * @type {EventEmitter<any>}
933
- * @memberOf VisTimelineService
934
- */
935
- rangechanged: EventEmitter<any>;
936
- /**
937
- * Fired after the user selects or deselects items by tapping or holding them.
938
- * When a use taps an already selected item, the select event is fired again.
939
- * Not fired when the method setSelectionis executed.
940
- *
941
- * @type {EventEmitter<any>}
942
- * @memberOf VisTimelineService
943
- */
944
- select: EventEmitter<any>;
945
- /**
946
- * Fired when the user moves the mouse over an item.
947
- *
948
- * @type {EventEmitter<any>}
949
- * @memberOf VisTimelineService
950
- */
951
- itemover: EventEmitter<any>;
952
- /**
953
- * Fired when the user moves the mouse out of an item.
954
- *
955
- * @type {EventEmitter<any>}
956
- * @memberOf VisTimelineService
957
- */
958
- itemout: EventEmitter<any>;
959
- /**
960
- * Fired repeatedly when the user is dragging the custom time bar.
961
- * Only available when the custom time bar is enabled.
962
- *
963
- * @type {EventEmitter<any>}
964
- * @memberOf VisTimelineService
965
- */
966
- timechange: EventEmitter<any>;
967
- /**
968
- * Fired once after the user has dragged the custom time bar.
969
- * Only available when the custom time bar is enabled.
970
- *
971
- * @type {EventEmitter<any>}
972
- * @memberOf VisTimelineService
973
- */
974
- timechanged: EventEmitter<any>;
975
- private events;
976
- private timelines;
977
- constructor(ngZone: NgZone);
978
- /**
979
- * Creates a new timeline instance.
980
- *
981
- * @param {string} visTimeline The timeline name/identifier.
982
- * @param {HTMLElement} container The HTML element that contains the timeline view.
983
- * @param {VisTimelineItems} items The initial timeline items.
984
- * @param {VisTimelineOptions} [options] The timeline options.
985
- *
986
- * @throws {Error} Thrown when timeline already exists.
987
- *
988
- * @memberOf VisTimelineService
989
- */
990
- createWithItems(visTimeline: string, container: HTMLElement, items: DataItemCollectionType, options?: TimelineOptions): void;
991
- /**
992
- * Creates a new timeline instance.
993
- *
994
- * @param {string} visTimeline The timeline name/identifier.
995
- * @param {HTMLElement} container The HTML element that contains the timeline view.
996
- * @param {VisTimelineItems} items The initial timeline items.
997
- * @param {VisTimelineGroups} groups The initial timeline groups.
998
- * @param {VisTimelineOptions} [options] The timeline options.
999
- *
1000
- * @throws {Error} Thrown when timeline already exists.
1001
- *
1002
- * @memberOf VisTimelineService
1003
- */
1004
- createWithItemsAndGroups(visTimeline: string, container: HTMLElement, items: DataItemCollectionType, groups: DataGroupCollectionType, options?: TimelineOptions): void;
1005
- /**
1006
- * Add new vertical bar representing a custom time that can be dragged by the user.
1007
- * The id is added as CSS class name of the custom time bar,
1008
- * allowing to style multiple time bars differently.
1009
- *
1010
- * @param {string} visTimeline The timeline name/identifier.
1011
- * @param {DateType} time Parameter time can be a Date, Number, or String, and is new Date() by default.
1012
- * @param {IdType} [id] Parameter id can be Number or String and is undefined by default.
1013
- * @returns {IdType} The method returns id of the created bar.
1014
- *
1015
- * @throws {Error} Thrown when timeline does not exist.
1016
- *
1017
- * @memberOf VisTimelineService
1018
- */
1019
- addCustomTime(visTimeline: string, time: DateType, id?: IdType$1): IdType$1;
1020
- /**
1021
- * Adjust the visible window such that it fits all items.
1022
- * See also function focus(id).
1023
- *
1024
- * @param {string} visTimeline The timeline name/identifier.
1025
- * @param {TimelineAnimationOptions} [options] Optional options.
1026
- *
1027
- * @throws {Error} Thrown when timeline does not exist.
1028
- *
1029
- * @memberOf VisTimelineService
1030
- */
1031
- fit(visTimeline: string, options?: TimelineAnimationOptions): void;
1032
- /**
1033
- * Adjust the visible window such that the selected item is centered on screen.
1034
- *
1035
- * @param {string} visTimeline The timeline name/identifier.
1036
- * @param {IdType} id The id of the item.
1037
- * @param {TimelineAnimationOptions} [options] Options options.
1038
- *
1039
- * @throws {Error} Thrown when timeline does not exist.
1040
- *
1041
- * @memberOf VisTimelineService
1042
- */
1043
- focusOnId(visTimeline: string, id: IdType$1, options?: TimelineAnimationOptions): void;
1044
- /**
1045
- * Adjust the visible window such that the selected items are centered on screen.
1046
- *
1047
- * @param {string} visTimeline The timeline name/identifier.
1048
- * @param {IdType[]} ids The item ids.
1049
- * @param {TimelineAnimationOptions} [options] Optional options.
1050
- *
1051
- * @throws {Error} Thrown when timeline does not exist.
1052
- *
1053
- * @memberOf VisTimelineService
1054
- */
1055
- focusOnIds(visTimeline: string, ids: IdType$1[], options?: TimelineAnimationOptions): void;
1056
- /**
1057
- * Get the current time.
1058
- * Only applicable when option showCurrentTime is true.
1059
- *
1060
- * @param {string} visTimeline The timeline name/identifier.
1061
- * @returns {Date} The current time.
1062
- *
1063
- * @throws {Error} Thrown when timeline does not exist.
1064
- *
1065
- * @memberOf VisTimelineService
1066
- */
1067
- getCurrentTime(visTimeline: string): Date;
1068
- /**
1069
- * Retrieve the custom time from the custom time bar with given id.
1070
- * Id is undefined by default.
1071
- *
1072
- * @param {string} visTimeline The timeline name/identifier.
1073
- * @param {IdType} [id] The time bar id.
1074
- * @returns {Date} The custom time.
1075
- *
1076
- * @throws {Error} Thrown when timeline does not exist.
1077
- *
1078
- * @memberOf VisTimelineService
1079
- */
1080
- getCustomTime(visTimeline: string, id?: IdType$1): Date;
1081
- /**
1082
- * Returns an Object with relevant properties from an event.
1083
- *
1084
- * @param {string} visTimeline The timeline name/identifier.
1085
- * @param {Event} event The event.
1086
- * @returns {VisTimelineEventPropertiesResult} Properties of an event
1087
- *
1088
- * @throws {Error} Thrown when timeline does not exist.
1089
- *
1090
- * @memberOf VisTimelineService
1091
- */
1092
- getEventProperties(visTimeline: string, event: Event): TimelineEventPropertiesResult;
1093
- /**
1094
- * Get the range of all the items as an object containing min: Date and max: Date.
1095
- *
1096
- * @param {string} visTimeline The timeline name/identifier.
1097
- * @returns {{ min: Date, max: Date }} The min and max dates.
1098
- *
1099
- * @throws {Error} Thrown when timeline does not exist.
1100
- *
1101
- * @memberOf VisTimelineService
1102
- */
1103
- getItemRange(visTimeline: string): {
1104
- min: Date;
1105
- max: Date;
1106
- };
1107
- /**
1108
- * Get an array with the ids of the currently selected items.
1109
- *
1110
- * @param {string} visTimeline The timeline name/identifier.
1111
- * @returns {IdType[]} The currently selected items.
1112
- *
1113
- * @throws {Error} Thrown when timeline does not exist.
1114
- *
1115
- * @memberOf VisTimelineService
1116
- */
1117
- getSelection(visTimeline: string): IdType$1[];
1118
- /**
1119
- * Get an array with the ids of the currently visible items.
1120
- *
1121
- * @param {string} visTimeline The timeline name/identifier.
1122
- * @returns {IdType[]} The currently visible items.
1123
- *
1124
- * @throws {Error} Thrown when timeline does not exist.
1125
- *
1126
- * @memberOf VisTimelineService
1127
- */
1128
- getVisibleItems(visTimeline: string): IdType$1[];
1129
- /**
1130
- * Get the current visible window.
1131
- *
1132
- * @param {string} visTimeline The timeline name/identifier.
1133
- * @returns {{ start: Date, end: Date }} Returns an object with properties start: Date and end: Date.
1134
- *
1135
- * @throws {Error} Thrown when timeline does not exist.
1136
- *
1137
- * @memberOf VisTimelineService
1138
- */
1139
- getWindow(visTimeline: string): {
1140
- start: Date;
1141
- end: Date;
1142
- };
1143
- /**
1144
- * Move the window such that given time is centered on screen.
1145
- *
1146
- * @param {string} visTimeline The timeline name/identifier.
1147
- * @param {DateType} time Parameter time can be a Date, Number, or String.
1148
- * @param {TimelineAnimationOptions} [options] Optional options.
1149
- *
1150
- * @throws {Error} Thrown when timeline does not exist.
1151
- *
1152
- * @memberOf VisTimelineService
1153
- */
1154
- moveTo(visTimeline: string, time: DateType, options?: TimelineAnimationOptions): void;
1155
- /**
1156
- * Force a redraw of the Timeline.
1157
- * The size of all items will be recalculated.
1158
- * Can be useful to manually redraw when option autoResize=false and the window has been resized,
1159
- * or when the items CSS has been changed.
1160
- *
1161
- * @param {string} visTimeline The timeline name/identifier.
1162
- *
1163
- * @throws {Error} Thrown when timeline does not exist.
1164
- *
1165
- * @memberOf VisTimelineService
1166
- */
1167
- redraw(visTimeline: string): void;
1168
- /**
1169
- * Remove vertical bars previously added to the timeline via addCustomTime method.
1170
- *
1171
- * @param {string} visTimeline The timeline name/identifier.
1172
- * @param {IdType} id Parameter id is the ID of the custom vertical bar returned by addCustomTime method.
1173
- *
1174
- * @throws {Error} Thrown when timeline does not exist.
1175
- *
1176
- * @memberOf VisTimelineService
1177
- */
1178
- removeCustomTime(visTimeline: string, id: IdType$1): void;
1179
- /**
1180
- * Set a current time.
1181
- * This can be used for example to ensure that a client's time is synchronized
1182
- * with a shared server time.
1183
- * Only applicable when option showCurrentTime is true.
1184
- *
1185
- * @param {string} visTimeline The timeline name/identifier.
1186
- * @param {DateType} time time can be a Date object, numeric timestamp, or ISO date string.
1187
- *
1188
- * @throws {Error} Thrown when timeline does not exist.
1189
- *
1190
- * @memberOf VisTimelineService
1191
- */
1192
- setCurrentTime(visTimeline: string, time: DateType): void;
1193
- /**
1194
- * Adjust the time of a custom time bar.
1195
- *
1196
- * @param {string} visTimeline The timeline name/identifier.
1197
- * @param {DateType} time Parameter time can be a Date object, numeric timestamp, or ISO date string.
1198
- * @param {IdType} [id] Parameter id is the id of the custom time bar, and is undefined by default.
1199
- *
1200
- * @throws {Error} Thrown when timeline does not exist.
1201
- *
1202
- * @memberOf VisTimelineService
1203
- */
1204
- setCustomTime(visTimeline: string, time: DateType, id?: IdType$1): void;
1205
- /**
1206
- * Adjust the title attribute of a custom time bar.
1207
- *
1208
- * @param {string} visTimeline The timeline name/identifier.
1209
- * @param {string} title Parameter title is the string to be set as title.
1210
- * Use empty string to hide the title completely.
1211
- * @param {IdType} [id] Parameter id is the id of the custom time bar, and is undefined by default.
1212
- *
1213
- * @throws {Error} Thrown when timeline does not exist.
1214
- *
1215
- * @memberOf VisTimelineService
1216
- */
1217
- setCustomTimeTitle(visTimeline: string, title: string, id?: IdType$1): void;
1218
- /**
1219
- * Set both groups and items at once.
1220
- * Both properties are optional.
1221
- * This is a convenience method for individually calling both setItems(items) and setGroups(groups).
1222
- * Both items and groups can be an Array with Objects, a DataSet (offering 2 way data binding),
1223
- * or a DataView (offering 1 way data binding).
1224
- * For each of the groups, the items of the timeline are filtered on the property group,
1225
- * which must correspond with the id of the group.
1226
- *
1227
- * @param {string} visTimeline The timeline name/identifier.
1228
- * @param {{ groups?: VisTimelineGroups; items?: VisTimelineItems }} data The new timline data.
1229
- *
1230
- * @throws {Error} Thrown when timeline does not exist.
1231
- *
1232
- * @memberOf VisTimelineService
1233
- */
1234
- setData(visTimeline: string, data: {
1235
- groups?: DataGroupCollectionType;
1236
- items?: DataItemCollectionType;
1237
- }): void;
1238
- /**
1239
- * Set a data set with groups for the Timeline.
1240
- * For each of the groups, the items of the timeline are filtered on the property group,
1241
- * which must correspond with the id of the group.
1242
- *
1243
- * @param {string} visTimeline The timeline name/identifier.
1244
- * @param {VisTimelineGroups} groups a DataSet (offering 2 way data binding)
1245
- *
1246
- * @throws {Error} Thrown when timeline does not exist.
1247
- *
1248
- * @memberOf VisTimelineService
1249
- */
1250
- setGroups(visTimeline: string, groups: DataGroupCollectionType): void;
1251
- /**
1252
- * Set a data set with items for the Timeline.
1253
- *
1254
- * @param {string} visTimeline The timeline name/identifier.
1255
- * @param {VisTimelineItems} items can be an Array with Objects, a DataSet (offering 2 way data binding)
1256
- *
1257
- * @throws {Error} Thrown when timeline does not exist.
1258
- *
1259
- * @memberOf VisTimelineService
1260
- */
1261
- setItems(visTimeline: string, items: DataItemCollectionType): void;
1262
- /**
1263
- * Set or update options.
1264
- * It is possible to change any option of the timeline at any time.
1265
- * You can for example switch orientation on the fly.
1266
- *
1267
- * @param {string} visTimeline The timeline name/identifier.
1268
- * @param {VisTimelineOptions} options The new options of the timeline.
1269
- *
1270
- * @throws {Error} Thrown when timeline does not exist.
1271
- *
1272
- * @memberOf VisTimelineService
1273
- */
1274
- setOptions(visTimeline: string, options: TimelineOptions): void;
1275
- /**
1276
- * Select one item by its id.#
1277
- * The currently selected items will be unselected.
1278
- *
1279
- * @param {string} visTimeline The timeline name/identifier.
1280
- * @param {IdType} id The id of the item that should be selected.
1281
- *
1282
- * @throws {Error} Thrown when timeline does not exist.
1283
- *
1284
- * @memberOf VisTimelineService
1285
- */
1286
- setSelectionToId(visTimeline: string, id: IdType$1): void;
1287
- /**
1288
- * Select multiple items by their id.
1289
- * The currently selected items will be unselected.
1290
- * To unselect all selected items, call `setSelection([])`.
1291
- *
1292
- * @param {string} visTimeline The timeline name/identifier.
1293
- * @param {IdType[]} ids The ids of the irems that should be selected.
1294
- *
1295
- * @throws {Error} Thrown when timeline does not exist.
1296
- *
1297
- * @memberOf VisTimelineService
1298
- */
1299
- setSelectionToIds(visTimeline: string, ids: IdType$1[]): void;
1300
- /**
1301
- * Set the current visible window.
1302
- *
1303
- * If the parameter value of start or end is null, the parameter will be left unchanged.
1304
- *
1305
- * @param {string} visTimeline The timeline name/identifier.
1306
- * @param {DateType} start The parameters start can be a Date, Number, or String.
1307
- * @param {DateType} end The parameters end can be a Date, Number, or String.
1308
- * @param {TimelineAnimationOptions} [options] Optional options.
1309
- *
1310
- * @throws {Error} Thrown when timeline does not exist.
1311
- *
1312
- * @memberOf VisTimelineService
1313
- */
1314
- setWindow(visTimeline: string, start: DateType, end: DateType, options?: TimelineAnimationOptions): void;
1315
- /**
1316
- * Destroy the Timeline.
1317
- * The timeline is removed from memory.
1318
- * All DOM elements and event listeners are cleaned up.
1319
- *
1320
- * @param {string} visTimeline The timeline name/identifier.
1321
- *
1322
- * @memberOf VisTimelineService
1323
- */
1324
- destroy(visTimeline: string): void;
1325
- /**
1326
- * Activates an event.
1327
- *
1328
- * @param {string} visTimeline The timeline name/identifier.
1329
- * @param {string} eventName The event name.
1330
- * @param {boolean} preventDefault Stops the default behavior of the event.
1331
- * @returns {boolean} Returns true when the event was activated.
1332
- *
1333
- * @memberOf VisTimelineService
1334
- */
1335
- on(visTimeline: string, eventName: string, preventDefault?: boolean): boolean;
1336
- /**
1337
- * Deactivates an event.
1338
- *
1339
- * @param {string} visTimeline The timeline name/identifier.
1340
- * @param {string} eventName The event name.
1341
- *
1342
- * @memberOf VisTimelineService
1343
- */
1344
- off(visTimeline: string, eventName: string): void;
1345
- /**
1346
- * Get the event emitter associated with the specified event name.
1347
- * @param {string} eventName The event name.
1348
- * @returns {EventEmitter<any>} The event emitter of the specified event name.
1349
- */
1350
- getEmitter(eventName: string): EventEmitter<any>;
1351
- private doesNotExistError;
1352
- private alreadyExistsError;
1353
- private wrapCallbacksWithNgZone;
1354
- static ɵfac: i0.ɵɵFactoryDeclaration<VisTimelineService, never>;
1355
- static ɵprov: i0.ɵɵInjectableDeclaration<VisTimelineService>;
1356
- }
1357
-
1358
- /**
1359
- * Use this directive with a div container to show timeline data.
1360
- *
1361
- * @export
1362
- * @class VisTimelineDirective
1363
- * @implements {OnInit}
1364
- * @implements {OnDestroy}
1365
- * @implements {OnChanges}
1366
- */
1367
- declare class VisTimelineDirective implements OnInit, OnDestroy, OnChanges {
1368
- private elementRef;
1369
- private visTimelineService;
1370
- /**
1371
- * The name or identifier of the timeline (must be unique in your application).
1372
- * This property is used once on init and must not be changed.
1373
- *
1374
- * @type {string}
1375
- * @memberOf VisTimelineDirective
1376
- */
1377
- visTimeline: string;
1378
- /**
1379
- * The data that will be used to create the timeline.
1380
- * Changes will be detected. If the reference changes then
1381
- * setData will be called on this timeline instance.
1382
- *
1383
- * @type {VisTimelineItems}
1384
- * @memberOf VisTimelineDirective
1385
- */
1386
- visTimelineItems: DataItemCollectionType;
1387
- /**
1388
- * The groups that will be used to create the timeline.
1389
- * Changes will be detected. If the reference changes then
1390
- * setGroups will be called on this timeline instance.
1391
- *
1392
- * @type {VisTimelineGroups}
1393
- * @memberOf VisTimelineDirective
1394
- */
1395
- visTimelineGroups: DataGroupCollectionType;
1396
- /**
1397
- * The options that will be used with this timeline.
1398
- * Changes will be detected. If the reference changes then
1399
- * setOptions will be called on this timeline instance.
1400
- *
1401
- * @type {VisTimelineOptions}
1402
- * @memberOf VisTimelineDirective
1403
- */
1404
- visTimelineOptions: TimelineOptions;
1405
- /**
1406
- * This event will be raised when the timline is initialized.
1407
- * At this point of time the timeline is successfully registered
1408
- * with the VisNetworkService and you can register to events.
1409
- * The event data is the name of the timeline as a string.
1410
- *
1411
- * @type {EventEmitter<any>}
1412
- * @memberOf VisTimelineDirective
1413
- */
1414
- initialized: EventEmitter<any>;
1415
- private visTimelineContainer;
1416
- private isInitialized;
1417
- /**
1418
- * Creates an instance of VisTimelineDirective.
1419
- *
1420
- * @param {ElementRef} elementRef The HTML element reference.
1421
- * @param {VisTimelineService} visTimelineService The VisTimelineService.
1422
- *
1423
- * @memberOf VisTimelineDirective
1424
- */
1425
- constructor(elementRef: ElementRef, visTimelineService: VisTimelineService);
1426
- /**
1427
- * Create the timeline when at least visNetwork and visNetworkData
1428
- * are defined.
1429
- *
1430
- * @memberOf VisTimelineDirective
1431
- */
1432
- ngOnInit(): void;
1433
- /**
1434
- * Update the timeline data, groups or options on reference changes to
1435
- * the visTimelineItems, visTimelineGroups or visTimelineOptions properties.
1436
- *
1437
- * @param {{[propName: string]: SimpleChange}} changes
1438
- *
1439
- * @memberOf VisTimelineDirective
1440
- */
1441
- ngOnChanges(changes: {
1442
- [propName: string]: SimpleChange;
1443
- }): void;
1444
- /**
1445
- * Calls the destroy function for this timeline instance.
1446
- *
1447
- *
1448
- * @memberOf VisTimelineDirective
1449
- */
1450
- ngOnDestroy(): void;
1451
- private createTimeline;
1452
- static ɵfac: i0.ɵɵFactoryDeclaration<VisTimelineDirective, never>;
1453
- static ɵdir: i0.ɵɵDirectiveDeclaration<VisTimelineDirective, "[visTimeline]", never, { "visTimeline": { "alias": "visTimeline"; "required": false; }; "visTimelineItems": { "alias": "visTimelineItems"; "required": false; }; "visTimelineGroups": { "alias": "visTimelineGroups"; "required": false; }; "visTimelineOptions": { "alias": "visTimelineOptions"; "required": false; }; }, { "initialized": "initialized"; }, never, never, true, never>;
1454
- }
1455
-
1456
- declare class VisModule {
1457
- static ɵfac: i0.ɵɵFactoryDeclaration<VisModule, never>;
1458
- static ɵmod: i0.ɵɵNgModuleDeclaration<VisModule, never, [typeof i1.CommonModule, typeof VisNetworkDirective, typeof VisTimelineDirective], [typeof VisNetworkDirective, typeof VisTimelineDirective]>;
1459
- static ɵinj: i0.ɵɵInjectorDeclaration<VisModule>;
1460
- }
1461
-
1462
- export { VisModule, VisNetworkDirective, VisNetworkService, VisTimelineDirective, VisTimelineService };