@balkangraph/orgchart.js 8.14.77 → 8.14.79

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.
Files changed (3) hide show
  1. package/orgchart.d.ts +377 -288
  2. package/orgchart.js +1 -1
  3. package/package.json +1 -1
package/orgchart.d.ts CHANGED
@@ -1,6 +1,292 @@
1
1
 
2
2
 
3
- declare class OrgChart extends OrgChartBase {
3
+ declare class OrgChart {
4
+ /**
5
+ * SVG icons
6
+ * @param w - width
7
+ * @param h - height
8
+ * @param c - color
9
+ * @param x - X position
10
+ * @param y - Y position
11
+ * @returns string with the SVG definition
12
+ */
13
+ static icon: {
14
+ /**
15
+ * ```typescript
16
+ * let pngIcon = OrgChart.icon.png(24, 24, "#7A7A7A");
17
+ * ```
18
+ */
19
+ png: (w: string| number, h: string | number, c: string) => string,
20
+ /**
21
+ * ```typescript
22
+ * let pdfIcon = OrgChart.icon.pdf(24, 24, "#7A7A7A");
23
+ * ```
24
+ */
25
+ pdf: (w: string | number, h: string | number, c: string) => string,
26
+ /**
27
+ * ```typescript
28
+ * let svgIcon = OrgChart.icon.svg(24, 24, "#7A7A7A");
29
+ * ```
30
+ */
31
+ svg: (w: string| number, h: string| number, c: string | number) => string,
32
+ /**
33
+ * ```typescript
34
+ * let csvIcon = OrgChart.icon.csv(24, 24, "#7A7A7A");
35
+ * ```
36
+ */
37
+ csv: (w: string| number, h: string| number, c: string| number) => string,
38
+ /**
39
+ * ```typescript
40
+ * let excelIcon = OrgChart.icon.excel(24, 24, "#7A7A7A");
41
+ * ```
42
+ */
43
+ excel: (w: string| number, h: string| number, c: string| number) => string,
44
+ /**
45
+ * ```typescript
46
+ * let editIcon = OrgChart.icon.edit(24, 24, "#7A7A7A");
47
+ * ```
48
+ */
49
+ edit: (w: string| number, h: string| number, c: string| number) => string,
50
+ /**
51
+ * ```typescript
52
+ * let detailsIcon = OrgChart.icon.details(24, 24, "#7A7A7A");
53
+ * ```
54
+ */
55
+ details: (w: string| number, h: string| number, c: string| number) => string,
56
+ /**
57
+ * ```typescript
58
+ * let removeIcon = OrgChart.icon.remove(24, 24, "#7A7A7A");
59
+ * ```
60
+ */
61
+ remove: (w: string| number, h: string| number, c: string| number) => string,
62
+ /**
63
+ * ```typescript
64
+ * let addIcon = OrgChart.icon.add(24, 24, "#7A7A7A");
65
+ * ```
66
+ */
67
+ add: (w: string| number, h: string| number, c: string| number) => string,
68
+ /**
69
+ * ```typescript
70
+ * let xmlIcon = OrgChart.icon.xml(24, 24, "#7A7A7A");
71
+ * ```
72
+ */
73
+ xml: (w: string| number, h: string| number, c: string| number) => string,
74
+ /**
75
+ * ```typescript
76
+ * let linkIcon = OrgChart.icon.link(24, 24, "#7A7A7A");
77
+ * ```
78
+ */
79
+ link: (w: string| number, h: string| number, c: string| number) => string,
80
+ /**
81
+ * ```typescript
82
+ * let happyIcon = OrgChart.icon.happy(24, 24, "#7A7A7A");
83
+ * ```
84
+ */
85
+ happy: (w: string| number, h: string| number, c: string| number) => string,
86
+ /**
87
+ * ```typescript
88
+ * let sadIcon = OrgChart.icon.sad(24, 24, "#7A7A7A");
89
+ * ```
90
+ */
91
+ sad: (w: string| number, h: string| number, c: string| number) => string,
92
+ /**
93
+ * ```typescript
94
+ * let shareIcon = OrgChart.icon.share(24, 24, "#7A7A7A");
95
+ * ```
96
+ */
97
+ share: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string,
98
+ /**
99
+ * ```typescript
100
+ * let userIcon = OrgChart.icon.user(24, 24, "#7A7A7A");
101
+ * ```
102
+ */
103
+ user: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string,
104
+ /**
105
+ * ```typescript
106
+ * let undoIcon = OrgChart.icon.undo(24, 24, "#7A7A7A");
107
+ * ```
108
+ */
109
+ undo: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string,
110
+ /**
111
+ * ```typescript
112
+ * let redoIcon = OrgChart.icon.redo(24, 24, "#7A7A7A");
113
+ * ```
114
+ */
115
+ redo: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string
116
+ }
117
+
118
+
119
+
120
+ /**
121
+ * Can update link
122
+ * @param id child id
123
+ * @param pid parent id
124
+ */
125
+ canUpdateLink(id: string | number, pid: string | number): boolean;
126
+
127
+ /**
128
+ * Removes specified node from nodes collection, redraws the chart and fires remove event.
129
+ * @param id identification number of the node
130
+ * @param callback called at the end of animation
131
+ * @param fireEvent indicates if the remove event will be called or not
132
+ */
133
+ removeNode(id: string | number, callback?: () => void, fireEvent?: boolean): void;
134
+
135
+
136
+
137
+
138
+
139
+ /**
140
+ * The on() method of the OrgChart class sets up a function that will be called whenever the specified event is delivered to the target. *
141
+ * @category Event Listeners
142
+ * @param type A case-sensitive string representing the event type to listen for.
143
+ * @param listener The object that receives a notification when an event of the specified type occurs. This must be a JavaScript function.
144
+ */
145
+ on(type: "init" | "field" | "update" | "add" | "remove" | "renderbuttons" | "label" | "render-link" | "drag" | "drop" | "redraw" | "expcollclick" | "exportstart" | "exportend" | "click" | "dbclick" | "slink-click" | "clink-click" | "up-click" | "searchclick" | "import" | "updated" | "key-down" | "visibility-change" | "renderdefs" | "render" | "prerender" | "screen-reader-text" | "ready" | "ripple" | "node-initialized" | "nodes-initialized" | "node-layout", listener: (sender: OrgChart, args?: any, args1?: any, args2?: any) => void | boolean): OrgChart;
146
+
147
+ /**
148
+ * Removes an event listener previously registered. The event listener to be removed is identified using a combination of the event type and the event listener function itself. Returns true if success and false if fail.
149
+ * @param type A string which specifies the type of event for which to remove an event listener
150
+ * @param listener The event listener function of the event handler to remove from the event target
151
+ */
152
+ removeListener(type: "init" | "field" | "update" | "add" | "remove" | "renderbuttons" | "label" | "render-link" | "drag" | "drop" | "redraw" | "expcollclick" | "exportstart" | "exportend" | "click" | "dbclick" | "slink-click" | "clink-click" | "up-click" | "searchclick" | "import" | "updated" | "key-down" | "visibility-change" | "renderdefs" | "render" | "prerender" | "screen-reader-text" | "ready" | "ripple" | "node-initialized" | "nodes-initialized" | "node-layout", listener?: () => void): boolean;
153
+
154
+
155
+ /**
156
+ * Occurs when the node data has been updated by updateNode method.
157
+ * ```typescript
158
+ * var chart = new OrgChart('#tree', {});
159
+ * chart.onUpdateNode((args) => {
160
+ * //return false; to cancel the operation
161
+ * });
162
+ * ```
163
+ * @category Event Listeners
164
+ * @param listener
165
+ */
166
+ onUpdateNode(listener: (args: {
167
+ /**
168
+ * old node data
169
+ */
170
+ oldData: object,
171
+ /**
172
+ * new node data
173
+ */
174
+ newData: object
175
+ }) => void): OrgChart;
176
+
177
+ /**
178
+ * Occurs when new nodes are added, removed, updated or imported, also when slink or clink is added or removed and after undo or redo operations.
179
+ * Use this event listener to synch your server side database with this.config.nodes, this.config.clinks, this.config.slinks etc.
180
+ * ```typescript
181
+ * var chart = new OrgChart('#tree', {});
182
+ * chart.onUpdated(() => {
183
+ * //Update your server database with this.config.nodes, this.config.clinks, this.config.slinks etc.
184
+ * });
185
+ * ```
186
+ * @category Event Listeners
187
+ */
188
+ onUpdated(): OrgChart;
189
+
190
+
191
+
192
+
193
+ /**
194
+ * Occurs when a node has been removed by removeNode method.
195
+ * ```typescript
196
+ * var chart = new OrgChart('#tree', {});
197
+ * chart.onRemoveNode((args) => {
198
+ * //return false; to cancel the operation
199
+ * });
200
+ * ```
201
+ * @category Event Listeners
202
+ * @param listener
203
+ */
204
+ onRemoveNode(listener: (args: {
205
+ /**
206
+ * node id
207
+ */
208
+ id: number | string,
209
+ /**
210
+ * parent ids and sub tree parents ids that needs to be updated on the server. For example if you remove a node that has children all chilren nodes will change their pid to the parent node id of the removed node.
211
+ */
212
+ newPidsAndStpidsForIds: {
213
+ newPidsForIds: { [key in any]: string | number },
214
+ newStpidsForIds: { [key in any]: string | number }
215
+ }
216
+ }) => void): OrgChart;
217
+
218
+ /**
219
+ * Occurs when a node has been added by addNode method.
220
+ * ```typescript
221
+ * var chart = new OrgChart('#tree', {});
222
+ * chart.onAddNode((args) => {
223
+ * //return false; to cancel the operation
224
+ * });
225
+ * ```
226
+ * @category Event Listeners
227
+ * @param listener
228
+ */
229
+ onAddNode(listener: (args: {
230
+ /**
231
+ * new added data node
232
+ */
233
+ data: object
234
+ }) => void): OrgChart;
235
+ /**
236
+ * The onDrag event occurs when a node is dragged. *enableDragDrop* option has to be turned on.
237
+ * ```typescript
238
+ * var chart = new OrgChart('#tree', {});
239
+ * chart.onDrag(() => {
240
+ * //return false; to cancel the operation
241
+ * });
242
+ * ```
243
+ * @category Event Listeners
244
+ * @param listener
245
+ */
246
+ onDrag(listener: (args: {
247
+ /**
248
+ * dragged node id
249
+ */
250
+ dragId: string | number,
251
+ event: MouseEvent,
252
+ /**
253
+ * array of node ids
254
+ *
255
+ * this property is initialized only if movable option is set
256
+ */
257
+ nodeIds: Array<string | number>
258
+ }) => void): OrgChart;
259
+ /**
260
+ * The onDrop event occurs when a node is dropped. *enableDragDrop* option has to be turned on.
261
+ * ```typescript
262
+ * var chart = new OrgChart('#tree', {});
263
+ * chart.onDrop(() => {
264
+ * //return false; to cancel the operation
265
+ * });
266
+ * ```
267
+ * @category Event Listeners
268
+ * @param listener
269
+ */
270
+ onDrop(listener: (args: {
271
+ /**
272
+ * dragged node id
273
+ */
274
+ dragId: string | number,
275
+ /**
276
+ * dropped node id
277
+ */
278
+ dropId: string | number,
279
+ /**
280
+ * draging element
281
+ */
282
+ dragNodeElement: HTMLElement,
283
+ /**
284
+ * Mouse event
285
+ */
286
+ event: MouseEvent
287
+ }) => void): OrgChart;
288
+
289
+
4
290
  nodes: { [key in any]: OrgChart.node };
5
291
  isVisible: boolean;
6
292
  visibleNodeIds: Array<number | string>;
@@ -1447,13 +1733,98 @@ declare class OrgChart extends OrgChartBase {
1447
1733
  static grCloseTag: any;
1448
1734
  }
1449
1735
 
1450
- declare namespace OrgChart {
1736
+ declare namespace OrgChart {
1737
+
1738
+ interface node {
1739
+ /**
1740
+ * same pid you provided in the source node, the default value is null if not provided or if node with the same id does not exist
1741
+ */
1742
+ pid?: string | number,
1743
+ }
1451
1744
  /**
1452
- * deprecated
1745
+ * deprecated, use OrgChart.align.center isntead
1453
1746
  * @ignore
1454
1747
  */
1455
- const none: number;
1456
-
1748
+ const CENTER: number;
1749
+ /**
1750
+ * deprecated, use OrgChart.align.orientation isntead
1751
+ * @ignore
1752
+ */
1753
+ const ORIENTATION: number;
1754
+
1755
+
1756
+ /**
1757
+ * deprecated, use OrgChart.layout.normal isntead
1758
+ * @ignore
1759
+ */
1760
+ const normal: number;
1761
+
1762
+ /**
1763
+ * deprecated, use OrgChart.layout.mixed isntead
1764
+ * @ignore
1765
+ */
1766
+ const mixed: number;
1767
+ /**
1768
+ * deprecated, use OrgChart.layout.tree isntead
1769
+ * @ignore
1770
+ */
1771
+ const tree: number;
1772
+ /**
1773
+ * deprecated, use OrgChart.layout.treeLeftOffset isntead
1774
+ * @ignore
1775
+ */
1776
+ const treeLeftOffset: any;
1777
+ /**
1778
+ * deprecated, use OrgChart.layout.treeRightOffset isntead
1779
+ * @ignore
1780
+ */
1781
+ const treeRightOffset: any;
1782
+
1783
+ interface options {
1784
+ /**
1785
+ * With the drag and drop features enabled you can move nodes easily and change the tree structure. Default value - *false*.
1786
+ * ```typescript
1787
+ * var chart = new OrgChart('#tree', {
1788
+ * enableDragDrop: true
1789
+ * });
1790
+ * ```
1791
+ */
1792
+ enableDragDrop?: boolean,
1793
+ /**
1794
+ * Collapse specified level of the chart and its children if allChildren is true.
1795
+ * ```typescript
1796
+ * var chart = new OrgChart('#tree', {
1797
+ * collapse: {level: 2, allChildren: true}
1798
+ * });
1799
+ * ```
1800
+ */
1801
+ collapse?: {
1802
+ level: number,
1803
+ allChildren?: boolean
1804
+ },
1805
+ /**
1806
+ * Expand specified node ids and its children if allChildren is true. The expand option works only if collapse is set.
1807
+ *
1808
+ * In the example above the second level of the chart will be collapsed but node with id 155 and its children will be expanded.
1809
+ * ```typescript
1810
+ * var chart = new OrgChart('#tree', {
1811
+ * collapse: {level: 2, allChildren: true},
1812
+ * expand: {nodes: [155], allChildren: true}
1813
+ * });
1814
+ * ```
1815
+ */
1816
+ expand?: {
1817
+ nodes?: Array<string | number>,
1818
+ allChildren?: boolean
1819
+ },
1820
+ }
1821
+
1822
+ /**
1823
+ * deprecated
1824
+ * @ignore
1825
+ */
1826
+ const none: number;
1827
+
1457
1828
  /**
1458
1829
  * @ignore
1459
1830
  */
@@ -3004,286 +3375,4 @@ declare namespace OrgChart {
3004
3375
  };
3005
3376
 
3006
3377
  var t: any;
3007
- }
3008
-
3009
- declare class OrgChartBase {
3010
-
3011
- static icon: {
3012
- png: (w: string| number, h: string | number, c: string) => string,
3013
- pdf: (w: string | number| number, h: string | number, c: string) => string,
3014
- svg: (w: string| number, h: string| number, c: string | number) => string,
3015
- csv: (w: string| number, h: string| number, c: string| number) => string,
3016
- excel: (w: string| number, h: string| number, c: string| number) => string,
3017
- edit: (w: string| number, h: string| number, c: string| number) => string,
3018
- details: (w: string| number, h: string| number, c: string| number) => string,
3019
- remove: (w: string| number, h: string| number, c: string| number) => string,
3020
- add: (w: string| number, h: string| number, c: string| number) => string,
3021
- xml: (w: string| number, h: string| number, c: string| number) => string,
3022
- link: (w: string| number, h: string| number, c: string| number) => string,
3023
- happy: (w: string| number, h: string| number, c: string| number) => string,
3024
- sad: (w: string| number, h: string| number, c: string| number) => string,
3025
- share: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string,
3026
- user: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string,
3027
- undo: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string,
3028
- redo: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string
3029
- }
3030
-
3031
-
3032
-
3033
- /**
3034
- * Can update link
3035
- * @param id child id
3036
- * @param pid parent id
3037
- */
3038
- canUpdateLink(id: string | number, pid: string | number): boolean;
3039
-
3040
- /**
3041
- * Removes specified node from nodes collection, redraws the chart and fires remove event.
3042
- * @param id identification number of the node
3043
- * @param callback called at the end of animation
3044
- * @param fireEvent indicates if the remove event will be called or not
3045
- */
3046
- removeNode(id: string | number, callback?: () => void, fireEvent?: boolean): void;
3047
-
3048
-
3049
-
3050
-
3051
-
3052
- /**
3053
- * The on() method of the OrgChart class sets up a function that will be called whenever the specified event is delivered to the target. *
3054
- * @category Event Listeners
3055
- * @param type A case-sensitive string representing the event type to listen for.
3056
- * @param listener The object that receives a notification when an event of the specified type occurs. This must be a JavaScript function.
3057
- */
3058
- on(type: "init" | "field" | "update" | "add" | "remove" | "renderbuttons" | "label" | "render-link" | "drag" | "drop" | "redraw" | "expcollclick" | "exportstart" | "exportend" | "click" | "dbclick" | "slink-click" | "clink-click" | "up-click" | "searchclick" | "import" | "updated" | "key-down" | "visibility-change" | "renderdefs" | "render" | "prerender" | "screen-reader-text" | "ready" | "ripple" | "node-initialized" | "nodes-initialized" | "node-layout", listener: (sender: OrgChart, args?: any, args1?: any, args2?: any) => void | boolean): OrgChart;
3059
-
3060
- /**
3061
- * Removes an event listener previously registered. The event listener to be removed is identified using a combination of the event type and the event listener function itself. Returns true if success and false if fail.
3062
- * @param type A string which specifies the type of event for which to remove an event listener
3063
- * @param listener The event listener function of the event handler to remove from the event target
3064
- */
3065
- removeListener(type: "init" | "field" | "update" | "add" | "remove" | "renderbuttons" | "label" | "render-link" | "drag" | "drop" | "redraw" | "expcollclick" | "exportstart" | "exportend" | "click" | "dbclick" | "slink-click" | "clink-click" | "up-click" | "searchclick" | "import" | "updated" | "key-down" | "visibility-change" | "renderdefs" | "render" | "prerender" | "screen-reader-text" | "ready" | "ripple" | "node-initialized" | "nodes-initialized" | "node-layout", listener?: () => void): boolean;
3066
-
3067
-
3068
- /**
3069
- * Occurs when the node data has been updated by updateNode method.
3070
- * ```typescript
3071
- * var chart = new OrgChart('#tree', {});
3072
- * chart.onUpdateNode((args) => {
3073
- * //return false; to cancel the operation
3074
- * });
3075
- * ```
3076
- * @category Event Listeners
3077
- * @param listener
3078
- */
3079
- onUpdateNode(listener: (args: {
3080
- /**
3081
- * old node data
3082
- */
3083
- oldData: object,
3084
- /**
3085
- * new node data
3086
- */
3087
- newData: object
3088
- }) => void): OrgChart;
3089
-
3090
- /**
3091
- * Occurs when new nodes are added, removed, updated or imported, also when slink or clink is added or removed and after undo or redo operations.
3092
- * Use this event listener to synch your server side database with this.config.nodes, this.config.clinks, this.config.slinks etc.
3093
- * ```typescript
3094
- * var chart = new OrgChart('#tree', {});
3095
- * chart.onUpdated(() => {
3096
- * //Update your server database with this.config.nodes, this.config.clinks, this.config.slinks etc.
3097
- * });
3098
- * ```
3099
- * @category Event Listeners
3100
- */
3101
- onUpdated(): OrgChart;
3102
-
3103
-
3104
-
3105
-
3106
- /**
3107
- * Occurs when a node has been removed by removeNode method.
3108
- * ```typescript
3109
- * var chart = new OrgChart('#tree', {});
3110
- * chart.onRemoveNode((args) => {
3111
- * //return false; to cancel the operation
3112
- * });
3113
- * ```
3114
- * @category Event Listeners
3115
- * @param listener
3116
- */
3117
- onRemoveNode(listener: (args: {
3118
- /**
3119
- * node id
3120
- */
3121
- id: number | string,
3122
- /**
3123
- * parent ids and sub tree parents ids that needs to be updated on the server. For example if you remove a node that has children all chilren nodes will change their pid to the parent node id of the removed node.
3124
- */
3125
- newPidsAndStpidsForIds: {
3126
- newPidsForIds: { [key in any]: string | number },
3127
- newStpidsForIds: { [key in any]: string | number }
3128
- }
3129
- }) => void): OrgChart;
3130
-
3131
- /**
3132
- * Occurs when a node has been added by addNode method.
3133
- * ```typescript
3134
- * var chart = new OrgChart('#tree', {});
3135
- * chart.onAddNode((args) => {
3136
- * //return false; to cancel the operation
3137
- * });
3138
- * ```
3139
- * @category Event Listeners
3140
- * @param listener
3141
- */
3142
- onAddNode(listener: (args: {
3143
- /**
3144
- * new added data node
3145
- */
3146
- data: object
3147
- }) => void): OrgChart;
3148
- /**
3149
- * The onDrag event occurs when a node is dragged. *enableDragDrop* option has to be turned on.
3150
- * ```typescript
3151
- * var chart = new OrgChart('#tree', {});
3152
- * chart.onDrag(() => {
3153
- * //return false; to cancel the operation
3154
- * });
3155
- * ```
3156
- * @category Event Listeners
3157
- * @param listener
3158
- */
3159
- onDrag(listener: (args: {
3160
- /**
3161
- * dragged node id
3162
- */
3163
- dragId: string | number,
3164
- event: MouseEvent,
3165
- /**
3166
- * array of node ids
3167
- *
3168
- * this property is initialized only if movable option is set
3169
- */
3170
- nodeIds: Array<string | number>
3171
- }) => void): OrgChart;
3172
- /**
3173
- * The onDrop event occurs when a node is dropped. *enableDragDrop* option has to be turned on.
3174
- * ```typescript
3175
- * var chart = new OrgChart('#tree', {});
3176
- * chart.onDrop(() => {
3177
- * //return false; to cancel the operation
3178
- * });
3179
- * ```
3180
- * @category Event Listeners
3181
- * @param listener
3182
- */
3183
- onDrop(listener: (args: {
3184
- /**
3185
- * dragged node id
3186
- */
3187
- dragId: string | number,
3188
- /**
3189
- * dropped node id
3190
- */
3191
- dropId: string | number,
3192
- /**
3193
- * draging element
3194
- */
3195
- dragNodeElement: HTMLElement,
3196
- /**
3197
- * Mouse event
3198
- */
3199
- event: MouseEvent
3200
- }) => void): OrgChart;
3201
- }
3202
-
3203
- declare namespace OrgChart {
3204
- interface node {
3205
- /**
3206
- * same pid you provided in the source node, the default value is null if not provided or if node with the same id does not exist
3207
- */
3208
- pid?: string | number,
3209
- }
3210
- /**
3211
- * deprecated, use OrgChart.align.center isntead
3212
- * @ignore
3213
- */
3214
- const CENTER: number;
3215
- /**
3216
- * deprecated, use OrgChart.align.orientation isntead
3217
- * @ignore
3218
- */
3219
- const ORIENTATION: number;
3220
-
3221
-
3222
- /**
3223
- * deprecated, use OrgChart.layout.normal isntead
3224
- * @ignore
3225
- */
3226
- const normal: number;
3227
-
3228
- /**
3229
- * deprecated, use OrgChart.layout.mixed isntead
3230
- * @ignore
3231
- */
3232
- const mixed: number;
3233
- /**
3234
- * deprecated, use OrgChart.layout.tree isntead
3235
- * @ignore
3236
- */
3237
- const tree: number;
3238
- /**
3239
- * deprecated, use OrgChart.layout.treeLeftOffset isntead
3240
- * @ignore
3241
- */
3242
- const treeLeftOffset: any;
3243
- /**
3244
- * deprecated, use OrgChart.layout.treeRightOffset isntead
3245
- * @ignore
3246
- */
3247
- const treeRightOffset: any;
3248
-
3249
- interface options {
3250
- /**
3251
- * With the drag and drop features enabled you can move nodes easily and change the tree structure. Default value - *false*.
3252
- * ```typescript
3253
- * var chart = new OrgChart('#tree', {
3254
- * enableDragDrop: true
3255
- * });
3256
- * ```
3257
- */
3258
- enableDragDrop?: boolean,
3259
- /**
3260
- * Collapse specified level of the chart and its children if allChildren is true.
3261
- * ```typescript
3262
- * var chart = new OrgChart('#tree', {
3263
- * collapse: {level: 2, allChildren: true}
3264
- * });
3265
- * ```
3266
- */
3267
- collapse?: {
3268
- level: number,
3269
- allChildren?: boolean
3270
- },
3271
- /**
3272
- * Expand specified node ids and its children if allChildren is true. The expand option works only if collapse is set.
3273
- *
3274
- * In the example above the second level of the chart will be collapsed but node with id 155 and its children will be expanded.
3275
- * ```typescript
3276
- * var chart = new OrgChart('#tree', {
3277
- * collapse: {level: 2, allChildren: true},
3278
- * expand: {nodes: [155], allChildren: true}
3279
- * });
3280
- * ```
3281
- */
3282
- expand?: {
3283
- nodes?: Array<string | number>,
3284
- allChildren?: boolean
3285
- },
3286
- }
3287
-
3288
- }
3289
- export default OrgChart
3378
+ }export default OrgChart