@balkangraph/orgchart.js 8.10.17 → 8.10.19

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 CHANGED
@@ -84,8 +84,9 @@ declare class OrgChart extends OrgChartBase {
84
84
  /**
85
85
  * Load nodes data.
86
86
  * @param data node data array
87
+ * @param callback function called after the load
87
88
  */
88
- load(data: Array<object>): OrgChart;
89
+ load(data: Array<object>, callback?: () => void): OrgChart;
89
90
 
90
91
  /**
91
92
  * Updates the node data, redraws the chart and fires update event.
@@ -98,8 +99,9 @@ declare class OrgChart extends OrgChartBase {
98
99
  /**
99
100
  * Loads nodes from xml.
100
101
  * @param xml Xml with node structure
102
+ * @param callback function called after the load
101
103
  */
102
- loadXML(xml: string): OrgChart;
104
+ loadXML(xml: string, callback?: () => void): OrgChart;
103
105
  /**
104
106
  * Gets nodes as xml.
105
107
  */
@@ -281,19 +283,19 @@ declare class OrgChart extends OrgChartBase {
281
283
  * @param filename The name of the exported file
282
284
  * {@link https://balkan.app/OrgChartJS/Docs/Exporting | See doc...}
283
285
  */
284
- exportCSV(filename: string): void;
286
+ exportCSV(filename: string | OrgChart.exportCSVXMLJSONOptions): void;
285
287
  /**
286
288
  * Exports to XML
287
289
  * @param filename The name of the exported file
288
290
  * {@link https://balkan.app/OrgChartJS/Docs/Exporting | See doc...}
289
291
  */
290
- exportXML(filename: string): void;
292
+ exportXML(filename: string | OrgChart.exportCSVXMLJSONOptions): void;
291
293
  /**
292
294
  * Exports to JSON
293
295
  * @param filename The name of the exported file
294
296
  * {@link https://balkan.app/OrgChartJS/Docs/Exporting | See doc...}
295
297
  */
296
- exportJSON(filename: string): void;
298
+ exportJSON(filename: string | OrgChart.exportCSVXMLJSONOptions ): void;
297
299
 
298
300
  /**
299
301
  * Shares node data, uses build-in device sharing functionallity.
@@ -1216,6 +1218,13 @@ declare namespace OrgChart {
1216
1218
  nodeId? : number | string
1217
1219
  }
1218
1220
 
1221
+ interface exportCSVXMLJSONOptions {
1222
+ filename?: string,
1223
+ expandChildren?: boolean,
1224
+ min?: boolean,
1225
+ nodeId? : number | string
1226
+ }
1227
+
1219
1228
  interface linkTemplate {
1220
1229
  defs?: string,
1221
1230
  link?: string,