@balkangraph/orgchart.js 8.16.3 → 8.16.5
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 +65 -4
- package/orgchart.js +1 -1
- package/package.json +1 -1
package/orgchart.d.ts
CHANGED
|
@@ -2785,17 +2785,45 @@ declare namespace OrgChart {
|
|
|
2785
2785
|
|
|
2786
2786
|
|
|
2787
2787
|
interface filterUI {
|
|
2788
|
+
/**
|
|
2789
|
+
* @ignore
|
|
2790
|
+
*/
|
|
2788
2791
|
init(instance: OrgChart): void;
|
|
2792
|
+
|
|
2793
|
+
/**
|
|
2794
|
+
* @ignore
|
|
2795
|
+
*/
|
|
2789
2796
|
update(): void;
|
|
2797
|
+
|
|
2790
2798
|
/**
|
|
2791
2799
|
* Opens filter Tab
|
|
2800
|
+
* ```typescript
|
|
2801
|
+
* let chart = new OrgChart("#tree", {
|
|
2802
|
+
* })
|
|
2803
|
+
* chart.onInit(() => {
|
|
2804
|
+
* chart.filterUI.show("city")
|
|
2805
|
+
* })
|
|
2806
|
+
* chart.load(nodes)
|
|
2807
|
+
* ```
|
|
2792
2808
|
* @param filterTabName the name of the filter tab
|
|
2793
2809
|
*/
|
|
2794
2810
|
show(filterTabName: string): void;
|
|
2811
|
+
|
|
2795
2812
|
/**
|
|
2796
|
-
*
|
|
2813
|
+
* Opens filter Tab
|
|
2814
|
+
* ```typescript
|
|
2815
|
+
* chart.element.addEventListener('click', function(event){
|
|
2816
|
+
* if (event.target == chart.getSvg()){
|
|
2817
|
+
* chart.filterUI.hide();
|
|
2818
|
+
* }
|
|
2819
|
+
* });
|
|
2820
|
+
* ```
|
|
2797
2821
|
*/
|
|
2798
2822
|
hide(): void;
|
|
2823
|
+
|
|
2824
|
+
/**
|
|
2825
|
+
* @ignore
|
|
2826
|
+
*/
|
|
2799
2827
|
addFilterTag(data: object): boolean;
|
|
2800
2828
|
/**
|
|
2801
2829
|
* The on() method of the filterUI interface sets up a function that will be called whenever the specified event is delivered to the target. *
|
|
@@ -2803,15 +2831,48 @@ declare namespace OrgChart {
|
|
|
2803
2831
|
* @param type A case-sensitive string representing the event type to listen for.
|
|
2804
2832
|
* @param listener The object that receives a notification when an event of the specified type occurs. This must be a JavaScript function.
|
|
2805
2833
|
*/
|
|
2834
|
+
|
|
2835
|
+
/**
|
|
2836
|
+
* Opens filter Tab
|
|
2837
|
+
* ```typescript
|
|
2838
|
+
* let chart = new OrgChart("#tree", {
|
|
2839
|
+
* })
|
|
2840
|
+
* chart.filterUI.on('add-filter', function(sender, args){
|
|
2841
|
+
* let names = Object.keys(sender.filterBy);
|
|
2842
|
+
* let index = names.indexOf(args.name);
|
|
2843
|
+
* if (index == names.length - 1) {
|
|
2844
|
+
* args.html += `<div data-btn-reset style="color: #039BE5;">reset</div>`;
|
|
2845
|
+
* }
|
|
2846
|
+
* });
|
|
2847
|
+
* chart.load(nodes)
|
|
2848
|
+
* ```
|
|
2849
|
+
*/
|
|
2806
2850
|
on(type: "update" | "add-item" | "add-filter" | "show-items" , listener: (sender: filterUI, args: any, args1: any, args2: any) => void | boolean): filterUI;
|
|
2851
|
+
|
|
2852
|
+
/**
|
|
2853
|
+
* Contains all filters
|
|
2854
|
+
* ```typescript
|
|
2855
|
+
* let chart = new OrgChart("#tree", {
|
|
2856
|
+
* });
|
|
2857
|
+
* chart.onInit(() => {
|
|
2858
|
+
* let filterBy = chart.filterUI.filterBy
|
|
2859
|
+
* }
|
|
2860
|
+
* chart.load(nodes)
|
|
2861
|
+
* ```
|
|
2862
|
+
*/
|
|
2807
2863
|
filterBy?: any;
|
|
2864
|
+
|
|
2865
|
+
/**
|
|
2866
|
+
* @ignore
|
|
2867
|
+
*/
|
|
2808
2868
|
element: HTMLElement;
|
|
2869
|
+
|
|
2870
|
+
/**
|
|
2871
|
+
* @ignore
|
|
2872
|
+
*/
|
|
2809
2873
|
instance: OrgChart;
|
|
2810
2874
|
}
|
|
2811
2875
|
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
2876
|
interface xScrollUI {
|
|
2816
2877
|
addListener(svg: HTMLElement): void;
|
|
2817
2878
|
create(width: number): void;
|