@balkangraph/orgchart.js 8.17.2 → 8.17.4

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
@@ -232,11 +232,11 @@ declare class OrgChart {
232
232
  /**
233
233
  * old node data
234
234
  */
235
- oldData: object,
235
+ oldData: nodeData,
236
236
  /**
237
237
  * new node data
238
238
  */
239
- newData: object
239
+ newData: nodeData
240
240
  }) => void): OrgChart;
241
241
 
242
242
  /**
@@ -293,7 +293,7 @@ declare class OrgChart {
293
293
  /**
294
294
  * new added data node
295
295
  */
296
- data: object
296
+ data: nodeData
297
297
  }) => void): OrgChart;
298
298
  /**
299
299
  * The onDrag event occurs when a node is dragged. *enableDragDrop* option has to be turned on.
@@ -433,7 +433,8 @@ declare class OrgChart {
433
433
  * @param callback called at the end of animation
434
434
  * @param fireEvent indicates if the add event will be called or not
435
435
  */
436
- addNode(data: object, callback?: () => void, fireEvent?: boolean): void;
436
+ addNode(data: nodeData, callback?: () => void, fireEvent?: boolean): void;
437
+ // addNode(data: object, callback?: () => void, fireEvent?: boolean): void;
437
438
 
438
439
  /**
439
440
  * Removes specified node from nodes collection, redraws the chart and fires remove event.
@@ -457,7 +458,7 @@ declare class OrgChart {
457
458
  * ```
458
459
  * @param id identification number of the node
459
460
  */
460
- get(id: string | number): Node;
461
+ get(id: string | number): nodeData;
461
462
  /**
462
463
  * If specified node has assistant/s or partner/s as children will return false.
463
464
  * ```typescript
@@ -552,10 +553,11 @@ declare class OrgChart {
552
553
  * { id: 3, pid: 1, name: "Caden Ellison" }
553
554
  * ]);
554
555
  * ```
555
- * @param data node data array
556
+ * @param data nodes data array
556
557
  * @param callback function called after the load
557
558
  */
558
- load(data: Array<object>, callback?: () => void): OrgChart;
559
+ load(data: Array<nodeData>, callback?: () => void): OrgChart;
560
+ // load(data: Array<object>, callback?: () => void): OrgChart;
559
561
 
560
562
  /**
561
563
  * Updates the node data, redraws the chart and fires update event.
@@ -568,7 +570,7 @@ declare class OrgChart {
568
570
  * @param callback function called when the animation completes
569
571
  * @param fireEvent if it set to true the update event is called
570
572
  */
571
- updateNode(data: object, callback?: () => void, fireEvent?: boolean): void;
573
+ updateNode(data: nodeData, callback?: () => void, fireEvent?: boolean): void;
572
574
 
573
575
  /**
574
576
  * Loads nodes from xml.
@@ -2314,9 +2316,33 @@ declare class OrgChart {
2314
2316
  static grCloseTag: any;
2315
2317
  }
2316
2318
 
2317
- interface Node {
2319
+ interface nodeData {
2320
+
2321
+ /**
2322
+ * the id of the node
2323
+ */
2318
2324
  id: number | string,
2325
+
2326
+ /**
2327
+ * the parent id
2328
+ */
2319
2329
  pid?: number | string,
2330
+
2331
+ /**
2332
+ * the parent partner id
2333
+ */
2334
+ ppid?: number | string,
2335
+
2336
+ /**
2337
+ * the subtree parent id
2338
+ */
2339
+ stPid?: number | string,
2340
+
2341
+ /**
2342
+ * Set custom configuration for the tagged node
2343
+ *{@link https://balkan.app/OrgChartJS/Docs/Tags | See Tags doc page...}
2344
+ */
2345
+ tags?: Array<string>,
2320
2346
  [key: string]: any
2321
2347
  }
2322
2348
 
@@ -4746,7 +4772,9 @@ declare namespace OrgChart {
4746
4772
  * - Set node as assistant {@link https://balkan.app/OrgChartJS/Docs/Assistant | See doc...}
4747
4773
  * - Change node menu, circle menu and context menu items for tagged node/s {@link https://balkan.app/OrgChartJS/Docs/Menus | See doc...}
4748
4774
  * - Set the node level {@link https://balkan.app/OrgChartJS/Demos/SubLevels | See demo...}
4749
- * - Set specific options for sub trees like layout templates etc {@link https://balkan.app/OrgChartJS/Docs/SubTrees | See doc...}
4775
+ * - Set specific options for sub trees like layout templates, etc. {@link https://balkan.app/OrgChartJS/Docs/SubTrees | See doc...}
4776
+ * - Set custom CSS, for example node color, field color, etc. {@link https://balkan.app/OrgChartJS/Docs/CSSCustomization | See CSS doc page...}
4777
+ * - {@link https://balkan.app/OrgChartJS/Docs/Tags | See Tags doc page...}
4750
4778
  * ```typescript
4751
4779
  * var chart = new OrgChart('#tree', {
4752
4780
  * tags: {
package/orgchart.js CHANGED
@@ -1 +1 @@
1
- /* eslint-disable */
1
+ /* eslint-disable */
package/package.json CHANGED
@@ -1 +1 @@
1
- {"author":{"name":"BALKAN App"},"bugs":{"email":"support@balkan.app","url":"https://github.com/BALKANGraph/OrgChartJS/issues"},"deprecated":false,"description":"Ultimate Organizational Chart JavaScript library, Interactive Diagrams","files":["orgchart.js","orgchart.d.ts","package.json","README.md"],"homepage":"https://balkan.app/","keywords":["diagram","chart","tree","orgchart","graph","svg","hierarchy","family-tree","decision-tree","visualization","tree-layout","hierarchical","javascript","js","html","html5"],"license":"SEE LICENSE IN https://balkan.app","main":"orgchart.js","types":"orgchart.d.ts","name":"@balkangraph/orgchart.js","repository":{"type":"git","url":"https://github.com/BALKANGraph/OrgChartJS"},"dependencies":{},"version":"8.17.02"}
1
+ {"author":{"name":"BALKAN App"},"bugs":{"email":"support@balkan.app","url":"https://github.com/BALKANGraph/OrgChartJS/issues"},"deprecated":false,"description":"Ultimate Organizational Chart JavaScript library, Interactive Diagrams","files":["orgchart.js","orgchart.d.ts","package.json","README.md"],"homepage":"https://balkan.app/","keywords":["diagram","chart","tree","orgchart","graph","svg","hierarchy","family-tree","decision-tree","visualization","tree-layout","hierarchical","javascript","js","html","html5"],"license":"SEE LICENSE IN https://balkan.app","main":"orgchart.js","types":"orgchart.d.ts","name":"@balkangraph/orgchart.js","repository":{"type":"git","url":"https://github.com/BALKANGraph/OrgChartJS"},"dependencies":{},"version":"8.17.04"}