@balkangraph/orgchart.js 8.15.32 → 8.15.34
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 +109 -1
- package/orgchart.js +1 -1
- package/package.json +1 -1
package/orgchart.d.ts
CHANGED
|
@@ -1765,6 +1765,8 @@ declare class OrgChart {
|
|
|
1765
1765
|
/**
|
|
1766
1766
|
* ```typescript
|
|
1767
1767
|
* OrgChart.clinkTemplates.myTemplate = Object.assign({}, OrgChart.clinkTemplates.orange);
|
|
1768
|
+
* OrgChart.clinkTemplates.myTemplate.label =
|
|
1769
|
+
* '<text transform="translate(300, 750) rotate(-90)" fill="#F57C00" text-anchor="middle" x="{x}" y="{y}">{val}</text>';
|
|
1768
1770
|
* ```
|
|
1769
1771
|
*/
|
|
1770
1772
|
static clinkTemplates: {
|
|
@@ -1773,6 +1775,8 @@ declare class OrgChart {
|
|
|
1773
1775
|
/**
|
|
1774
1776
|
* ```typescript
|
|
1775
1777
|
* OrgChart.slinkTemplates.myTemplate = Object.assign({}, OrgChart.slinkTemplates.orange);
|
|
1778
|
+
* OrgChart.slinkTemplates.myTemplate.labelPosition = 'start';
|
|
1779
|
+
*
|
|
1776
1780
|
* ```
|
|
1777
1781
|
*/
|
|
1778
1782
|
static slinkTemplates: {
|
|
@@ -1782,6 +1786,8 @@ declare class OrgChart {
|
|
|
1782
1786
|
/**
|
|
1783
1787
|
* ```typescript
|
|
1784
1788
|
* OrgChart.templates.mainTemplate = Object.assign({}, OrgChart.templates.ana);
|
|
1789
|
+
* OrgChart.templates.mainTemplate.node =
|
|
1790
|
+
* `<rect x="0" y="0" height="80" width="300" fill="#039BE5" stroke-width="1" stroke="#686868" rx="40" ry="40"></rect>`;
|
|
1785
1791
|
* ```
|
|
1786
1792
|
*/
|
|
1787
1793
|
static templates: { [key: string]: OrgChart.template} ;
|
|
@@ -2804,6 +2810,18 @@ declare namespace OrgChart {
|
|
|
2804
2810
|
element: HTMLElement;
|
|
2805
2811
|
}
|
|
2806
2812
|
|
|
2813
|
+
|
|
2814
|
+
/**
|
|
2815
|
+
* Menu UI
|
|
2816
|
+
* ```typescript
|
|
2817
|
+
* let chart = new OrgChart("#tree", {
|
|
2818
|
+
* })
|
|
2819
|
+
* chart.onInit(() => {
|
|
2820
|
+
* chart.menuUI.show(chart.getMenuButton());
|
|
2821
|
+
* })
|
|
2822
|
+
* chart.load(nodes)
|
|
2823
|
+
* ```
|
|
2824
|
+
*/
|
|
2807
2825
|
interface menuUI {
|
|
2808
2826
|
init(obj: OrgChart, menu: { [key: string]: menu }): void;
|
|
2809
2827
|
/**
|
|
@@ -2841,6 +2859,15 @@ declare namespace OrgChart {
|
|
|
2841
2859
|
show(x: number | HTMLElement, y?: number, firstNodeId?: string | number, secondNodeId?: string | number, menu?: { [key: string]: menu }): void;
|
|
2842
2860
|
}
|
|
2843
2861
|
|
|
2862
|
+
/**
|
|
2863
|
+
* Circle Menu UI
|
|
2864
|
+
* ```typescript
|
|
2865
|
+
* var chart = new OrgChart('#tree', {});
|
|
2866
|
+
* chart.onInit(() => {
|
|
2867
|
+
* chart.nodeCircleMenuUI.show(1);
|
|
2868
|
+
* });
|
|
2869
|
+
* ```
|
|
2870
|
+
*/
|
|
2844
2871
|
interface circleMenuUI {
|
|
2845
2872
|
/**
|
|
2846
2873
|
* Inits circle menu instance
|
|
@@ -2850,6 +2877,8 @@ declare namespace OrgChart {
|
|
|
2850
2877
|
init(obj: OrgChart, menu: { [key: string]: menu }): void;
|
|
2851
2878
|
/**
|
|
2852
2879
|
* Shows circle menu
|
|
2880
|
+
*
|
|
2881
|
+
*
|
|
2853
2882
|
* @param nodeId
|
|
2854
2883
|
* @param menu
|
|
2855
2884
|
*/
|
|
@@ -3185,6 +3214,17 @@ declare namespace OrgChart {
|
|
|
3185
3214
|
bottom?: string
|
|
3186
3215
|
}
|
|
3187
3216
|
|
|
3217
|
+
/**
|
|
3218
|
+
* Exports to PDF document
|
|
3219
|
+
* ```typescript
|
|
3220
|
+
* let chart = new OrgChart('#tree', {});
|
|
3221
|
+
* ...
|
|
3222
|
+
* chart.exportPDF({
|
|
3223
|
+
* format: "A4"
|
|
3224
|
+
* });
|
|
3225
|
+
* ```
|
|
3226
|
+
* {@link https://balkan.app/OrgChartJS/Docs/Exporting | See doc...}
|
|
3227
|
+
*/
|
|
3188
3228
|
interface exportOptions {
|
|
3189
3229
|
margin?: Array<number>,
|
|
3190
3230
|
padding?: number,
|
|
@@ -3208,19 +3248,51 @@ declare namespace OrgChart {
|
|
|
3208
3248
|
nodeId? : number | string
|
|
3209
3249
|
}
|
|
3210
3250
|
|
|
3251
|
+
/**
|
|
3252
|
+
* Exports to CSV, XML or JSON options
|
|
3253
|
+
* ```typescript
|
|
3254
|
+
* document.getElementById('export').addEventListener('click', function () {
|
|
3255
|
+
* chart.exportCSV('My.csv');
|
|
3256
|
+
* });
|
|
3257
|
+
* ```
|
|
3258
|
+
* {@link https://balkan.app/OrgChartJS/Docs/Exporting | See doc...}
|
|
3259
|
+
*/
|
|
3211
3260
|
interface exportCSVXMLJSONOptions {
|
|
3212
3261
|
filename?: string,
|
|
3213
3262
|
expandChildren?: boolean,
|
|
3214
3263
|
min?: boolean,
|
|
3215
3264
|
nodeId? : number | string
|
|
3216
3265
|
}
|
|
3217
|
-
|
|
3266
|
+
|
|
3267
|
+
/**
|
|
3268
|
+
* ```typescript
|
|
3269
|
+
* OrgChart.clinkTemplates.myTemplate = Object.assign({}, OrgChart.clinkTemplates.orange);
|
|
3270
|
+
* OrgChart.clinkTemplates.myTemplate.label =
|
|
3271
|
+
* '<text transform="translate(300, 750) rotate(-90)" fill="#F57C00" text-anchor="middle" x="{x}" y="{y}">{val}</text>';
|
|
3272
|
+
* ```
|
|
3273
|
+
*/
|
|
3218
3274
|
interface linkTemplate {
|
|
3219
3275
|
defs?: string,
|
|
3220
3276
|
link?: string,
|
|
3221
3277
|
label?: string,
|
|
3222
3278
|
labelPosition?: string
|
|
3223
3279
|
}
|
|
3280
|
+
|
|
3281
|
+
/**
|
|
3282
|
+
* Menu options
|
|
3283
|
+
* ```typescript
|
|
3284
|
+
* var chart = new OrgChart('#tree', {
|
|
3285
|
+
* nodeMenu:{
|
|
3286
|
+
* call: {
|
|
3287
|
+
* icon: webcallMeIcon,
|
|
3288
|
+
* text: "Call now",
|
|
3289
|
+
* onClick: callHandler
|
|
3290
|
+
* }
|
|
3291
|
+
* }
|
|
3292
|
+
* });
|
|
3293
|
+
* ```
|
|
3294
|
+
* {@link https://balkan.app/OrgChartJS/Docs/Menus#yourMenu | See doc...}
|
|
3295
|
+
*/
|
|
3224
3296
|
interface menu {
|
|
3225
3297
|
[key: string]: {
|
|
3226
3298
|
text: string,
|
|
@@ -3228,6 +3300,27 @@ declare namespace OrgChart {
|
|
|
3228
3300
|
onClick?: Function
|
|
3229
3301
|
}
|
|
3230
3302
|
}
|
|
3303
|
+
/**
|
|
3304
|
+
* With node circle menu you can add, edit, remove node or create clink/slink with drga and drop. Before setting this option make sure that you defined nodeCircleMenuButton in the ysed template.
|
|
3305
|
+
* ```typescript
|
|
3306
|
+
* var chart = new OrgChart('#tree', {
|
|
3307
|
+
* nodeCircleMenu: {
|
|
3308
|
+
* editNode: {
|
|
3309
|
+
* icon: OrgChart.icon.edit(24, 24, '#aeaeae'),
|
|
3310
|
+
* text: "Edit node",
|
|
3311
|
+
* color: "white"
|
|
3312
|
+
* },
|
|
3313
|
+
* addClink: {
|
|
3314
|
+
* icon: OrgChart.icon.link(24, 24, '#aeaeae'),
|
|
3315
|
+
* text: "Add C link",
|
|
3316
|
+
* color: '#fff',
|
|
3317
|
+
* draggable: true
|
|
3318
|
+
* }
|
|
3319
|
+
* }
|
|
3320
|
+
* });
|
|
3321
|
+
* ```
|
|
3322
|
+
* {@link https://balkan.app/OrgChartJS/Docs/Menus | See doc...}
|
|
3323
|
+
*/
|
|
3231
3324
|
interface circleMenu {
|
|
3232
3325
|
[key: string]: {
|
|
3233
3326
|
text: string,
|
|
@@ -3236,6 +3329,21 @@ declare namespace OrgChart {
|
|
|
3236
3329
|
draggable?: boolean
|
|
3237
3330
|
}
|
|
3238
3331
|
}
|
|
3332
|
+
|
|
3333
|
+
/**
|
|
3334
|
+
* Edit form element
|
|
3335
|
+
* ```typescript
|
|
3336
|
+
* let chart = new OrgChart('#tree', {
|
|
3337
|
+
* editForm: {
|
|
3338
|
+
* elements: [
|
|
3339
|
+
* { type: 'textbox', label: 'Full Name', binding: 'Name' },
|
|
3340
|
+
* { type: 'textbox', label: 'Phone number', binding: 'phone' }
|
|
3341
|
+
* ]
|
|
3342
|
+
* }
|
|
3343
|
+
* });
|
|
3344
|
+
* ```
|
|
3345
|
+
* {@link https://balkan.app/OrgChartJS/Docs/Edit | See doc...}
|
|
3346
|
+
*/
|
|
3239
3347
|
interface editFormElement {
|
|
3240
3348
|
type?: string,
|
|
3241
3349
|
label?: string,
|