@balkangraph/orgchart.js 8.16.6 → 8.16.8

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
@@ -2316,7 +2316,17 @@ declare namespace OrgChart {
2316
2316
  const COLLAPSE_SUB_CHILDRENS: number;
2317
2317
 
2318
2318
 
2319
-
2319
+ /**
2320
+ * The OrgChart node model
2321
+ * ```typescript
2322
+ * var chart = new OrgChart('#tree', {});
2323
+ * chart.onInit(() => {
2324
+ * let node = chart.getNode(2);
2325
+ * console.log(node);
2326
+ * });
2327
+ * chart.load(nodes)
2328
+ * ```
2329
+ */
2320
2330
  interface node {
2321
2331
  /**
2322
2332
  * the same id you provided in the source node
@@ -2750,9 +2760,19 @@ declare namespace OrgChart {
2750
2760
  }
2751
2761
 
2752
2762
  interface searchUI {
2763
+ /**
2764
+ * @ignore
2765
+ */
2753
2766
  init(obj: OrgChart): void;
2754
2767
  /**
2755
2768
  * The on() method of the searchUI interface sets up a function that will be called whenever the specified event is delivered to the target. *
2769
+ * ```typescript
2770
+ * let chart = new OrgChart("#tree", {});
2771
+ * chart.searchUI.on('searchclick', function (sender, args) {
2772
+ * sender.hide();
2773
+ * });
2774
+ * chart.load(nodes)
2775
+ * ```
2756
2776
  * @category Event Listeners
2757
2777
  * @param type A case-sensitive string representing the event type to listen for.
2758
2778
  * @param listener The object that receives a notification when an event of the specified type occurs. This must be a JavaScript function.
@@ -2760,6 +2780,13 @@ declare namespace OrgChart {
2760
2780
  on(type: "add-item" | "show-items" | "hide" | "searchclick" , listener: (sender: searchUI, args: any, args1: any, args2: any) => void | boolean): searchUI;
2761
2781
  /**
2762
2782
  * Hides the search grid
2783
+ * ```typescript
2784
+ * let chart = new OrgChart("#tree", {});
2785
+ * chart.searchUI.on('searchclick', function (sender, args) {
2786
+ * sender.hide();
2787
+ * });
2788
+ * chart.load(nodes)
2789
+ * ```
2763
2790
  */
2764
2791
  hide(): void;
2765
2792
  /**
@@ -2978,11 +3005,13 @@ declare namespace OrgChart {
2978
3005
  interface undoRedoUI {
2979
3006
  /**
2980
3007
  * Inits undoRedoUI
3008
+ * @ignore
2981
3009
  * @param instance
2982
3010
  */
2983
3011
  init(instance: OrgChart): void;
2984
3012
  /**
2985
3013
  * Refreshes the UI buttonss
3014
+ * @ignore
2986
3015
  */
2987
3016
  refresh(): void;
2988
3017
  /**
@@ -3014,7 +3043,28 @@ declare namespace OrgChart {
3014
3043
  }
3015
3044
 
3016
3045
  interface pdfPrevUI {
3046
+ /**
3047
+ * Shows the PDF Preview UI
3048
+ * ```typescript
3049
+ * function pdf() {
3050
+ * OrgChart.pdfPrevUI.show(chart, {
3051
+ * format: "A4",
3052
+ * header: 'My Header',
3053
+ * footer: 'My Footer. Page {current-page} of {total-pages}'
3054
+ * });
3055
+ * }
3056
+ * ```
3057
+ */
3017
3058
  show(chart: OrgChart, options: exportOptions): pdfPrevUI;
3059
+
3060
+ /**
3061
+ * Hide the PDF Preview UI
3062
+ * ```typescript
3063
+ * chart.element.querySelector('#boc-prev-cancel').addEventListener('click', function () {
3064
+ * OrgChart.pdfPrevUI.hide(chart);
3065
+ * });
3066
+ * ```
3067
+ */
3018
3068
  hide(chart: OrgChart): void;
3019
3069
 
3020
3070
  }
@@ -3022,6 +3072,13 @@ declare namespace OrgChart {
3022
3072
  interface keyNavigation {
3023
3073
  /**
3024
3074
  * Set focus to specified id on initial load
3075
+ * ```typescript
3076
+ * var chart = new OrgChart('#tree', {
3077
+ * keyNavigation:{
3078
+ * focusId: 2
3079
+ * }
3080
+ * });
3081
+ * ```
3025
3082
  */
3026
3083
  focusId: number | string
3027
3084
  }
@@ -3285,7 +3342,17 @@ declare namespace OrgChart {
3285
3342
  draggable?: boolean
3286
3343
  }
3287
3344
 
3288
-
3345
+ /**
3346
+ * MiniMap position
3347
+ * ```typescript
3348
+ * OrgChart.miniMap.position = {
3349
+ * top: 'padding',
3350
+ * left: 'padding',
3351
+ * right: undefined,
3352
+ * bottom: undefined
3353
+ * };
3354
+ * ```
3355
+ */
3289
3356
  interface position {
3290
3357
  top?: string,
3291
3358
  left?: string,