@balkangraph/orgchart.js 8.16.7 → 8.16.9
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 +105 -13
- package/orgchart.js +1 -1
- package/package.json +1 -1
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,35 +2760,107 @@ declare namespace OrgChart {
|
|
|
2750
2760
|
}
|
|
2751
2761
|
|
|
2752
2762
|
interface searchUI {
|
|
2763
|
+
/**
|
|
2764
|
+
* @ignore
|
|
2765
|
+
*/
|
|
2753
2766
|
init(obj: OrgChart): void;
|
|
2767
|
+
|
|
2754
2768
|
/**
|
|
2755
2769
|
* The on() method of the searchUI interface sets up a function that will be called whenever the specified event is delivered to the target. *
|
|
2770
|
+
* ```typescript
|
|
2771
|
+
* let chart = new OrgChart("#tree", {});
|
|
2772
|
+
* chart.searchUI.on('searchclick', function (sender, args) {
|
|
2773
|
+
* sender.hide();
|
|
2774
|
+
* });
|
|
2775
|
+
* chart.load(nodes)
|
|
2776
|
+
* ```
|
|
2756
2777
|
* @category Event Listeners
|
|
2757
2778
|
* @param type A case-sensitive string representing the event type to listen for.
|
|
2758
2779
|
* @param listener The object that receives a notification when an event of the specified type occurs. This must be a JavaScript function.
|
|
2759
2780
|
*/
|
|
2760
2781
|
on(type: "add-item" | "show-items" | "hide" | "searchclick" , listener: (sender: searchUI, args: any, args1: any, args2: any) => void | boolean): searchUI;
|
|
2782
|
+
|
|
2761
2783
|
/**
|
|
2762
2784
|
* Hides the search grid
|
|
2785
|
+
* ```typescript
|
|
2786
|
+
* let chart = new OrgChart("#tree", {});
|
|
2787
|
+
* chart.searchUI.on('searchclick', function (sender, args) {
|
|
2788
|
+
* sender.hide();
|
|
2789
|
+
* });
|
|
2790
|
+
* chart.load(nodes)
|
|
2791
|
+
* ```
|
|
2763
2792
|
*/
|
|
2764
2793
|
hide(): void;
|
|
2794
|
+
|
|
2765
2795
|
/**
|
|
2766
2796
|
* Finds filed data by specified value
|
|
2797
|
+
* ```typescript
|
|
2798
|
+
* let chart = new OrgChart("#tree", {});
|
|
2799
|
+
* chart.onInit(() => {
|
|
2800
|
+
* chart.searchUI.find("Denny");
|
|
2801
|
+
* });
|
|
2802
|
+
* chart.load(nodes)
|
|
2803
|
+
* ```
|
|
2767
2804
|
* @param value search for value
|
|
2768
2805
|
*/
|
|
2769
2806
|
find(value: string): void;
|
|
2807
|
+
|
|
2808
|
+
/**
|
|
2809
|
+
* ```typescript
|
|
2810
|
+
* OrgChart.searchUI.createItem = function (img, id, first, second) {
|
|
2811
|
+
* return
|
|
2812
|
+
* `<tr data-search-item-id="${id}">
|
|
2813
|
+
* <td class="boc-search-image-td">
|
|
2814
|
+
* <div class="boc-search-photo" style="background-image: url(${img})"></div>
|
|
2815
|
+
* </td>
|
|
2816
|
+
* <td class="boc-search-text-td">${first} <br/>${second}</td>
|
|
2817
|
+
* </tr>`;
|
|
2818
|
+
* };
|
|
2819
|
+
* ```
|
|
2820
|
+
* @param img
|
|
2821
|
+
* @param id
|
|
2822
|
+
* @param first
|
|
2823
|
+
* @param second
|
|
2824
|
+
*/
|
|
2770
2825
|
createItem(img: string, id: string | number, first: string, second: string): string;
|
|
2826
|
+
|
|
2827
|
+
/**
|
|
2828
|
+
* @ignore
|
|
2829
|
+
*/
|
|
2771
2830
|
helpView(): string;
|
|
2831
|
+
|
|
2832
|
+
/**
|
|
2833
|
+
* @ignore
|
|
2834
|
+
*/
|
|
2772
2835
|
addMatchTag(id: string | number) : boolean;
|
|
2836
|
+
|
|
2837
|
+
/**
|
|
2838
|
+
* Input field
|
|
2839
|
+
* ```typescript
|
|
2840
|
+
* let chart = new OrgChart("#tree", {});
|
|
2841
|
+
* chart.onInit(() => {
|
|
2842
|
+
* chart.searchUI.input.focus();
|
|
2843
|
+
* });
|
|
2844
|
+
* chart.load(nodes)
|
|
2845
|
+
* ```
|
|
2846
|
+
*/
|
|
2773
2847
|
input: HTMLElement;
|
|
2848
|
+
|
|
2849
|
+
/**
|
|
2850
|
+
* @ignore
|
|
2851
|
+
*/
|
|
2774
2852
|
searchTableWrapper: HTMLElement;
|
|
2853
|
+
|
|
2854
|
+
/**
|
|
2855
|
+
* @ignore
|
|
2856
|
+
*/
|
|
2775
2857
|
lastSearch: Array<object>;
|
|
2776
2858
|
/**
|
|
2777
|
-
*
|
|
2859
|
+
* @ignore
|
|
2778
2860
|
*/
|
|
2779
2861
|
instance: OrgChart;
|
|
2780
2862
|
/**
|
|
2781
|
-
*
|
|
2863
|
+
* @ignore
|
|
2782
2864
|
*/
|
|
2783
2865
|
searchFieldsAbbreviation: {[key: string]: string};
|
|
2784
2866
|
}
|
|
@@ -3020,11 +3102,11 @@ declare namespace OrgChart {
|
|
|
3020
3102
|
* Shows the PDF Preview UI
|
|
3021
3103
|
* ```typescript
|
|
3022
3104
|
* function pdf() {
|
|
3023
|
-
*
|
|
3024
|
-
*
|
|
3025
|
-
*
|
|
3026
|
-
*
|
|
3027
|
-
*
|
|
3105
|
+
* OrgChart.pdfPrevUI.show(chart, {
|
|
3106
|
+
* format: "A4",
|
|
3107
|
+
* header: 'My Header',
|
|
3108
|
+
* footer: 'My Footer. Page {current-page} of {total-pages}'
|
|
3109
|
+
* });
|
|
3028
3110
|
* }
|
|
3029
3111
|
* ```
|
|
3030
3112
|
*/
|
|
@@ -3034,7 +3116,7 @@ declare namespace OrgChart {
|
|
|
3034
3116
|
* Hide the PDF Preview UI
|
|
3035
3117
|
* ```typescript
|
|
3036
3118
|
* chart.element.querySelector('#boc-prev-cancel').addEventListener('click', function () {
|
|
3037
|
-
*
|
|
3119
|
+
* OrgChart.pdfPrevUI.hide(chart);
|
|
3038
3120
|
* });
|
|
3039
3121
|
* ```
|
|
3040
3122
|
*/
|
|
@@ -3047,9 +3129,9 @@ declare namespace OrgChart {
|
|
|
3047
3129
|
* Set focus to specified id on initial load
|
|
3048
3130
|
* ```typescript
|
|
3049
3131
|
* var chart = new OrgChart('#tree', {
|
|
3050
|
-
*
|
|
3051
|
-
*
|
|
3052
|
-
*
|
|
3132
|
+
* keyNavigation:{
|
|
3133
|
+
* focusId: 2
|
|
3134
|
+
* }
|
|
3053
3135
|
* });
|
|
3054
3136
|
* ```
|
|
3055
3137
|
*/
|
|
@@ -3315,7 +3397,17 @@ declare namespace OrgChart {
|
|
|
3315
3397
|
draggable?: boolean
|
|
3316
3398
|
}
|
|
3317
3399
|
|
|
3318
|
-
|
|
3400
|
+
/**
|
|
3401
|
+
* MiniMap position
|
|
3402
|
+
* ```typescript
|
|
3403
|
+
* OrgChart.miniMap.position = {
|
|
3404
|
+
* top: 'padding',
|
|
3405
|
+
* left: 'padding',
|
|
3406
|
+
* right: undefined,
|
|
3407
|
+
* bottom: undefined
|
|
3408
|
+
* };
|
|
3409
|
+
* ```
|
|
3410
|
+
*/
|
|
3319
3411
|
interface position {
|
|
3320
3412
|
top?: string,
|
|
3321
3413
|
left?: string,
|