@balkangraph/orgchart.js 8.15.31 → 8.15.33
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 +121 -11
- 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} ;
|
|
@@ -2651,6 +2657,18 @@ declare namespace OrgChart {
|
|
|
2651
2657
|
[name: string]: any
|
|
2652
2658
|
}
|
|
2653
2659
|
|
|
2660
|
+
|
|
2661
|
+
/**
|
|
2662
|
+
* Edit/Details Form User Interface
|
|
2663
|
+
* ```typescript
|
|
2664
|
+
* let chart = new OrgChart("#tree", {
|
|
2665
|
+
* });
|
|
2666
|
+
* chart.onInit(function(){
|
|
2667
|
+
* chart.editUI.show(1);
|
|
2668
|
+
* });
|
|
2669
|
+
* chart.load(nodes)
|
|
2670
|
+
* ```
|
|
2671
|
+
*/
|
|
2654
2672
|
interface editUI {
|
|
2655
2673
|
/**
|
|
2656
2674
|
* Inits edit ui
|
|
@@ -2679,7 +2697,18 @@ declare namespace OrgChart {
|
|
|
2679
2697
|
// static renderHeaderContent(title: string, photo: string, node: OrgChart.node, data: object): string;
|
|
2680
2698
|
}
|
|
2681
2699
|
|
|
2682
|
-
|
|
2700
|
+
/**
|
|
2701
|
+
* AI User Interface
|
|
2702
|
+
* ```typescript
|
|
2703
|
+
* let chart = new OrgChart("#tree", {
|
|
2704
|
+
* enableAI: true,
|
|
2705
|
+
* });
|
|
2706
|
+
* chart.onInit(function(){
|
|
2707
|
+
* chart.aiUI.show();
|
|
2708
|
+
* });
|
|
2709
|
+
* chart.load(nodes)
|
|
2710
|
+
* ```
|
|
2711
|
+
*/
|
|
2683
2712
|
interface aiUI {
|
|
2684
2713
|
/**
|
|
2685
2714
|
* Prompt text box
|
|
@@ -3162,6 +3191,17 @@ declare namespace OrgChart {
|
|
|
3162
3191
|
bottom?: string
|
|
3163
3192
|
}
|
|
3164
3193
|
|
|
3194
|
+
/**
|
|
3195
|
+
* Exports to PDF document
|
|
3196
|
+
* ```typescript
|
|
3197
|
+
* let chart = new OrgChart('#tree', {});
|
|
3198
|
+
* ...
|
|
3199
|
+
* chart.exportPDF({
|
|
3200
|
+
* format: "A4"
|
|
3201
|
+
* });
|
|
3202
|
+
* ```
|
|
3203
|
+
* {@link https://balkan.app/OrgChartJS/Docs/Exporting | See doc...}
|
|
3204
|
+
*/
|
|
3165
3205
|
interface exportOptions {
|
|
3166
3206
|
margin?: Array<number>,
|
|
3167
3207
|
padding?: number,
|
|
@@ -3185,19 +3225,51 @@ declare namespace OrgChart {
|
|
|
3185
3225
|
nodeId? : number | string
|
|
3186
3226
|
}
|
|
3187
3227
|
|
|
3228
|
+
/**
|
|
3229
|
+
* Exports to CSV, XML or JSON options
|
|
3230
|
+
* ```typescript
|
|
3231
|
+
* document.getElementById('export').addEventListener('click', function () {
|
|
3232
|
+
* chart.exportCSV('My.csv');
|
|
3233
|
+
* });
|
|
3234
|
+
* ```
|
|
3235
|
+
* {@link https://balkan.app/OrgChartJS/Docs/Exporting | See doc...}
|
|
3236
|
+
*/
|
|
3188
3237
|
interface exportCSVXMLJSONOptions {
|
|
3189
3238
|
filename?: string,
|
|
3190
3239
|
expandChildren?: boolean,
|
|
3191
3240
|
min?: boolean,
|
|
3192
3241
|
nodeId? : number | string
|
|
3193
3242
|
}
|
|
3194
|
-
|
|
3243
|
+
|
|
3244
|
+
/**
|
|
3245
|
+
* ```typescript
|
|
3246
|
+
* OrgChart.clinkTemplates.myTemplate = Object.assign({}, OrgChart.clinkTemplates.orange);
|
|
3247
|
+
* OrgChart.clinkTemplates.myTemplate.label =
|
|
3248
|
+
* '<text transform="translate(300, 750) rotate(-90)" fill="#F57C00" text-anchor="middle" x="{x}" y="{y}">{val}</text>';
|
|
3249
|
+
* ```
|
|
3250
|
+
*/
|
|
3195
3251
|
interface linkTemplate {
|
|
3196
3252
|
defs?: string,
|
|
3197
3253
|
link?: string,
|
|
3198
3254
|
label?: string,
|
|
3199
3255
|
labelPosition?: string
|
|
3200
3256
|
}
|
|
3257
|
+
|
|
3258
|
+
/**
|
|
3259
|
+
* Menu options
|
|
3260
|
+
* ```typescript
|
|
3261
|
+
* var chart = new OrgChart('#tree', {
|
|
3262
|
+
* nodeMenu:{
|
|
3263
|
+
* call: {
|
|
3264
|
+
* icon: webcallMeIcon,
|
|
3265
|
+
* text: "Call now",
|
|
3266
|
+
* onClick: callHandler
|
|
3267
|
+
* }
|
|
3268
|
+
* }
|
|
3269
|
+
* });
|
|
3270
|
+
* ```
|
|
3271
|
+
* {@link https://balkan.app/OrgChartJS/Docs/Menus#yourMenu | See doc...}
|
|
3272
|
+
*/
|
|
3201
3273
|
interface menu {
|
|
3202
3274
|
[key: string]: {
|
|
3203
3275
|
text: string,
|
|
@@ -3205,6 +3277,27 @@ declare namespace OrgChart {
|
|
|
3205
3277
|
onClick?: Function
|
|
3206
3278
|
}
|
|
3207
3279
|
}
|
|
3280
|
+
/**
|
|
3281
|
+
* 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.
|
|
3282
|
+
* ```typescript
|
|
3283
|
+
* var chart = new OrgChart('#tree', {
|
|
3284
|
+
* nodeCircleMenu: {
|
|
3285
|
+
* editNode: {
|
|
3286
|
+
* icon: OrgChart.icon.edit(24, 24, '#aeaeae'),
|
|
3287
|
+
* text: "Edit node",
|
|
3288
|
+
* color: "white"
|
|
3289
|
+
* },
|
|
3290
|
+
* addClink: {
|
|
3291
|
+
* icon: OrgChart.icon.link(24, 24, '#aeaeae'),
|
|
3292
|
+
* text: "Add C link",
|
|
3293
|
+
* color: '#fff',
|
|
3294
|
+
* draggable: true
|
|
3295
|
+
* }
|
|
3296
|
+
* }
|
|
3297
|
+
* });
|
|
3298
|
+
* ```
|
|
3299
|
+
* {@link https://balkan.app/OrgChartJS/Docs/Menus | See doc...}
|
|
3300
|
+
*/
|
|
3208
3301
|
interface circleMenu {
|
|
3209
3302
|
[key: string]: {
|
|
3210
3303
|
text: string,
|
|
@@ -3213,6 +3306,21 @@ declare namespace OrgChart {
|
|
|
3213
3306
|
draggable?: boolean
|
|
3214
3307
|
}
|
|
3215
3308
|
}
|
|
3309
|
+
|
|
3310
|
+
/**
|
|
3311
|
+
* Edit form element
|
|
3312
|
+
* ```typescript
|
|
3313
|
+
* let chart = new OrgChart('#tree', {
|
|
3314
|
+
* editForm: {
|
|
3315
|
+
* elements: [
|
|
3316
|
+
* { type: 'textbox', label: 'Full Name', binding: 'Name' },
|
|
3317
|
+
* { type: 'textbox', label: 'Phone number', binding: 'phone' }
|
|
3318
|
+
* ]
|
|
3319
|
+
* }
|
|
3320
|
+
* });
|
|
3321
|
+
* ```
|
|
3322
|
+
* {@link https://balkan.app/OrgChartJS/Docs/Edit | See doc...}
|
|
3323
|
+
*/
|
|
3216
3324
|
interface editFormElement {
|
|
3217
3325
|
type?: string,
|
|
3218
3326
|
label?: string,
|
|
@@ -3227,6 +3335,10 @@ declare namespace OrgChart {
|
|
|
3227
3335
|
template?: string,
|
|
3228
3336
|
label?: string
|
|
3229
3337
|
}
|
|
3338
|
+
|
|
3339
|
+
/**
|
|
3340
|
+
* @ignore
|
|
3341
|
+
*/
|
|
3230
3342
|
interface backdrop {
|
|
3231
3343
|
id?: string | number,
|
|
3232
3344
|
levels?: number,
|
|
@@ -4288,14 +4400,7 @@ declare namespace OrgChart {
|
|
|
4288
4400
|
slinks?: Array<OrgChart.link>,
|
|
4289
4401
|
|
|
4290
4402
|
/**
|
|
4291
|
-
*
|
|
4292
|
-
* ```typescript
|
|
4293
|
-
* var chart = new OrgChart('#tree', {
|
|
4294
|
-
* backdrops: [
|
|
4295
|
-
* { id: 5, levels: 2, color: '#039BE5', opacity: 0.2 }
|
|
4296
|
-
* ]
|
|
4297
|
-
* });
|
|
4298
|
-
* ```
|
|
4403
|
+
* @ignore
|
|
4299
4404
|
*/
|
|
4300
4405
|
backdrops?: Array<OrgChart.backdrop>,
|
|
4301
4406
|
|
|
@@ -4553,7 +4658,12 @@ declare namespace OrgChart {
|
|
|
4553
4658
|
text?: string
|
|
4554
4659
|
} }},
|
|
4555
4660
|
/**
|
|
4556
|
-
*
|
|
4661
|
+
* ```typescript
|
|
4662
|
+
* let chart = new OrgChart('#tree', {
|
|
4663
|
+
* editUI: new editForm(),
|
|
4664
|
+
* });
|
|
4665
|
+
* ```
|
|
4666
|
+
* [Go to edit doc page for more details](https://balkan.app/OrgChartJS/Docs/Edit#custom)
|
|
4557
4667
|
*/
|
|
4558
4668
|
editUI?: OrgChart.editUI,
|
|
4559
4669
|
/**
|