@balkangraph/orgchart.js 8.16.7 → 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
  /**
@@ -3020,11 +3047,11 @@ declare namespace OrgChart {
3020
3047
  * Shows the PDF Preview UI
3021
3048
  * ```typescript
3022
3049
  * function pdf() {
3023
- * OrgChart.pdfPrevUI.show(chart, {
3024
- * format: "A4",
3025
- * header: 'My Header',
3026
- * footer: 'My Footer. Page {current-page} of {total-pages}'
3027
- * });
3050
+ * OrgChart.pdfPrevUI.show(chart, {
3051
+ * format: "A4",
3052
+ * header: 'My Header',
3053
+ * footer: 'My Footer. Page {current-page} of {total-pages}'
3054
+ * });
3028
3055
  * }
3029
3056
  * ```
3030
3057
  */
@@ -3034,7 +3061,7 @@ declare namespace OrgChart {
3034
3061
  * Hide the PDF Preview UI
3035
3062
  * ```typescript
3036
3063
  * chart.element.querySelector('#boc-prev-cancel').addEventListener('click', function () {
3037
- * OrgChart.pdfPrevUI.hide(chart);
3064
+ * OrgChart.pdfPrevUI.hide(chart);
3038
3065
  * });
3039
3066
  * ```
3040
3067
  */
@@ -3047,9 +3074,9 @@ declare namespace OrgChart {
3047
3074
  * Set focus to specified id on initial load
3048
3075
  * ```typescript
3049
3076
  * var chart = new OrgChart('#tree', {
3050
- * keyNavigation:{
3051
- * focusId: 2
3052
- * }
3077
+ * keyNavigation:{
3078
+ * focusId: 2
3079
+ * }
3053
3080
  * });
3054
3081
  * ```
3055
3082
  */
@@ -3315,7 +3342,17 @@ declare namespace OrgChart {
3315
3342
  draggable?: boolean
3316
3343
  }
3317
3344
 
3318
-
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
+ */
3319
3356
  interface position {
3320
3357
  top?: string,
3321
3358
  left?: string,