@balkangraph/orgchart.js 8.12.12 → 8.12.13
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 +70 -3
- package/orgchart.js +1 -1
- package/package.json +1 -1
package/orgchart.d.ts
CHANGED
|
@@ -376,7 +376,34 @@ declare class OrgChart extends OrgChartBase {
|
|
|
376
376
|
* @param duration duration before going to 100 percent speed
|
|
377
377
|
*/
|
|
378
378
|
moveStart(movePosition: OrgChart.move, tick?: () => void, func?: OrgChart.anim, duration?: number): void;
|
|
379
|
+
/**
|
|
380
|
+
* Undo data operations like adding/removing nodes. Set undoRedoStorageName option before calling this method.
|
|
381
|
+
* @param callback called when the animation completes
|
|
382
|
+
*/
|
|
383
|
+
undo(callback?: () => void): void;
|
|
384
|
+
/**
|
|
385
|
+
* Redo data operations like adding/removing nodes. Set undoRedoStorageName option before calling this method.
|
|
386
|
+
* @param callback called when the animation completes
|
|
387
|
+
*/
|
|
388
|
+
redo(callback?: () => void): void;
|
|
389
|
+
|
|
390
|
+
/**
|
|
391
|
+
* Clears all Redo stack steps.
|
|
392
|
+
*/
|
|
393
|
+
clearRedo(): void;
|
|
379
394
|
|
|
395
|
+
/**
|
|
396
|
+
* Clears all Undo stack steps.
|
|
397
|
+
*/
|
|
398
|
+
clearUndo(): void;
|
|
399
|
+
/**
|
|
400
|
+
* Returns the number of Undo stack steps
|
|
401
|
+
*/
|
|
402
|
+
undoStepsCount(): number;
|
|
403
|
+
/**
|
|
404
|
+
* Returns the number of Redo stack steps
|
|
405
|
+
*/
|
|
406
|
+
redoStepsCount(): number;
|
|
380
407
|
/**
|
|
381
408
|
* Ends the move
|
|
382
409
|
*/
|
|
@@ -1211,6 +1238,21 @@ declare namespace OrgChart {
|
|
|
1211
1238
|
on(type: "click" | "show" | "drag" | "drop" | "mouseenter" | "mouseout", listener: (sender: circleMenuUI, args: any, args1: any, args2: any) => void | boolean): circleMenuUI;
|
|
1212
1239
|
}
|
|
1213
1240
|
|
|
1241
|
+
interface undoRedoUI {
|
|
1242
|
+
/**
|
|
1243
|
+
* Inits undoRedoUI
|
|
1244
|
+
* @param instance
|
|
1245
|
+
*/
|
|
1246
|
+
init(instance: OrgChart): void;
|
|
1247
|
+
/**
|
|
1248
|
+
* Refreshes the UI buttonss
|
|
1249
|
+
*/
|
|
1250
|
+
refresh(): void;
|
|
1251
|
+
undoElement: HTMLElement;
|
|
1252
|
+
redoElement: HTMLElement;
|
|
1253
|
+
instance: OrgChart;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1214
1256
|
interface keyNavigation {
|
|
1215
1257
|
/**
|
|
1216
1258
|
* Set focus to specified id on initial load
|
|
@@ -2123,6 +2165,10 @@ declare namespace OrgChart {
|
|
|
2123
2165
|
* @ignore
|
|
2124
2166
|
*/
|
|
2125
2167
|
menuUI?: OrgChart.menuUI,
|
|
2168
|
+
/**
|
|
2169
|
+
* @ignore
|
|
2170
|
+
*/
|
|
2171
|
+
undoRedoUI?: OrgChart.undoRedoUI,
|
|
2126
2172
|
/**
|
|
2127
2173
|
* @ignore
|
|
2128
2174
|
*/
|
|
@@ -2240,6 +2286,10 @@ declare namespace OrgChart {
|
|
|
2240
2286
|
readFromUrlParams?: boolean,
|
|
2241
2287
|
writeToUrlParams?: boolean
|
|
2242
2288
|
},
|
|
2289
|
+
/**
|
|
2290
|
+
* Set the session storage name to use undo/redo functionallity.
|
|
2291
|
+
*/
|
|
2292
|
+
undoRedoStorageName?: string,
|
|
2243
2293
|
/**
|
|
2244
2294
|
* Configure the buildin edit form.
|
|
2245
2295
|
* {@link https://balkan.app/OrgChartJS/Docs/Edit | See doc...}
|
|
@@ -2301,7 +2351,9 @@ declare class OrgChartBase {
|
|
|
2301
2351
|
happy: (w: string| number, h: string| number, c: string| number) => string,
|
|
2302
2352
|
sad: (w: string| number, h: string| number, c: string| number) => string,
|
|
2303
2353
|
share: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string,
|
|
2304
|
-
user: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string
|
|
2354
|
+
user: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string,
|
|
2355
|
+
undo: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string,
|
|
2356
|
+
redo: (w: string| number, h: string| number, c: string| number, x?: string| number, y?: string| number) => string
|
|
2305
2357
|
}
|
|
2306
2358
|
|
|
2307
2359
|
|
|
@@ -2331,14 +2383,14 @@ declare class OrgChartBase {
|
|
|
2331
2383
|
* @param type A case-sensitive string representing the event type to listen for.
|
|
2332
2384
|
* @param listener The object that receives a notification when an event of the specified type occurs. This must be a JavaScript function.
|
|
2333
2385
|
*/
|
|
2334
|
-
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" | "
|
|
2386
|
+
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;
|
|
2335
2387
|
|
|
2336
2388
|
/**
|
|
2337
2389
|
* 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.
|
|
2338
2390
|
* @param type A string which specifies the type of event for which to remove an event listener
|
|
2339
2391
|
* @param listener The event listener function of the event handler to remove from the event target
|
|
2340
2392
|
*/
|
|
2341
|
-
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" | "
|
|
2393
|
+
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;
|
|
2342
2394
|
|
|
2343
2395
|
|
|
2344
2396
|
/**
|
|
@@ -2363,6 +2415,21 @@ declare class OrgChartBase {
|
|
|
2363
2415
|
newData: object
|
|
2364
2416
|
}) => void): OrgChart;
|
|
2365
2417
|
|
|
2418
|
+
/**
|
|
2419
|
+
* 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.
|
|
2420
|
+
* Use this event listener to synch your server side database with this.config.nodes, this.config.clinks, this.config.slinks etc.
|
|
2421
|
+
* ```typescript
|
|
2422
|
+
* var chart = new OrgChart('#tree', {});
|
|
2423
|
+
* chart.onUpdated(() => {
|
|
2424
|
+
* //Update your server database with this.config.nodes, this.config.clinks, this.config.slinks etc.
|
|
2425
|
+
* });
|
|
2426
|
+
* ```
|
|
2427
|
+
* @category Event Listeners
|
|
2428
|
+
*/
|
|
2429
|
+
onUpdated(): OrgChart;
|
|
2430
|
+
|
|
2431
|
+
|
|
2432
|
+
|
|
2366
2433
|
|
|
2367
2434
|
/**
|
|
2368
2435
|
* Occurs when a node has been removed by removeNode method.
|