@balkangraph/orgchart.js 8.16.8 → 8.16.10

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
@@ -2764,6 +2764,7 @@ declare namespace OrgChart {
2764
2764
  * @ignore
2765
2765
  */
2766
2766
  init(obj: OrgChart): void;
2767
+
2767
2768
  /**
2768
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. *
2769
2770
  * ```typescript
@@ -2778,6 +2779,7 @@ declare namespace OrgChart {
2778
2779
  * @param listener The object that receives a notification when an event of the specified type occurs. This must be a JavaScript function.
2779
2780
  */
2780
2781
  on(type: "add-item" | "show-items" | "hide" | "searchclick" , listener: (sender: searchUI, args: any, args1: any, args2: any) => void | boolean): searchUI;
2782
+
2781
2783
  /**
2782
2784
  * Hides the search grid
2783
2785
  * ```typescript
@@ -2789,23 +2791,76 @@ declare namespace OrgChart {
2789
2791
  * ```
2790
2792
  */
2791
2793
  hide(): void;
2794
+
2792
2795
  /**
2793
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
+ * ```
2794
2804
  * @param value search for value
2795
2805
  */
2796
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
+ */
2797
2825
  createItem(img: string, id: string | number, first: string, second: string): string;
2826
+
2827
+ /**
2828
+ * @ignore
2829
+ */
2798
2830
  helpView(): string;
2831
+
2832
+ /**
2833
+ * @ignore
2834
+ */
2799
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
+ */
2800
2847
  input: HTMLElement;
2848
+
2849
+ /**
2850
+ * @ignore
2851
+ */
2801
2852
  searchTableWrapper: HTMLElement;
2853
+
2854
+ /**
2855
+ * @ignore
2856
+ */
2802
2857
  lastSearch: Array<object>;
2803
2858
  /**
2804
- * OrgChart instance
2859
+ * @ignore
2805
2860
  */
2806
2861
  instance: OrgChart;
2807
2862
  /**
2808
- * Search in field with abbreviation.
2863
+ * @ignore
2809
2864
  */
2810
2865
  searchFieldsAbbreviation: {[key: string]: string};
2811
2866
  }
@@ -3083,18 +3138,136 @@ declare namespace OrgChart {
3083
3138
  focusId: number | string
3084
3139
  }
3085
3140
 
3141
+ /**
3142
+ * Toolbar UI
3143
+ */
3086
3144
  interface toolbarUI {
3145
+ /**
3146
+ * @ignore
3147
+ * @param obj
3148
+ * @param toolbar
3149
+ */
3087
3150
  init(obj: OrgChart, toolbar: toolbar): void;
3151
+
3152
+ /**
3153
+ * Shows the layout
3154
+ * ```typescript
3155
+ * var chart = new OrgChart('#tree', {});
3156
+ * chart.onInit(function(){
3157
+ * this.toolbarUI.showLayout();
3158
+ * });
3159
+ * chart.load(nodes)
3160
+ * ```
3161
+ */
3088
3162
  showLayout(): void;
3089
- hideLayout(): void;
3090
3163
 
3164
+ /**
3165
+ * Hides the layout
3166
+ * ```typescript
3167
+ * var chart = new OrgChart('#tree', {});
3168
+ * chart.onInit(function(){
3169
+ * this.toolbarUI.hideLayout();
3170
+ * });
3171
+ * chart.load(nodes)
3172
+ * ```
3173
+ */
3174
+ hideLayout(): void;
3091
3175
 
3176
+ /**
3177
+ * ```typescript
3178
+ * OrgChart.toolbarUI.expandAllIcon =
3179
+ * `<svg style="margin-bottom:7px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px">
3180
+ * <marker id="arrow" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="4" markerHeight="4" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#757575" /></marker>
3181
+ * <line x1="11" y1="11" x2="6" y2="6" stroke="#757575" stroke-width="2" marker-end="url(#arrow)" />
3182
+ * <line x1="21" y1="11" x2="26" y2="6" stroke="#757575" stroke-width="2" marker-end="url(#arrow)" />
3183
+ * <line x1="21" y1="21" x2="26" y2="26" stroke="#757575" stroke-width="2" marker-end="url(#arrow)" />
3184
+ * <line x1="11" y1="21" x2="6" y2="26" stroke="#757575" stroke-width="2" marker-end="url(#arrow)" />
3185
+ * <rect x="12" y="12" width="8" height="8" fill="#757575"></rect>
3186
+ * </svg>`;
3187
+ * ```
3188
+ */
3092
3189
  expandAllIcon?: string;
3190
+
3191
+ /**
3192
+ * ```typescript
3193
+ * OrgChart.toolbarUI.fitIcon =
3194
+ * `<svg style="margin-bottom:7px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px">
3195
+ * <path stroke-width="3" fill="none" stroke="#757575" d="M4,11 L4,4 L11,4"></path>
3196
+ * <path stroke-width="3" fill="none" stroke="#757575" d="M28,11 L28,4 L21,4"></path>
3197
+ * <path stroke-width="3" fill="none" stroke="#757575" d="M28,21 L28,28 L21,28"></path>
3198
+ * <path stroke-width="3" fill="none" stroke="#757575" d="M4,21 L4,28 L11,28"></path>
3199
+ * <circle cx="16" cy="16" r="5" fill="#757575"></circle>
3200
+ * </svg>`;
3201
+ * ```
3202
+ */
3093
3203
  fitIcon?: string;
3204
+
3205
+ /**
3206
+ * ```typescript
3207
+ * OrgChart.toolbarUI.openFullScreenIcon =
3208
+ * `<svg style="margin-bottom:7px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px">
3209
+ * <path stroke-width="3" fill="none" stroke="#757575" d="M4,11 L4,4 L11,4"></path>
3210
+ * <path stroke-width="3" fill="none" stroke="#757575" d="M28,11 L28,4 L21,4"></path>
3211
+ * <path stroke-width="3" fill="none" stroke="#757575" d="M28,21 L28,28 L21,28"></path>
3212
+ * <path stroke-width="3" fill="none" stroke="#757575" d="M4,21 L4,28 L11,28"></path>
3213
+ * <line x1="5" y1="5" x2="27" y2="27" stroke-width="3" stroke="#757575"></line>
3214
+ * <line x1="5" y1="27" x2="27" y2="5" stroke-width="3" stroke="#757575"></line>
3215
+ * </svg>`;
3216
+ * ```
3217
+ */
3094
3218
  openFullScreenIcon?: string;
3219
+
3220
+ /**
3221
+ * ```typescript
3222
+ * OrgChart.toolbarUI.closeFullScreenIcon =
3223
+ * `<svg style="margin-bottom:7px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px">
3224
+ * <path stroke-width="3" fill="none" stroke="#757575" d="M4,11 L4,4 L11,4"></path>
3225
+ * <path stroke-width="3" fill="none" stroke="#757575" d="M28,11 L28,4 L21,4"></path>
3226
+ * <path stroke-width="3" fill="none" stroke="#757575" d="M28,21 L28,28 L21,28"></path>
3227
+ * <path stroke-width="3" fill="none" stroke="#757575" d="M4,21 L4,28 L11,28"></path>
3228
+ * <rect x="11" y="11" width="10" height="10" stroke-width="3" fill="none" stroke="#757575" ></rect>
3229
+ * </svg>`;
3230
+ * ```
3231
+ */
3095
3232
  closeFullScreenIcon?: string;
3233
+
3234
+ /**
3235
+ * ```typescript
3236
+ * OrgChart.toolbarUI.zoomInIcon =
3237
+ * `<svg style="box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border-left: 1px solid #cacaca; border-right: 1px solid #cacaca; border-top: 1px solid #cacaca; background-color: #f9f9f9;display: block; cursor: pointer;" width="32px" height="32px" >
3238
+ * <g>
3239
+ * <rect fill="#f9f9f9" x="0" y="0" width="32" height="32" ></rect>
3240
+ * <line x1="8" y1="16" x2="24" y2="16" stroke-width="3" stroke="#757575"></line>
3241
+ * <line x1="16" y1="8" x2="16" y2="24" stroke-width="3" stroke="#757575"></line>
3242
+ * </g>
3243
+ * <line x1="4" y1="32" x2="28" y2="32" stroke-width="1" stroke="#cacaca"></line>
3244
+ * </svg>`;
3245
+ * ```
3246
+ */
3096
3247
  zoomInIcon?: string;
3248
+
3249
+ /**
3250
+ * ```typescript
3251
+ * OrgChart.toolbarUI.zoomOutIcon =
3252
+ * `<svg style="box-shadow: 0px 1px 4px rgba(0,0,0,0.3); margin-bottom:7px; border-left: 1px solid #cacaca; border-right: 1px solid #cacaca; border-bottom: 1px solid #cacaca; background-color: #f9f9f9;display: block; cursor: pointer;" width="32px" height="32px" >
3253
+ * <g>
3254
+ * <rect fill="#f9f9f9" x="0" y="0" width="32" height="32" ></rect>
3255
+ * <line x1="8" y1="16" x2="24" y2="16" stroke-width="3" stroke="#757575"></line>
3256
+ * </g>
3257
+ * </svg>`;
3258
+ * ```
3259
+ */
3097
3260
  zoomOutIcon?: string;
3261
+
3262
+ /**
3263
+ * ```typescript
3264
+ * OrgChart.toolbarUI.layoutIcon =
3265
+ * `<svg ` + OrgChart.attr.tlbr + `="layout" style="box-shadow: 0px 1px 4px rgba(0,0,0,0.3); border: 1px solid #cacaca;background-color: #f9f9f9;display: block;cursor: pointer;" width="32px" height="32px">
3266
+ * <path stroke-width="3" fill="none" stroke="#757575" d="M8,24 L16,14 L24,24"></path>
3267
+ * <path stroke-width="3" fill="none" stroke="#757575" d="M8,16 L16,8 L24,16"></path>
3268
+ * </svg>`;
3269
+ * ```
3270
+ */
3098
3271
  layoutIcon?: string;
3099
3272
  }
3100
3273