@balkangraph/orgchart.js 8.14.71 → 8.14.72
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/orgchart.d.ts +197 -61
- package/orgchart.js +1 -1
- package/package.json +1 -1
package/orgchart.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ declare class OrgChart extends OrgChartBase {
|
|
|
6
6
|
visibleNodeIds: Array<number | string>;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
+
* ```typescript
|
|
10
|
+
* let chart = new OrgChart('#tree', {});
|
|
11
|
+
* ```
|
|
9
12
|
* @param element HTML element or string selector for example '#tree'
|
|
10
13
|
* @param options configuration options
|
|
11
14
|
*/
|
|
@@ -15,7 +18,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
15
18
|
/**
|
|
16
19
|
* Updates the node data
|
|
17
20
|
* ```typescript
|
|
18
|
-
*
|
|
21
|
+
* let chart = new OrgChart('#tree', {});
|
|
19
22
|
* ...
|
|
20
23
|
* chart.update({ id: 1, name: "Updated Name", title: "Updated Title" });
|
|
21
24
|
* chart.draw();
|
|
@@ -27,7 +30,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
27
30
|
/**
|
|
28
31
|
* Removes specified node from nodes collection
|
|
29
32
|
* ```typescript
|
|
30
|
-
*
|
|
33
|
+
* let chart = new OrgChart('#tree', {});
|
|
31
34
|
* ...
|
|
32
35
|
* chart.remove(2);
|
|
33
36
|
* chart.draw();
|
|
@@ -39,7 +42,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
39
42
|
/**
|
|
40
43
|
* Adds new node to the nodes collection
|
|
41
44
|
* ```typescript
|
|
42
|
-
*
|
|
45
|
+
* let chart = new OrgChart('#tree', {});
|
|
43
46
|
* ...
|
|
44
47
|
* chart.add({ id: 2, pid: 1, name: "Ashley Barnett", title: "Sales Manager" })
|
|
45
48
|
* chart.draw();
|
|
@@ -51,7 +54,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
51
54
|
/**
|
|
52
55
|
* Gets node data.
|
|
53
56
|
* ```typescript
|
|
54
|
-
*
|
|
57
|
+
* let chart = new OrgChart('#tree', {});
|
|
55
58
|
* ...
|
|
56
59
|
* let node = chart.get(2);
|
|
57
60
|
* ```
|
|
@@ -61,7 +64,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
61
64
|
/**
|
|
62
65
|
* If specified node has assistant/s or partner/s as children will return false.
|
|
63
66
|
* ```typescript
|
|
64
|
-
*
|
|
67
|
+
* let chart = new OrgChart('#tree', {});
|
|
65
68
|
* ...
|
|
66
69
|
* let canRemove = chart.canRemove(2);
|
|
67
70
|
* ```
|
|
@@ -71,7 +74,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
71
74
|
/**
|
|
72
75
|
* Expands specified nodes.
|
|
73
76
|
* ```typescript
|
|
74
|
-
*
|
|
77
|
+
* let chart = new OrgChart('#tree', {});
|
|
75
78
|
* ...
|
|
76
79
|
* chart.expand(1, [2]);
|
|
77
80
|
* ```
|
|
@@ -83,7 +86,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
83
86
|
/**
|
|
84
87
|
* Collapses specified nodes.
|
|
85
88
|
* ```typescript
|
|
86
|
-
*
|
|
89
|
+
* let chart = new OrgChart('#tree', {});
|
|
87
90
|
* ...
|
|
88
91
|
* chart.collapse(1, [2]);
|
|
89
92
|
* ```
|
|
@@ -95,7 +98,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
95
98
|
/**
|
|
96
99
|
* Expand/Collapse lists of nodes.
|
|
97
100
|
* ```typescript
|
|
98
|
-
*
|
|
101
|
+
* let chart = new OrgChart('#tree', {});
|
|
99
102
|
* ...
|
|
100
103
|
* chart.expandCollapse(1, [2], [3]);
|
|
101
104
|
* ```
|
|
@@ -108,7 +111,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
108
111
|
/**
|
|
109
112
|
* Changes roots order.
|
|
110
113
|
* ```typescript
|
|
111
|
-
*
|
|
114
|
+
* let chart = new OrgChart('#tree', {});
|
|
112
115
|
* ...
|
|
113
116
|
* chart.changeRoots(1, [2]);
|
|
114
117
|
* ```
|
|
@@ -120,7 +123,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
120
123
|
/**
|
|
121
124
|
* Maximize the node. Without parameters maximize all nodes.
|
|
122
125
|
* ```typescript
|
|
123
|
-
*
|
|
126
|
+
* let chart = new OrgChart('#tree', {});
|
|
124
127
|
* ...
|
|
125
128
|
* chart.maximize();
|
|
126
129
|
* ```
|
|
@@ -132,7 +135,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
132
135
|
maximize(id?: string | number, horizontalCenter?: boolean, verticalCenter?: boolean, callback?: () => void): void;
|
|
133
136
|
/**
|
|
134
137
|
* ```typescript
|
|
135
|
-
*
|
|
138
|
+
* let chart = new OrgChart('#tree', {});
|
|
136
139
|
* ...
|
|
137
140
|
* chart.minimize();
|
|
138
141
|
* ```
|
|
@@ -144,7 +147,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
144
147
|
/**
|
|
145
148
|
* Load nodes data.
|
|
146
149
|
* ```typescript
|
|
147
|
-
*
|
|
150
|
+
* let chart = new OrgChart('#tree', {});
|
|
148
151
|
* ...
|
|
149
152
|
* chart.load([
|
|
150
153
|
* { id: 1, name: "Denny Curtis" },
|
|
@@ -160,7 +163,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
160
163
|
/**
|
|
161
164
|
* Updates the node data, redraws the chart and fires update event.
|
|
162
165
|
* ```typescript
|
|
163
|
-
*
|
|
166
|
+
* let chart = new OrgChart('#tree', {});
|
|
164
167
|
* ...
|
|
165
168
|
* chart.updateNode({ id: 4, pid: 2, name: "Updated Name", title: "Updated Title" });
|
|
166
169
|
* ```
|
|
@@ -173,7 +176,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
173
176
|
/**
|
|
174
177
|
* Loads nodes from xml.
|
|
175
178
|
* ```typescript
|
|
176
|
-
*
|
|
179
|
+
* let chart = new OrgChart('#tree', {});
|
|
177
180
|
* let xml = '<?xml version="1.0" encoding="utf-8" ?><nodes><node id="1" pids="2" name="Amber McKenzie" gender="female"/><node id="2" pids="1" name="Ava Field" gender="male"/><node id="3" pids="4,5" mid="1" fid="2" name="Peter Stevens" gender="male"/></nodes>';
|
|
178
181
|
* chart.loadXML(xml);
|
|
179
182
|
* ```
|
|
@@ -184,7 +187,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
184
187
|
/**
|
|
185
188
|
* Gets nodes as xml.
|
|
186
189
|
* ```typescript
|
|
187
|
-
*
|
|
190
|
+
* let chart = new OrgChart('#tree', {});
|
|
188
191
|
* let xml = chart.getXML();
|
|
189
192
|
* ```
|
|
190
193
|
*/
|
|
@@ -192,7 +195,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
192
195
|
/**
|
|
193
196
|
* Draws the chart.
|
|
194
197
|
* ```typescript
|
|
195
|
-
*
|
|
198
|
+
* let chart = new OrgChart('#tree', {});
|
|
196
199
|
* ...
|
|
197
200
|
* chart.update({ id: 1, name: "Updated Name", title: "Updated Title" });
|
|
198
201
|
* chart.draw();
|
|
@@ -205,7 +208,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
205
208
|
/**
|
|
206
209
|
* Gets the width of the container.
|
|
207
210
|
* ```typescript
|
|
208
|
-
*
|
|
211
|
+
* let chart = new OrgChart('#tree', {});
|
|
209
212
|
* ...
|
|
210
213
|
* let width = chart.width();
|
|
211
214
|
* ```
|
|
@@ -213,7 +216,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
213
216
|
width(): number;
|
|
214
217
|
/**
|
|
215
218
|
* ```typescript
|
|
216
|
-
*
|
|
219
|
+
* let chart = new OrgChart('#tree', {});
|
|
217
220
|
* ...
|
|
218
221
|
* let height = chart.height();
|
|
219
222
|
* ```
|
|
@@ -223,7 +226,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
223
226
|
/**
|
|
224
227
|
* Gets the view box attribute of the svg html element.
|
|
225
228
|
* ```typescript
|
|
226
|
-
*
|
|
229
|
+
* let chart = new OrgChart('#tree', {});
|
|
227
230
|
* ...
|
|
228
231
|
* let viewBox = chart.getViewBox();
|
|
229
232
|
* ```
|
|
@@ -232,7 +235,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
232
235
|
/**
|
|
233
236
|
* Sets the view box attribute of the svg html element.
|
|
234
237
|
* ```typescript
|
|
235
|
-
*
|
|
238
|
+
* let chart = new OrgChart('#tree', {});
|
|
236
239
|
* ...
|
|
237
240
|
* chart.setViewBox();
|
|
238
241
|
* ```
|
|
@@ -242,7 +245,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
242
245
|
/**
|
|
243
246
|
* Gets the current scale of the chart.
|
|
244
247
|
* ```typescript
|
|
245
|
-
*
|
|
248
|
+
* let chart = new OrgChart('#tree', {});
|
|
246
249
|
* ...
|
|
247
250
|
* let scale = chart.getScale();
|
|
248
251
|
* ```
|
|
@@ -254,7 +257,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
254
257
|
* Sets the current scale of the chart.
|
|
255
258
|
* Returns the actual scale limited by scaleMax and scaleMin
|
|
256
259
|
* ```typescript
|
|
257
|
-
*
|
|
260
|
+
* let chart = new OrgChart('#tree', {});
|
|
258
261
|
* ...
|
|
259
262
|
* chart.setScale(1.2);
|
|
260
263
|
* ```
|
|
@@ -264,7 +267,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
264
267
|
/**
|
|
265
268
|
* Animates specified node with ripple animation - highlight the node.
|
|
266
269
|
* ```typescript
|
|
267
|
-
*
|
|
270
|
+
* let chart = new OrgChart('#tree', {});
|
|
268
271
|
* ...
|
|
269
272
|
* chart.ripple(2);
|
|
270
273
|
* ```
|
|
@@ -276,7 +279,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
276
279
|
/**
|
|
277
280
|
* Centers specified node on the screen.
|
|
278
281
|
* ```typescript
|
|
279
|
-
*
|
|
282
|
+
* let chart = new OrgChart('#tree', {});
|
|
280
283
|
* ...
|
|
281
284
|
* chart.center(2);
|
|
282
285
|
* ```
|
|
@@ -294,7 +297,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
294
297
|
/**
|
|
295
298
|
* Fits the content to the visible area.
|
|
296
299
|
* ```typescript
|
|
297
|
-
*
|
|
300
|
+
* let chart = new OrgChart('#tree', {});
|
|
298
301
|
* ...
|
|
299
302
|
* chart.fit();
|
|
300
303
|
* ```
|
|
@@ -304,7 +307,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
304
307
|
/**
|
|
305
308
|
* Toggles full screen mode.
|
|
306
309
|
* ```typescript
|
|
307
|
-
*
|
|
310
|
+
* let chart = new OrgChart('#tree', {});
|
|
308
311
|
* ...
|
|
309
312
|
* chart.toggleFullScreen();
|
|
310
313
|
* ```
|
|
@@ -313,7 +316,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
313
316
|
/**
|
|
314
317
|
* Gets the node as {@link OrgChart.node} object.
|
|
315
318
|
* ```typescript
|
|
316
|
-
*
|
|
319
|
+
* let chart = new OrgChart('#tree', {});
|
|
317
320
|
* ...
|
|
318
321
|
* let node = chart.getNode(2);
|
|
319
322
|
* ```
|
|
@@ -324,7 +327,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
324
327
|
/**
|
|
325
328
|
* Adds new node to the nodes collection, redraws the chart and fires remove event
|
|
326
329
|
* ```typescript
|
|
327
|
-
*
|
|
330
|
+
* let chart = new OrgChart('#tree', {});
|
|
328
331
|
* ...
|
|
329
332
|
* chart.addNode({ id: 1, name: "Denny Curtis", title: "CEO" });
|
|
330
333
|
* ```
|
|
@@ -337,7 +340,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
337
340
|
/**
|
|
338
341
|
* Sets layout.
|
|
339
342
|
* ```typescript
|
|
340
|
-
*
|
|
343
|
+
* let chart = new OrgChart('#tree', {});
|
|
341
344
|
* ...
|
|
342
345
|
* chart.setLayout(OrgChart.tree);
|
|
343
346
|
* ```
|
|
@@ -349,7 +352,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
349
352
|
/**
|
|
350
353
|
* Sets orientation.
|
|
351
354
|
* ```typescript
|
|
352
|
-
*
|
|
355
|
+
* let chart = new OrgChart('#tree', {});
|
|
353
356
|
* ...
|
|
354
357
|
* chart.setOrientation(2);
|
|
355
358
|
* ```
|
|
@@ -361,7 +364,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
361
364
|
|
|
362
365
|
/**
|
|
363
366
|
* ```typescript
|
|
364
|
-
*
|
|
367
|
+
* let chart = new OrgChart('#tree', {});
|
|
365
368
|
* ...
|
|
366
369
|
* chart.moveNodesToVisibleArea([2, 3]);
|
|
367
370
|
* ```
|
|
@@ -374,7 +377,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
374
377
|
/**
|
|
375
378
|
* Search in the chart.
|
|
376
379
|
* ```typescript
|
|
377
|
-
*
|
|
380
|
+
* let chart = new OrgChart('#tree', {});
|
|
378
381
|
* ...
|
|
379
382
|
* chart.search("Ava");
|
|
380
383
|
* ```
|
|
@@ -393,7 +396,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
393
396
|
/**
|
|
394
397
|
* Gets collpased node ids of the specifeid node
|
|
395
398
|
* ```typescript
|
|
396
|
-
*
|
|
399
|
+
* let chart = new OrgChart('#tree', {});
|
|
397
400
|
* ...
|
|
398
401
|
* let ids = chart.getCollapsedIds(2);
|
|
399
402
|
* ```
|
|
@@ -403,7 +406,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
403
406
|
/**
|
|
404
407
|
* State to url.
|
|
405
408
|
* ```typescript
|
|
406
|
-
*
|
|
409
|
+
* let chart = new OrgChart('#tree', {});
|
|
407
410
|
* ...
|
|
408
411
|
* let url = chart.stateToUrl();
|
|
409
412
|
* ```
|
|
@@ -413,7 +416,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
413
416
|
/**
|
|
414
417
|
* Genereates unique identification number that can be used for new nodes
|
|
415
418
|
* ```typescript
|
|
416
|
-
*
|
|
419
|
+
* let chart = new OrgChart('#tree', {});
|
|
417
420
|
* ...
|
|
418
421
|
* let id = chart.generateId();
|
|
419
422
|
* ```
|
|
@@ -422,7 +425,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
422
425
|
/**
|
|
423
426
|
* Destroys the object.
|
|
424
427
|
* ```typescript
|
|
425
|
-
*
|
|
428
|
+
* let chart = new OrgChart('#tree', {});
|
|
426
429
|
* ...
|
|
427
430
|
* chart.destroy();
|
|
428
431
|
* ```
|
|
@@ -432,7 +435,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
432
435
|
* Replaces the id, pid, stpid, ppid and the ids in clinks, slinks, dottedLines, groupDottedLines.
|
|
433
436
|
* After the replacment updates the UI
|
|
434
437
|
* ```typescript
|
|
435
|
-
*
|
|
438
|
+
* let chart = new OrgChart('#tree', {});
|
|
436
439
|
* ...
|
|
437
440
|
* chart.replaceIds[{2:21, 3:31});
|
|
438
441
|
* ```
|
|
@@ -445,7 +448,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
445
448
|
/**
|
|
446
449
|
* Adds curved link.
|
|
447
450
|
* ```typescript
|
|
448
|
-
*
|
|
451
|
+
* let chart = new OrgChart('#tree', {});
|
|
449
452
|
* ...
|
|
450
453
|
* chart.addClink(4, 0, 'text')
|
|
451
454
|
* chart.draw();
|
|
@@ -459,7 +462,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
459
462
|
/**
|
|
460
463
|
* Removes curved link.
|
|
461
464
|
* ```typescript
|
|
462
|
-
*
|
|
465
|
+
* let chart = new OrgChart('#tree', {});
|
|
463
466
|
* ...
|
|
464
467
|
* chart.removeClink(4, 0)
|
|
465
468
|
* chart.draw();
|
|
@@ -471,7 +474,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
471
474
|
/**
|
|
472
475
|
* Adds second link.
|
|
473
476
|
* ```typescript
|
|
474
|
-
*
|
|
477
|
+
* let chart = new OrgChart('#tree', {});
|
|
475
478
|
* ...
|
|
476
479
|
* chart.addSlink(4, 0, 'text')
|
|
477
480
|
* chart.draw();
|
|
@@ -485,7 +488,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
485
488
|
/**
|
|
486
489
|
* Removes second link.
|
|
487
490
|
* ```typescript
|
|
488
|
-
*
|
|
491
|
+
* let chart = new OrgChart('#tree', {});
|
|
489
492
|
* ...
|
|
490
493
|
* chart.removeSlink(4, 0)
|
|
491
494
|
* chart.draw();
|
|
@@ -496,20 +499,39 @@ declare class OrgChart extends OrgChartBase {
|
|
|
496
499
|
removeSlink(from: string | number, to: string | number): OrgChart;
|
|
497
500
|
/**
|
|
498
501
|
* Gets svg html element
|
|
499
|
-
*
|
|
502
|
+
* ```typescript
|
|
503
|
+
* let chart = new OrgChart('#tree', {});
|
|
504
|
+
* ...
|
|
505
|
+
* let svg = chart.getSvg();
|
|
506
|
+
* ```
|
|
500
507
|
*/
|
|
501
508
|
getSvg(): SVGAElement;
|
|
502
509
|
/**
|
|
503
510
|
* Gets node html element
|
|
511
|
+
* ```typescript
|
|
512
|
+
* let chart = new OrgChart('#tree', {});
|
|
513
|
+
* ...
|
|
514
|
+
* let nodeElement = chart.getNodeElement(2);
|
|
515
|
+
* ```
|
|
504
516
|
* @param id node id
|
|
505
517
|
*/
|
|
506
518
|
getNodeElement(id: string | number): HTMLElement;
|
|
507
519
|
/**
|
|
508
520
|
* Gets menu button html element
|
|
521
|
+
* ```typescript
|
|
522
|
+
* let chart = new OrgChart('#tree', {});
|
|
523
|
+
* ...
|
|
524
|
+
* let menuButton = chart.getMenuButton(2);
|
|
525
|
+
* ```
|
|
509
526
|
*/
|
|
510
527
|
getMenuButton(): HTMLElement;
|
|
511
528
|
/**
|
|
512
529
|
* Exports the details form to PDF.
|
|
530
|
+
* ```typescript
|
|
531
|
+
* let chart = new OrgChart('#tree', {});
|
|
532
|
+
* ...
|
|
533
|
+
* chart.exportPDFProfile({nodeId: 2});
|
|
534
|
+
* ```
|
|
513
535
|
* @param options export options
|
|
514
536
|
* @param callback called when the export completes
|
|
515
537
|
* {@link https://balkan.app/OrgChartJS/Docs/Exporting | See doc...}
|
|
@@ -517,6 +539,11 @@ declare class OrgChart extends OrgChartBase {
|
|
|
517
539
|
exportPDFProfile(options: OrgChart.exportOptions, callback?: () => void): void;
|
|
518
540
|
/**
|
|
519
541
|
* Exports the details form to PDF.
|
|
542
|
+
* ```typescript
|
|
543
|
+
* let chart = new OrgChart('#tree', {});
|
|
544
|
+
* ...
|
|
545
|
+
* chart.exportPNGProfile({nodeId: 2});
|
|
546
|
+
* ```
|
|
520
547
|
* @param options export options
|
|
521
548
|
* @param callback called when the export completes
|
|
522
549
|
* {@link https://balkan.app/OrgChartJS/Docs/Exporting | See doc...}
|
|
@@ -524,24 +551,44 @@ declare class OrgChart extends OrgChartBase {
|
|
|
524
551
|
exportPNGProfile(options: OrgChart.exportOptions, callback?: () => void): void;
|
|
525
552
|
/**
|
|
526
553
|
* Exports to CSV
|
|
554
|
+
* ```typescript
|
|
555
|
+
* let chart = new OrgChart('#tree', {});
|
|
556
|
+
* ...
|
|
557
|
+
* chart.exportCSV();
|
|
558
|
+
* ```
|
|
527
559
|
* @param filename The name of the exported file
|
|
528
560
|
* {@link https://balkan.app/OrgChartJS/Docs/Exporting | See doc...}
|
|
529
561
|
*/
|
|
530
|
-
exportCSV(filename
|
|
562
|
+
exportCSV(filename?: string | OrgChart.exportCSVXMLJSONOptions): void;
|
|
531
563
|
/**
|
|
532
564
|
* Exports to XML
|
|
565
|
+
* ```typescript
|
|
566
|
+
* let chart = new OrgChart('#tree', {});
|
|
567
|
+
* ...
|
|
568
|
+
* chart.exportXML();
|
|
569
|
+
* ```
|
|
533
570
|
* @param filename The name of the exported file
|
|
534
571
|
* {@link https://balkan.app/OrgChartJS/Docs/Exporting | See doc...}
|
|
535
572
|
*/
|
|
536
573
|
exportXML(filename: string | OrgChart.exportCSVXMLJSONOptions): void;
|
|
537
574
|
/**
|
|
538
575
|
* Exports to JSON
|
|
576
|
+
* ```typescript
|
|
577
|
+
* let chart = new OrgChart('#tree', {});
|
|
578
|
+
* ...
|
|
579
|
+
* chart.exportJSON();
|
|
580
|
+
* ```
|
|
539
581
|
* @param filename The name of the exported file
|
|
540
582
|
* {@link https://balkan.app/OrgChartJS/Docs/Exporting | See doc...}
|
|
541
583
|
*/
|
|
542
|
-
exportJSON(filename
|
|
584
|
+
exportJSON(filename?: string | OrgChart.exportCSVXMLJSONOptions ): void;
|
|
543
585
|
|
|
544
586
|
/**
|
|
587
|
+
* ```typescript
|
|
588
|
+
* let chart = new OrgChart('#tree', {});
|
|
589
|
+
* ...
|
|
590
|
+
* chart.shareProfile(2);
|
|
591
|
+
* ```
|
|
545
592
|
* Shares node data, uses build-in device sharing functionallity.
|
|
546
593
|
* @param id node id
|
|
547
594
|
* {@link https://balkan.app/OrgChartJS/Docs/Exporting | See doc...}
|
|
@@ -549,6 +596,11 @@ declare class OrgChart extends OrgChartBase {
|
|
|
549
596
|
shareProfile(id: string | number): void;
|
|
550
597
|
/**
|
|
551
598
|
* Exports to PDF document
|
|
599
|
+
* ```typescript
|
|
600
|
+
* let chart = new OrgChart('#tree', {});
|
|
601
|
+
* ...
|
|
602
|
+
* chart.exportPDF();
|
|
603
|
+
* ```
|
|
552
604
|
* @param options export options
|
|
553
605
|
* @param callback called when the export completes
|
|
554
606
|
* {@link https://balkan.app/OrgChartJS/Docs/Exporting | See doc...}
|
|
@@ -556,6 +608,11 @@ declare class OrgChart extends OrgChartBase {
|
|
|
556
608
|
exportPDF(options?: OrgChart.exportOptions, callback?: () => void): void;
|
|
557
609
|
/**
|
|
558
610
|
* Exports to PNG document
|
|
611
|
+
* ```typescript
|
|
612
|
+
* let chart = new OrgChart('#tree', {});
|
|
613
|
+
* ...
|
|
614
|
+
* chart.exportPNG();
|
|
615
|
+
* ```
|
|
559
616
|
* @param options export options
|
|
560
617
|
* @param callback called when the export completes
|
|
561
618
|
* {@link https://balkan.app/OrgChartJS/Docs/Exporting | See doc...}
|
|
@@ -563,6 +620,11 @@ declare class OrgChart extends OrgChartBase {
|
|
|
563
620
|
exportPNG(options?: OrgChart.exportOptions, callback?: () => void): void;
|
|
564
621
|
/**
|
|
565
622
|
* Exports to SVG document
|
|
623
|
+
* ```typescript
|
|
624
|
+
* let chart = new OrgChart('#tree', {});
|
|
625
|
+
* ...
|
|
626
|
+
* chart.exportSVG();
|
|
627
|
+
* ```
|
|
566
628
|
* @param options export options
|
|
567
629
|
* @param callback called when the export completes
|
|
568
630
|
* {@link https://balkan.app/OrgChartJS/Docs/Exporting | See doc...}
|
|
@@ -570,23 +632,43 @@ declare class OrgChart extends OrgChartBase {
|
|
|
570
632
|
exportSVG(options?: OrgChart.exportOptions, callback?: () => void): void;
|
|
571
633
|
/**
|
|
572
634
|
* Imports CSV file.
|
|
635
|
+
* ```typescript
|
|
636
|
+
* let chart = new OrgChart('#tree', {});
|
|
637
|
+
* ...
|
|
638
|
+
* chart.importCSV();
|
|
639
|
+
* ```
|
|
573
640
|
* {@link https://balkan.app/OrgChartJS/Docs/Importing | See doc...}
|
|
574
641
|
*/
|
|
575
642
|
importCSV(): void;
|
|
576
643
|
/**
|
|
577
644
|
* Imports XML file.
|
|
645
|
+
* ```typescript
|
|
646
|
+
* let chart = new OrgChart('#tree', {});
|
|
647
|
+
* ...
|
|
648
|
+
* chart.importXML();
|
|
649
|
+
* ```
|
|
578
650
|
* {@link https://balkan.app/OrgChartJS/Docs/Importing | See doc...}
|
|
579
651
|
*/
|
|
580
652
|
importXML(): void;
|
|
581
653
|
|
|
582
654
|
/**
|
|
583
655
|
* Imports JSON file.
|
|
656
|
+
* ```typescript
|
|
657
|
+
* let chart = new OrgChart('#tree', {});
|
|
658
|
+
* ...
|
|
659
|
+
* chart.importJSON();
|
|
660
|
+
* ```
|
|
584
661
|
* {@link https://balkan.app/OrgChartJS/Docs/Importing | See doc...}
|
|
585
662
|
*/
|
|
586
663
|
importJSON(): void;
|
|
587
664
|
|
|
588
665
|
/**
|
|
589
666
|
* Zoom out or zoom in the chart.
|
|
667
|
+
* ```typescript
|
|
668
|
+
* let chart = new OrgChart('#tree', {});
|
|
669
|
+
* ...
|
|
670
|
+
* chart.zoom(true);
|
|
671
|
+
* ```
|
|
590
672
|
* @param delta true for zoom in, false for zoom out or scale number, if scale is > 1 it will zoom in and scale < 1 zoom out.
|
|
591
673
|
* @param center array [x, y], where x is x percantege from the width and y is y percentage from the height.
|
|
592
674
|
* @param shouldAnimate should animate
|
|
@@ -596,6 +678,11 @@ declare class OrgChart extends OrgChartBase {
|
|
|
596
678
|
|
|
597
679
|
/**
|
|
598
680
|
* Magnify(Zoom in) specific node in the chart.
|
|
681
|
+
* ```typescript
|
|
682
|
+
* let chart = new OrgChart('#tree', {});
|
|
683
|
+
* ...
|
|
684
|
+
* chart.magnify(2, 1.25);
|
|
685
|
+
* ```
|
|
599
686
|
* @param id id of the node
|
|
600
687
|
* @param scale scale to magnify
|
|
601
688
|
* @param front show on front or back
|
|
@@ -605,49 +692,91 @@ declare class OrgChart extends OrgChartBase {
|
|
|
605
692
|
|
|
606
693
|
/**
|
|
607
694
|
* Starts the move
|
|
695
|
+
* ```typescript
|
|
696
|
+
* let chart = new OrgChart('#tree', {});
|
|
697
|
+
* ...
|
|
698
|
+
* chart.moveStart({right: true});
|
|
699
|
+
* ```
|
|
608
700
|
* @param movePosition move position
|
|
609
701
|
* @param tick callback function in each step
|
|
610
702
|
* @param func the name of the animation function, for example OrgChart.anim.inSin
|
|
611
703
|
* @param duration duration before going to 100 percent speed
|
|
612
704
|
*/
|
|
613
705
|
moveStart(movePosition: OrgChart.move, tick?: () => void, func?: OrgChart.anim, duration?: number): void;
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* Ends the move
|
|
709
|
+
* ```typescript
|
|
710
|
+
* let chart = new OrgChart('#tree', {});
|
|
711
|
+
* ...
|
|
712
|
+
* chart.moveEnd();
|
|
713
|
+
*/
|
|
714
|
+
moveEnd(): void;
|
|
715
|
+
|
|
614
716
|
/**
|
|
615
717
|
* Undo data operations like adding/removing nodes. Set undoRedoStorageName option before calling this method.
|
|
718
|
+
* ```typescript
|
|
719
|
+
* let chart = new OrgChart('#tree', {});
|
|
720
|
+
* ...
|
|
721
|
+
* chart.undo();
|
|
722
|
+
* ```
|
|
616
723
|
* @param callback called when the animation completes
|
|
617
724
|
*/
|
|
618
725
|
undo(callback?: () => void): void;
|
|
619
726
|
/**
|
|
620
727
|
* Redo data operations like adding/removing nodes. Set undoRedoStorageName option before calling this method.
|
|
728
|
+
* ```typescript
|
|
729
|
+
* let chart = new OrgChart('#tree', {});
|
|
730
|
+
* ...
|
|
731
|
+
* chart.redo();
|
|
732
|
+
* ```
|
|
621
733
|
* @param callback called when the animation completes
|
|
622
734
|
*/
|
|
623
735
|
redo(callback?: () => void): void;
|
|
624
736
|
|
|
625
737
|
/**
|
|
626
738
|
* Clears all Redo stack steps.
|
|
739
|
+
* ```typescript
|
|
740
|
+
* let chart = new OrgChart('#tree', {});
|
|
741
|
+
* ...
|
|
742
|
+
* chart.clearRedo();
|
|
743
|
+
* ```
|
|
627
744
|
*/
|
|
628
745
|
clearRedo(): void;
|
|
629
746
|
|
|
630
747
|
/**
|
|
631
748
|
* Clears all Undo stack steps.
|
|
749
|
+
* ```typescript
|
|
750
|
+
* let chart = new OrgChart('#tree', {});
|
|
751
|
+
* ...
|
|
752
|
+
* chart.clearUndo();
|
|
753
|
+
* ```
|
|
632
754
|
*/
|
|
633
755
|
clearUndo(): void;
|
|
634
756
|
/**
|
|
635
757
|
* Returns the number of Undo stack steps
|
|
758
|
+
* ```typescript
|
|
759
|
+
* let chart = new OrgChart('#tree', {});
|
|
760
|
+
* ...
|
|
761
|
+
* let undoSteps = chart.undoStepsCount();
|
|
762
|
+
* ```
|
|
636
763
|
*/
|
|
637
764
|
undoStepsCount(): number;
|
|
638
765
|
/**
|
|
639
766
|
* Returns the number of Redo stack steps
|
|
767
|
+
* ```typescript
|
|
768
|
+
* let chart = new OrgChart('#tree', {});
|
|
769
|
+
* ...
|
|
770
|
+
* let redoSteps = chart.redoStepsCount();
|
|
771
|
+
* ```
|
|
640
772
|
*/
|
|
641
773
|
redoStepsCount(): number;
|
|
642
|
-
|
|
643
|
-
* Ends the move
|
|
644
|
-
*/
|
|
645
|
-
moveEnd(): void;
|
|
774
|
+
|
|
646
775
|
|
|
647
776
|
/**
|
|
648
777
|
* The onField() method of the OrgChart class sets up a function that will be called whenever the specified event is delivered to the target.
|
|
649
778
|
* ```typescript
|
|
650
|
-
*
|
|
779
|
+
* let chart = new OrgChart('#tree', {});
|
|
651
780
|
* chart.onField((args) => {
|
|
652
781
|
* //return false; to cancel
|
|
653
782
|
* });
|
|
@@ -685,8 +814,8 @@ declare class OrgChart extends OrgChartBase {
|
|
|
685
814
|
|
|
686
815
|
/**
|
|
687
816
|
* Occurs when the nodes in OrgChart has been created and loaded to the DOM.
|
|
688
|
-
*
|
|
689
|
-
*
|
|
817
|
+
* ```typescript
|
|
818
|
+
* let chart = new OrgChart('#tree', {});
|
|
690
819
|
* chart.onInit(() => {
|
|
691
820
|
* });
|
|
692
821
|
* chart.load(nodes);
|
|
@@ -696,12 +825,10 @@ declare class OrgChart extends OrgChartBase {
|
|
|
696
825
|
*/
|
|
697
826
|
onInit(listener: (this: OrgChart) => void): OrgChart;
|
|
698
827
|
|
|
699
|
-
|
|
700
|
-
|
|
701
828
|
/**
|
|
702
829
|
* The onRedraw event occurs when the chart is redrawed.
|
|
703
830
|
* ```typescript
|
|
704
|
-
*
|
|
831
|
+
* let chart = new OrgChart('#tree', {});
|
|
705
832
|
* chart.onRedraw(() => {
|
|
706
833
|
* });
|
|
707
834
|
* chart.load(nodes);
|
|
@@ -713,8 +840,8 @@ declare class OrgChart extends OrgChartBase {
|
|
|
713
840
|
|
|
714
841
|
/**
|
|
715
842
|
* The onExpandCollpaseButtonClick event occurs when the chart is redrawed.
|
|
716
|
-
*
|
|
717
|
-
*
|
|
843
|
+
* ```typescript
|
|
844
|
+
* let chart = new OrgChart('#tree', {});
|
|
718
845
|
* chart.onExpandCollpaseButtonClick(() => {
|
|
719
846
|
* //return false; to cancel the operation
|
|
720
847
|
* });
|
|
@@ -737,10 +864,11 @@ declare class OrgChart extends OrgChartBase {
|
|
|
737
864
|
*/
|
|
738
865
|
ids: Array<number | string>
|
|
739
866
|
}) => void): OrgChart;
|
|
867
|
+
|
|
740
868
|
/**
|
|
741
869
|
* Occurs in the beginning of the export. Extra css styles can be added to the exported document using this event listener or show loading image.
|
|
742
870
|
* ```typescript
|
|
743
|
-
*
|
|
871
|
+
* let chart = new OrgChart('#tree', {});
|
|
744
872
|
* chart.onExportStart(() => {
|
|
745
873
|
* args.styles += '<link href="https://fonts.googleapis.com/css?family=Gochi+Hand" rel="stylesheet">';
|
|
746
874
|
* //return false; to cancel the operation
|
|
@@ -795,10 +923,11 @@ declare class OrgChart extends OrgChartBase {
|
|
|
795
923
|
*/
|
|
796
924
|
nodes: Array<object>
|
|
797
925
|
}) => void): OrgChart;
|
|
926
|
+
|
|
798
927
|
/**
|
|
799
928
|
* Occurs in the beginning of the export. Use this event listener to hide loading image or upload exported document to your server using ArrayBuffer argument.
|
|
800
929
|
* ```typescript
|
|
801
|
-
*
|
|
930
|
+
* let chart = new OrgChart('#tree', {});
|
|
802
931
|
* chart.onExportEnd(() => {
|
|
803
932
|
* //return false; to cancel the operation for example id you prefer the exported document to not download
|
|
804
933
|
* });
|
|
@@ -855,10 +984,11 @@ declare class OrgChart extends OrgChartBase {
|
|
|
855
984
|
*/
|
|
856
985
|
styles: string,
|
|
857
986
|
}) => void): OrgChart;
|
|
987
|
+
|
|
858
988
|
/**
|
|
859
989
|
* On node click event listener.
|
|
860
990
|
* ```typescript
|
|
861
|
-
*
|
|
991
|
+
* let chart = new OrgChart('#tree', {});
|
|
862
992
|
* chart.onNodeClick(() => {
|
|
863
993
|
* //return false; to cancel the operation
|
|
864
994
|
* });
|
|
@@ -877,10 +1007,11 @@ declare class OrgChart extends OrgChartBase {
|
|
|
877
1007
|
*/
|
|
878
1008
|
event: any
|
|
879
1009
|
}) => void): OrgChart;
|
|
1010
|
+
|
|
880
1011
|
/**
|
|
881
1012
|
* On node double click event listener.
|
|
882
|
-
*
|
|
883
|
-
*
|
|
1013
|
+
* ```typescript
|
|
1014
|
+
* let chart = new OrgChart('#tree', {});
|
|
884
1015
|
* chart.onNodeDoubleClick(() => {
|
|
885
1016
|
* //return false; to cancel the operation
|
|
886
1017
|
* });
|
|
@@ -896,9 +1027,14 @@ declare class OrgChart extends OrgChartBase {
|
|
|
896
1027
|
data: object
|
|
897
1028
|
}) => void): OrgChart;
|
|
898
1029
|
|
|
1030
|
+
/**
|
|
1031
|
+
* ?
|
|
1032
|
+
*/
|
|
899
1033
|
element: HTMLElement;
|
|
900
1034
|
|
|
1035
|
+
|
|
901
1036
|
editUI: OrgChart.editUI;
|
|
1037
|
+
|
|
902
1038
|
searchUI: OrgChart.searchUI;
|
|
903
1039
|
nodeMenuUI: OrgChart.menuUI;
|
|
904
1040
|
filterUI: OrgChart.filterUI;
|