@balkangraph/orgchart.js 8.14.76 → 8.14.78

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 +350 -294
  2. package/orgchart.js +1 -1
  3. package/package.json +1 -1
package/orgchart.d.ts CHANGED
@@ -1,6 +1,199 @@
1
1
 
2
2
 
3
- declare class OrgChart extends OrgChartBase {
3
+ declare class OrgChart {
4
+
5
+ static icon: {
6
+ png: (w: string| number, h: string | number, c: string) => string,
7
+ pdf: (w: string | number| number, h: string | number, c: string) => string,
8
+ svg: (w: string| number, h: string| number, c: string | number) => string,
9
+ csv: (w: string| number, h: string| number, c: string| number) => string,
10
+ excel: (w: string| number, h: string| number, c: string| number) => string,
11
+ edit: (w: string| number, h: string| number, c: string| number) => string,
12
+ details: (w: string| number, h: string| number, c: string| number) => string,
13
+ remove: (w: string| number, h: string| number, c: string| number) => string,
14
+ add: (w: string| number, h: string| number, c: string| number) => string,
15
+ xml: (w: string| number, h: string| number, c: string| number) => string,
16
+ link: (w: string| number, h: string| number, c: string| number) => string,
17
+ happy: (w: string| number, h: string| number, c: string| number) => string,
18
+ sad: (w: string| number, h: string| number, c: string| number) => string,
19
+ share: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string,
20
+ user: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string,
21
+ undo: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string,
22
+ redo: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string
23
+ }
24
+
25
+
26
+
27
+ /**
28
+ * Can update link
29
+ * @param id child id
30
+ * @param pid parent id
31
+ */
32
+ canUpdateLink(id: string | number, pid: string | number): boolean;
33
+
34
+ /**
35
+ * Removes specified node from nodes collection, redraws the chart and fires remove event.
36
+ * @param id identification number of the node
37
+ * @param callback called at the end of animation
38
+ * @param fireEvent indicates if the remove event will be called or not
39
+ */
40
+ removeNode(id: string | number, callback?: () => void, fireEvent?: boolean): void;
41
+
42
+
43
+
44
+
45
+
46
+ /**
47
+ * The on() method of the OrgChart class sets up a function that will be called whenever the specified event is delivered to the target. *
48
+ * @category Event Listeners
49
+ * @param type A case-sensitive string representing the event type to listen for.
50
+ * @param listener The object that receives a notification when an event of the specified type occurs. This must be a JavaScript function.
51
+ */
52
+ 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;
53
+
54
+ /**
55
+ * 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.
56
+ * @param type A string which specifies the type of event for which to remove an event listener
57
+ * @param listener The event listener function of the event handler to remove from the event target
58
+ */
59
+ 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;
60
+
61
+
62
+ /**
63
+ * Occurs when the node data has been updated by updateNode method.
64
+ * ```typescript
65
+ * var chart = new OrgChart('#tree', {});
66
+ * chart.onUpdateNode((args) => {
67
+ * //return false; to cancel the operation
68
+ * });
69
+ * ```
70
+ * @category Event Listeners
71
+ * @param listener
72
+ */
73
+ onUpdateNode(listener: (args: {
74
+ /**
75
+ * old node data
76
+ */
77
+ oldData: object,
78
+ /**
79
+ * new node data
80
+ */
81
+ newData: object
82
+ }) => void): OrgChart;
83
+
84
+ /**
85
+ * 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.
86
+ * Use this event listener to synch your server side database with this.config.nodes, this.config.clinks, this.config.slinks etc.
87
+ * ```typescript
88
+ * var chart = new OrgChart('#tree', {});
89
+ * chart.onUpdated(() => {
90
+ * //Update your server database with this.config.nodes, this.config.clinks, this.config.slinks etc.
91
+ * });
92
+ * ```
93
+ * @category Event Listeners
94
+ */
95
+ onUpdated(): OrgChart;
96
+
97
+
98
+
99
+
100
+ /**
101
+ * Occurs when a node has been removed by removeNode method.
102
+ * ```typescript
103
+ * var chart = new OrgChart('#tree', {});
104
+ * chart.onRemoveNode((args) => {
105
+ * //return false; to cancel the operation
106
+ * });
107
+ * ```
108
+ * @category Event Listeners
109
+ * @param listener
110
+ */
111
+ onRemoveNode(listener: (args: {
112
+ /**
113
+ * node id
114
+ */
115
+ id: number | string,
116
+ /**
117
+ * 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.
118
+ */
119
+ newPidsAndStpidsForIds: {
120
+ newPidsForIds: { [key in any]: string | number },
121
+ newStpidsForIds: { [key in any]: string | number }
122
+ }
123
+ }) => void): OrgChart;
124
+
125
+ /**
126
+ * Occurs when a node has been added by addNode method.
127
+ * ```typescript
128
+ * var chart = new OrgChart('#tree', {});
129
+ * chart.onAddNode((args) => {
130
+ * //return false; to cancel the operation
131
+ * });
132
+ * ```
133
+ * @category Event Listeners
134
+ * @param listener
135
+ */
136
+ onAddNode(listener: (args: {
137
+ /**
138
+ * new added data node
139
+ */
140
+ data: object
141
+ }) => void): OrgChart;
142
+ /**
143
+ * The onDrag event occurs when a node is dragged. *enableDragDrop* option has to be turned on.
144
+ * ```typescript
145
+ * var chart = new OrgChart('#tree', {});
146
+ * chart.onDrag(() => {
147
+ * //return false; to cancel the operation
148
+ * });
149
+ * ```
150
+ * @category Event Listeners
151
+ * @param listener
152
+ */
153
+ onDrag(listener: (args: {
154
+ /**
155
+ * dragged node id
156
+ */
157
+ dragId: string | number,
158
+ event: MouseEvent,
159
+ /**
160
+ * array of node ids
161
+ *
162
+ * this property is initialized only if movable option is set
163
+ */
164
+ nodeIds: Array<string | number>
165
+ }) => void): OrgChart;
166
+ /**
167
+ * The onDrop event occurs when a node is dropped. *enableDragDrop* option has to be turned on.
168
+ * ```typescript
169
+ * var chart = new OrgChart('#tree', {});
170
+ * chart.onDrop(() => {
171
+ * //return false; to cancel the operation
172
+ * });
173
+ * ```
174
+ * @category Event Listeners
175
+ * @param listener
176
+ */
177
+ onDrop(listener: (args: {
178
+ /**
179
+ * dragged node id
180
+ */
181
+ dragId: string | number,
182
+ /**
183
+ * dropped node id
184
+ */
185
+ dropId: string | number,
186
+ /**
187
+ * draging element
188
+ */
189
+ dragNodeElement: HTMLElement,
190
+ /**
191
+ * Mouse event
192
+ */
193
+ event: MouseEvent
194
+ }) => void): OrgChart;
195
+
196
+
4
197
  nodes: { [key in any]: OrgChart.node };
5
198
  isVisible: boolean;
6
199
  visibleNodeIds: Array<number | string>;
@@ -1081,12 +1274,72 @@ declare class OrgChart extends OrgChartBase {
1081
1274
  * @ignore
1082
1275
  */
1083
1276
  yScrollUI: OrgChart.yScrollUI;
1277
+
1278
+ /**
1279
+ * The chart undoRedoUI object.
1280
+ * ```typescript
1281
+ * let chart = new OrgChart('#tree', {});
1282
+ * let undoRedoUI = chart.undoRedoUI;
1283
+ * ```
1284
+ */
1084
1285
  undoRedoUI: OrgChart.undoRedoUI;
1286
+
1287
+ /**
1288
+ * The chart nodeCircleMenuUI object.
1289
+ * ```typescript
1290
+ * let chart = new OrgChart('#tree', {});
1291
+ * let nodeCircleMenuUI = chart.nodeCircleMenuUI;
1292
+ * ```
1293
+ */
1085
1294
  nodeCircleMenuUI: OrgChart.circleMenuUI;
1295
+
1296
+ /**
1297
+ * The chart nodeContextMenuUI object.
1298
+ * ```typescript
1299
+ * let chart = new OrgChart('#tree', {});
1300
+ * let nodeContextMenuUI = chart.nodeContextMenuUI;
1301
+ * ```
1302
+ */
1086
1303
  nodeContextMenuUI: OrgChart.menuUI;
1304
+
1305
+ /**
1306
+ * The chart menuUI object.
1307
+ * ```typescript
1308
+ * let chart = new OrgChart('#tree', {});
1309
+ * let menuUI = chart.menuUI;
1310
+ * ```
1311
+ */
1087
1312
  menuUI: OrgChart.menuUI;
1088
- toolbarUI: OrgChart.toolbarUI;
1313
+
1314
+ /**
1315
+ * The chart toolbarUI object.
1316
+ * ```typescript
1317
+ * let chart = new OrgChart('#tree', {});
1318
+ * let toolbarUI = chart.toolbarUI;
1319
+ * ```
1320
+ */
1321
+ toolbarUI: OrgChart.toolbarUI;
1322
+
1323
+ /**
1324
+ * The chart config object.
1325
+ * ```typescript
1326
+ * let chart = new OrgChart('#tree', {});
1327
+ * let config = chart.config;
1328
+ * ```
1329
+ */
1089
1330
  config: OrgChart.options;
1331
+
1332
+ /**
1333
+ * All root nodes in the chart
1334
+ * ```typescript
1335
+ * let chart = new OrgChart('#tree', {});
1336
+ * chart.onInit(() => {
1337
+ * let roots = chart.roots
1338
+ * });
1339
+ * chart.load(nodes)
1340
+ * ```
1341
+ */
1342
+
1090
1343
  roots: Array<OrgChart.node>;
1091
1344
 
1092
1345
  static fileUploadDialog(callback: (file: any) => void): void;
@@ -1387,18 +1640,103 @@ declare class OrgChart extends OrgChartBase {
1387
1640
  static grCloseTag: any;
1388
1641
  }
1389
1642
 
1390
- declare namespace OrgChart {
1643
+ declare namespace OrgChart {
1644
+
1645
+ interface node {
1646
+ /**
1647
+ * 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
1648
+ */
1649
+ pid?: string | number,
1650
+ }
1391
1651
  /**
1392
- * deprecated
1652
+ * deprecated, use OrgChart.align.center isntead
1393
1653
  * @ignore
1394
1654
  */
1395
- const none: number;
1396
-
1397
- /**
1398
- * @ignore
1399
- */
1400
- const COLLAPSE_PARENT_NEIGHBORS: number;
1401
-
1655
+ const CENTER: number;
1656
+ /**
1657
+ * deprecated, use OrgChart.align.orientation isntead
1658
+ * @ignore
1659
+ */
1660
+ const ORIENTATION: number;
1661
+
1662
+
1663
+ /**
1664
+ * deprecated, use OrgChart.layout.normal isntead
1665
+ * @ignore
1666
+ */
1667
+ const normal: number;
1668
+
1669
+ /**
1670
+ * deprecated, use OrgChart.layout.mixed isntead
1671
+ * @ignore
1672
+ */
1673
+ const mixed: number;
1674
+ /**
1675
+ * deprecated, use OrgChart.layout.tree isntead
1676
+ * @ignore
1677
+ */
1678
+ const tree: number;
1679
+ /**
1680
+ * deprecated, use OrgChart.layout.treeLeftOffset isntead
1681
+ * @ignore
1682
+ */
1683
+ const treeLeftOffset: any;
1684
+ /**
1685
+ * deprecated, use OrgChart.layout.treeRightOffset isntead
1686
+ * @ignore
1687
+ */
1688
+ const treeRightOffset: any;
1689
+
1690
+ interface options {
1691
+ /**
1692
+ * With the drag and drop features enabled you can move nodes easily and change the tree structure. Default value - *false*.
1693
+ * ```typescript
1694
+ * var chart = new OrgChart('#tree', {
1695
+ * enableDragDrop: true
1696
+ * });
1697
+ * ```
1698
+ */
1699
+ enableDragDrop?: boolean,
1700
+ /**
1701
+ * Collapse specified level of the chart and its children if allChildren is true.
1702
+ * ```typescript
1703
+ * var chart = new OrgChart('#tree', {
1704
+ * collapse: {level: 2, allChildren: true}
1705
+ * });
1706
+ * ```
1707
+ */
1708
+ collapse?: {
1709
+ level: number,
1710
+ allChildren?: boolean
1711
+ },
1712
+ /**
1713
+ * Expand specified node ids and its children if allChildren is true. The expand option works only if collapse is set.
1714
+ *
1715
+ * In the example above the second level of the chart will be collapsed but node with id 155 and its children will be expanded.
1716
+ * ```typescript
1717
+ * var chart = new OrgChart('#tree', {
1718
+ * collapse: {level: 2, allChildren: true},
1719
+ * expand: {nodes: [155], allChildren: true}
1720
+ * });
1721
+ * ```
1722
+ */
1723
+ expand?: {
1724
+ nodes?: Array<string | number>,
1725
+ allChildren?: boolean
1726
+ },
1727
+ }
1728
+
1729
+ /**
1730
+ * deprecated
1731
+ * @ignore
1732
+ */
1733
+ const none: number;
1734
+
1735
+ /**
1736
+ * @ignore
1737
+ */
1738
+ const COLLAPSE_PARENT_NEIGHBORS: number;
1739
+
1402
1740
  /**
1403
1741
  * @ignore
1404
1742
  */
@@ -2944,286 +3282,4 @@ declare namespace OrgChart {
2944
3282
  };
2945
3283
 
2946
3284
  var t: any;
2947
- }
2948
-
2949
- declare class OrgChartBase {
2950
-
2951
- static icon: {
2952
- png: (w: string| number, h: string | number, c: string) => string,
2953
- pdf: (w: string | number| number, h: string | number, c: string) => string,
2954
- svg: (w: string| number, h: string| number, c: string | number) => string,
2955
- csv: (w: string| number, h: string| number, c: string| number) => string,
2956
- excel: (w: string| number, h: string| number, c: string| number) => string,
2957
- edit: (w: string| number, h: string| number, c: string| number) => string,
2958
- details: (w: string| number, h: string| number, c: string| number) => string,
2959
- remove: (w: string| number, h: string| number, c: string| number) => string,
2960
- add: (w: string| number, h: string| number, c: string| number) => string,
2961
- xml: (w: string| number, h: string| number, c: string| number) => string,
2962
- link: (w: string| number, h: string| number, c: string| number) => string,
2963
- happy: (w: string| number, h: string| number, c: string| number) => string,
2964
- sad: (w: string| number, h: string| number, c: string| number) => string,
2965
- share: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string,
2966
- user: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string,
2967
- undo: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string,
2968
- redo: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string
2969
- }
2970
-
2971
-
2972
-
2973
- /**
2974
- * Can update link
2975
- * @param id child id
2976
- * @param pid parent id
2977
- */
2978
- canUpdateLink(id: string | number, pid: string | number): boolean;
2979
-
2980
- /**
2981
- * Removes specified node from nodes collection, redraws the chart and fires remove event.
2982
- * @param id identification number of the node
2983
- * @param callback called at the end of animation
2984
- * @param fireEvent indicates if the remove event will be called or not
2985
- */
2986
- removeNode(id: string | number, callback?: () => void, fireEvent?: boolean): void;
2987
-
2988
-
2989
-
2990
-
2991
-
2992
- /**
2993
- * The on() method of the OrgChart class sets up a function that will be called whenever the specified event is delivered to the target. *
2994
- * @category Event Listeners
2995
- * @param type A case-sensitive string representing the event type to listen for.
2996
- * @param listener The object that receives a notification when an event of the specified type occurs. This must be a JavaScript function.
2997
- */
2998
- 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;
2999
-
3000
- /**
3001
- * 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.
3002
- * @param type A string which specifies the type of event for which to remove an event listener
3003
- * @param listener The event listener function of the event handler to remove from the event target
3004
- */
3005
- 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;
3006
-
3007
-
3008
- /**
3009
- * Occurs when the node data has been updated by updateNode method.
3010
- * ```typescript
3011
- * var chart = new OrgChart('#tree', {});
3012
- * chart.onUpdateNode((args) => {
3013
- * //return false; to cancel the operation
3014
- * });
3015
- * ```
3016
- * @category Event Listeners
3017
- * @param listener
3018
- */
3019
- onUpdateNode(listener: (args: {
3020
- /**
3021
- * old node data
3022
- */
3023
- oldData: object,
3024
- /**
3025
- * new node data
3026
- */
3027
- newData: object
3028
- }) => void): OrgChart;
3029
-
3030
- /**
3031
- * 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.
3032
- * Use this event listener to synch your server side database with this.config.nodes, this.config.clinks, this.config.slinks etc.
3033
- * ```typescript
3034
- * var chart = new OrgChart('#tree', {});
3035
- * chart.onUpdated(() => {
3036
- * //Update your server database with this.config.nodes, this.config.clinks, this.config.slinks etc.
3037
- * });
3038
- * ```
3039
- * @category Event Listeners
3040
- */
3041
- onUpdated(): OrgChart;
3042
-
3043
-
3044
-
3045
-
3046
- /**
3047
- * Occurs when a node has been removed by removeNode method.
3048
- * ```typescript
3049
- * var chart = new OrgChart('#tree', {});
3050
- * chart.onRemoveNode((args) => {
3051
- * //return false; to cancel the operation
3052
- * });
3053
- * ```
3054
- * @category Event Listeners
3055
- * @param listener
3056
- */
3057
- onRemoveNode(listener: (args: {
3058
- /**
3059
- * node id
3060
- */
3061
- id: number | string,
3062
- /**
3063
- * 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.
3064
- */
3065
- newPidsAndStpidsForIds: {
3066
- newPidsForIds: { [key in any]: string | number },
3067
- newStpidsForIds: { [key in any]: string | number }
3068
- }
3069
- }) => void): OrgChart;
3070
-
3071
- /**
3072
- * Occurs when a node has been added by addNode method.
3073
- * ```typescript
3074
- * var chart = new OrgChart('#tree', {});
3075
- * chart.onAddNode((args) => {
3076
- * //return false; to cancel the operation
3077
- * });
3078
- * ```
3079
- * @category Event Listeners
3080
- * @param listener
3081
- */
3082
- onAddNode(listener: (args: {
3083
- /**
3084
- * new added data node
3085
- */
3086
- data: object
3087
- }) => void): OrgChart;
3088
- /**
3089
- * The onDrag event occurs when a node is dragged. *enableDragDrop* option has to be turned on.
3090
- * ```typescript
3091
- * var chart = new OrgChart('#tree', {});
3092
- * chart.onDrag(() => {
3093
- * //return false; to cancel the operation
3094
- * });
3095
- * ```
3096
- * @category Event Listeners
3097
- * @param listener
3098
- */
3099
- onDrag(listener: (args: {
3100
- /**
3101
- * dragged node id
3102
- */
3103
- dragId: string | number,
3104
- event: MouseEvent,
3105
- /**
3106
- * array of node ids
3107
- *
3108
- * this property is initialized only if movable option is set
3109
- */
3110
- nodeIds: Array<string | number>
3111
- }) => void): OrgChart;
3112
- /**
3113
- * The onDrop event occurs when a node is dropped. *enableDragDrop* option has to be turned on.
3114
- * ```typescript
3115
- * var chart = new OrgChart('#tree', {});
3116
- * chart.onDrop(() => {
3117
- * //return false; to cancel the operation
3118
- * });
3119
- * ```
3120
- * @category Event Listeners
3121
- * @param listener
3122
- */
3123
- onDrop(listener: (args: {
3124
- /**
3125
- * dragged node id
3126
- */
3127
- dragId: string | number,
3128
- /**
3129
- * dropped node id
3130
- */
3131
- dropId: string | number,
3132
- /**
3133
- * draging element
3134
- */
3135
- dragNodeElement: HTMLElement,
3136
- /**
3137
- * Mouse event
3138
- */
3139
- event: MouseEvent
3140
- }) => void): OrgChart;
3141
- }
3142
-
3143
- declare namespace OrgChart {
3144
- interface node {
3145
- /**
3146
- * 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
3147
- */
3148
- pid?: string | number,
3149
- }
3150
- /**
3151
- * deprecated, use OrgChart.align.center isntead
3152
- * @ignore
3153
- */
3154
- const CENTER: number;
3155
- /**
3156
- * deprecated, use OrgChart.align.orientation isntead
3157
- * @ignore
3158
- */
3159
- const ORIENTATION: number;
3160
-
3161
-
3162
- /**
3163
- * deprecated, use OrgChart.layout.normal isntead
3164
- * @ignore
3165
- */
3166
- const normal: number;
3167
-
3168
- /**
3169
- * deprecated, use OrgChart.layout.mixed isntead
3170
- * @ignore
3171
- */
3172
- const mixed: number;
3173
- /**
3174
- * deprecated, use OrgChart.layout.tree isntead
3175
- * @ignore
3176
- */
3177
- const tree: number;
3178
- /**
3179
- * deprecated, use OrgChart.layout.treeLeftOffset isntead
3180
- * @ignore
3181
- */
3182
- const treeLeftOffset: any;
3183
- /**
3184
- * deprecated, use OrgChart.layout.treeRightOffset isntead
3185
- * @ignore
3186
- */
3187
- const treeRightOffset: any;
3188
-
3189
- interface options {
3190
- /**
3191
- * With the drag and drop features enabled you can move nodes easily and change the tree structure. Default value - *false*.
3192
- * ```typescript
3193
- * var chart = new OrgChart('#tree', {
3194
- * enableDragDrop: true
3195
- * });
3196
- * ```
3197
- */
3198
- enableDragDrop?: boolean,
3199
- /**
3200
- * Collapse specified level of the chart and its children if allChildren is true.
3201
- * ```typescript
3202
- * var chart = new OrgChart('#tree', {
3203
- * collapse: {level: 2, allChildren: true}
3204
- * });
3205
- * ```
3206
- */
3207
- collapse?: {
3208
- level: number,
3209
- allChildren?: boolean
3210
- },
3211
- /**
3212
- * Expand specified node ids and its children if allChildren is true. The expand option works only if collapse is set.
3213
- *
3214
- * In the example above the second level of the chart will be collapsed but node with id 155 and its children will be expanded.
3215
- * ```typescript
3216
- * var chart = new OrgChart('#tree', {
3217
- * collapse: {level: 2, allChildren: true},
3218
- * expand: {nodes: [155], allChildren: true}
3219
- * });
3220
- * ```
3221
- */
3222
- expand?: {
3223
- nodes?: Array<string | number>,
3224
- allChildren?: boolean
3225
- },
3226
- }
3227
-
3228
- }
3229
- export default OrgChart
3285
+ }export default OrgChart