@balkangraph/orgchart.js 8.14.124 → 8.15.0

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
@@ -1348,6 +1348,15 @@ declare class OrgChart {
1348
1348
  event: any
1349
1349
  }) => void): OrgChart;
1350
1350
 
1351
+
1352
+ onAIToolCalls(listener: (this: OrgChart, args: {
1353
+ toolCalls: Array<{
1354
+ FunctionName : string,
1355
+ FunctionResult : string,
1356
+ FunctionArguments : { [key: string]: any }
1357
+ }>
1358
+ }) => void): OrgChart;
1359
+
1351
1360
  /**
1352
1361
  * On node double click event listener.
1353
1362
  * ```typescript
@@ -1760,12 +1769,11 @@ declare class OrgChart {
1760
1769
  * ```typescript
1761
1770
  * let chart = new OrgChart(document.getElementById("tree"), {
1762
1771
  * ...
1763
- * showXScroll: OrgChart.scroll.visible,
1772
+ * showXScroll: true,
1764
1773
  * });
1765
1774
  * ```
1766
1775
  */
1767
1776
  static scroll: {
1768
- visible?: boolean,
1769
1777
  smooth?: number,
1770
1778
  speed?: number,
1771
1779
  safari?: { smooth?: number; speed?: number; },
@@ -2842,6 +2850,48 @@ declare namespace OrgChart {
2842
2850
  }
2843
2851
 
2844
2852
 
2853
+ /**
2854
+ * When you implement function calling in a prompt, you create a tools object, which contains one or more function declarations.
2855
+ */
2856
+ interface aiChatTool {
2857
+ /**
2858
+ * The unique identifier for the function within the API call.
2859
+ */
2860
+ functionName?: string,
2861
+ /**
2862
+ * A comprehensive explanation of the function's purpose and capabilities.
2863
+ */
2864
+ functionDescription?: string,
2865
+ /**
2866
+ * Defines the input data required by the function.
2867
+ */
2868
+ functionParameters?: {
2869
+ /**
2870
+ * Specifies the overall data type, such as object.
2871
+ */
2872
+ type?: "object",
2873
+ /**
2874
+ * Lists individual parameters.
2875
+ */
2876
+ properties?: {
2877
+ [key: string]: {
2878
+ /**
2879
+ * The data type of the parameter, such as string, integer, boolean.
2880
+ */
2881
+ type?: string,
2882
+ /**
2883
+ * A clear explanation of the parameter's purpose and expected format.
2884
+ */
2885
+ description?: string
2886
+ }
2887
+ },
2888
+ /**
2889
+ * An array of strings listing the parameter names that are mandatory for the function to operate.
2890
+ */
2891
+ required?: Array<string>
2892
+ }
2893
+ }
2894
+
2845
2895
 
2846
2896
  interface toolbar {
2847
2897
  layout?: boolean,
@@ -3088,6 +3138,17 @@ declare namespace OrgChart {
3088
3138
  */
3089
3139
  enableSearch?: boolean,
3090
3140
 
3141
+
3142
+ /**
3143
+ * Enables artificial intelligence. Default value is false.
3144
+ * ```typescript
3145
+ * var chart = new OrgChart('#tree', {
3146
+ * enableAI: false
3147
+ * });
3148
+ * ```
3149
+ */
3150
+ enableAI?: boolean,
3151
+
3091
3152
  /**
3092
3153
  * You can disable chart pan. Default value - *true*.
3093
3154
  * ```typescript
@@ -3198,6 +3259,20 @@ declare namespace OrgChart {
3198
3259
  * {@link https://balkan.app/OrgChartJS/Docs/Menus | See doc...}
3199
3260
  */
3200
3261
  menu?: OrgChart.menu,
3262
+
3263
+ /**
3264
+ * Array of tools called by the AI
3265
+ * ```typescript
3266
+ * var chart = new OrgChart('#tree', {
3267
+ * aiChatTools: [{
3268
+ * functionName: 'fit',
3269
+ * functionDescription: 'Fit chart to the screen.',
3270
+ * }]
3271
+ * });
3272
+ * ```
3273
+ * {@link https://balkan.app/OrgChartJS/Docs/AI | See doc...}
3274
+ */
3275
+ aiChatTools?: Array<OrgChart.aiChatTool>,
3201
3276
  /**
3202
3277
  * With the toolbar enabled allows you to change the layout, zoom in/out, expand all nodes, etc.
3203
3278
  * ```typescript