@balkangraph/orgchart.js 8.15.32 → 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 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} ;
@@ -3185,6 +3191,17 @@ declare namespace OrgChart {
3185
3191
  bottom?: string
3186
3192
  }
3187
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
+ */
3188
3205
  interface exportOptions {
3189
3206
  margin?: Array<number>,
3190
3207
  padding?: number,
@@ -3208,19 +3225,51 @@ declare namespace OrgChart {
3208
3225
  nodeId? : number | string
3209
3226
  }
3210
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
+ */
3211
3237
  interface exportCSVXMLJSONOptions {
3212
3238
  filename?: string,
3213
3239
  expandChildren?: boolean,
3214
3240
  min?: boolean,
3215
3241
  nodeId? : number | string
3216
3242
  }
3217
-
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
+ */
3218
3251
  interface linkTemplate {
3219
3252
  defs?: string,
3220
3253
  link?: string,
3221
3254
  label?: string,
3222
3255
  labelPosition?: string
3223
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
+ */
3224
3273
  interface menu {
3225
3274
  [key: string]: {
3226
3275
  text: string,
@@ -3228,6 +3277,27 @@ declare namespace OrgChart {
3228
3277
  onClick?: Function
3229
3278
  }
3230
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
+ */
3231
3301
  interface circleMenu {
3232
3302
  [key: string]: {
3233
3303
  text: string,
@@ -3236,6 +3306,21 @@ declare namespace OrgChart {
3236
3306
  draggable?: boolean
3237
3307
  }
3238
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
+ */
3239
3324
  interface editFormElement {
3240
3325
  type?: string,
3241
3326
  label?: string,