@balkangraph/orgchart.js 8.16.3 → 8.16.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
@@ -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
- * Hides the filter tabs
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,6 +2831,22 @@ 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;
2807
2851
  filterBy?: any;
2808
2852
  element: HTMLElement;