@balkangraph/orgchart.js 8.2.75 → 8.2.78

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.
Files changed (3) hide show
  1. package/orgchart.d.ts +127 -117
  2. package/orgchart.js +1 -1
  3. package/package.json +1 -1
package/orgchart.d.ts CHANGED
@@ -343,6 +343,7 @@ declare class OrgChart extends OrgChartBase {
343
343
  * chart.onField((args) => {
344
344
  * //return false; to cancel
345
345
  * });
346
+ * chart.load(nodes);
346
347
  * ```
347
348
  * @category Event Listeners
348
349
  * @param listener
@@ -376,6 +377,7 @@ declare class OrgChart extends OrgChartBase {
376
377
  * var chart = new OrgChart('#tree', {});
377
378
  * chart.onInit(() => {
378
379
  * });
380
+ * chart.load(nodes);
379
381
  * ```
380
382
  * @category Event Listeners
381
383
  * @param listener
@@ -390,6 +392,7 @@ declare class OrgChart extends OrgChartBase {
390
392
  * var chart = new OrgChart('#tree', {});
391
393
  * chart.onRedraw(() => {
392
394
  * });
395
+ * chart.load(nodes);
393
396
  * ```
394
397
  * @category Event Listeners
395
398
  * @param listener
@@ -403,6 +406,7 @@ declare class OrgChart extends OrgChartBase {
403
406
  * chart.onExpandCollpaseButtonClick(() => {
404
407
  * //return false; to cancel the operation
405
408
  * });
409
+ * chart.load(nodes);
406
410
  * ```
407
411
  * @category Event Listeners
408
412
  * @param listener
@@ -429,6 +433,7 @@ declare class OrgChart extends OrgChartBase {
429
433
  * args.styles += '<link href="https://fonts.googleapis.com/css?family=Gochi+Hand" rel="stylesheet">';
430
434
  * //return false; to cancel the operation
431
435
  * });
436
+ * chart.load(nodes);
432
437
  * ```
433
438
  * @category Event Listeners
434
439
  * @param listener
@@ -485,6 +490,7 @@ declare class OrgChart extends OrgChartBase {
485
490
  * chart.onExportEnd(() => {
486
491
  * //return false; to cancel the operation for example id you prefer the exported document to not download
487
492
  * });
493
+ * chart.load(nodes);
488
494
  * ```
489
495
  * @category Event Listeners
490
496
  * @param listener
@@ -544,6 +550,7 @@ declare class OrgChart extends OrgChartBase {
544
550
  * chart.onNodeClick(() => {
545
551
  * //return false; to cancel the operation
546
552
  * });
553
+ * chart.load(nodes);
547
554
  * ```
548
555
  * @category Event Listeners
549
556
  * @param listener
@@ -565,6 +572,7 @@ declare class OrgChart extends OrgChartBase {
565
572
  * chart.onNodeDoubleClick(() => {
566
573
  * //return false; to cancel the operation
567
574
  * });
575
+ * chart.load(nodes);
568
576
  * ```
569
577
  * @category Event Listeners
570
578
  * @param listener
@@ -607,7 +615,7 @@ declare class OrgChart extends OrgChartBase {
607
615
  */
608
616
  static isNEU(val: any): boolean;
609
617
  static gradientCircleForDefs(id: string | number, colors: Array<string> | string, r: number, strokeWidth: number): string;
610
- static convertCsvToNodes(text: string) : Array<node>;
618
+ static convertCsvToNodes(text: string) : Array<OrgChart.node>;
611
619
 
612
620
  /**
613
621
  * Shows/hides lloading image. Usefull when export large data to pdf. You can override and show your own loading image.
@@ -1088,122 +1096,7 @@ declare namespace OrgChart {
1088
1096
  none
1089
1097
  }
1090
1098
 
1091
- interface node {
1092
- /**
1093
- * the same id you provided in the source node
1094
- */
1095
- id?: string | number,
1096
- /**
1097
- * same pid you provided in the source node, the default value is null if not provided or if node with the same id does not exist
1098
- */
1099
- pid?: string | number,
1100
- /**
1101
- * partner parent id, it is the partner parent node id of the partner node, it is the same ppid you provided in the source node, the default value is undefined.
1102
- */
1103
- ppid?: string | number,
1104
- /**
1105
- * a reference to the parent node, default value is null, if the nodes is collapse this proprty is not initalized and can be null even if pid is not null
1106
- */
1107
- parent?: node,
1108
- /**
1109
- * ub tree parent id, it is the parent node id of the root node of the sub tree, it is the same stpid you provided in the source node, the default value is null if not provided or if node with the same id does not exist.
1110
- */
1111
- stpid?: string | number,
1112
- /**
1113
- * - a reference to the parent node of a sub tree, default value is null, if the parent node is minimized this proprty is not initalized and can be null even if we have stpid
1114
- */
1115
- stParent?: node,
1116
- isPartner?: boolean,
1117
- partnerSeparation?: number,
1118
- /**
1119
- * array of ids, always initialized
1120
- */
1121
- childrenIds?: Array<string | number>,
1122
- /**
1123
- * array of children nodes, initialized on demand if all children are collpased it will be empty array
1124
- */
1125
- children?: Array<node>,
1126
- /**
1127
- * array of sub tree children root node ids, always initialized
1128
- */
1129
- stChildrenIds?: Array<string | number>,
1130
- /**
1131
- * array of sub tree children root nodes, initialized on demand if the node is minimized it will be empty array
1132
- */
1133
- stChildren?: Array<node>,
1134
- /**
1135
- * array of string values, the same array you provided in the source node
1136
- */
1137
- tags?: Array<string>,
1138
- /**
1139
- * template name, you can specify multiple templates with tags in one chart
1140
- */
1141
- templateName?: string,
1142
- /**
1143
- * a reference to the left node neighbor, the default value is undefined
1144
- */
1145
- leftNeighbor?: node | undefined,
1146
- /**
1147
- * a reference to the right node neighbor, the default value is undefined
1148
- */
1149
- rightNeighbor?: node | undefined,
1150
- /**
1151
- * x position, default value undefined
1152
- */
1153
- x?: number | undefined,
1154
- /**
1155
- * y position, default value undefined
1156
- */
1157
- y?: number | undefined,
1158
- /**
1159
- * width of the node, default value undefined
1160
- */
1161
- w?: number | undefined,
1162
- /**
1163
- * height of the node, default value undefined
1164
- */
1165
- h?: number | undefined,
1166
- /**
1167
- * if the node is assistant is true if not false if the node is not initialized is undefined
1168
- */
1169
- isAssistant?: boolean | undefined,
1170
- /**
1171
- * sub tree container nodes array, property only for the root node, default value undefined
1172
- */
1173
- stContainerNodes?: Array<node> | undefined,
1174
- /**
1175
- * it is set only if you define order option, default value undefined
1176
- */
1177
- order?: number | undefined,
1178
- /**
1179
- * true if the node is collpased, false if it is not and undefined if not initalized
1180
- */
1181
- collapsed?: boolean | undefined,
1182
- /**
1183
- * a level of the node starting from zero
1184
- */
1185
- level?: number,
1186
- /**
1187
- * true if the node is minimized, default value undefined
1188
- */
1189
- min?: boolean | undefined,
1190
- /**
1191
- * sub levels, default value undefined
1192
- */
1193
- subLevels?: number | undefined,
1194
- /**
1195
- * set only if the node contains sub trees and padding is defined in the template, default value undefined
1196
- */
1197
- padding?: number | undefined,
1198
- /**
1199
- * layout configuration name, default value undefined
1200
- */
1201
- lcn?: string | undefined,
1202
- /**
1203
- * for assistant nodes and mixed layout we create dynamic nodes called splits, default value undefined
1204
- */
1205
- isSplit?: boolean | undefined
1206
- }
1099
+
1207
1100
 
1208
1101
  interface options {
1209
1102
  /**
@@ -2146,6 +2039,123 @@ declare class OrgChartBase {
2146
2039
  }
2147
2040
 
2148
2041
  declare namespace OrgChart {
2042
+
2043
+ interface node {
2044
+ /**
2045
+ * the same id you provided in the source node
2046
+ */
2047
+ id?: string | number,
2048
+ /**
2049
+ * same pid you provided in the source node, the default value is null if not provided or if node with the same id does not exist
2050
+ */
2051
+ pid?: string | number,
2052
+ /**
2053
+ * partner parent id, it is the partner parent node id of the partner node, it is the same ppid you provided in the source node, the default value is undefined.
2054
+ */
2055
+ ppid?: string | number,
2056
+ /**
2057
+ * a reference to the parent node, default value is null, if the nodes is collapse this proprty is not initalized and can be null even if pid is not null
2058
+ */
2059
+ parent?: node,
2060
+ /**
2061
+ * ub tree parent id, it is the parent node id of the root node of the sub tree, it is the same stpid you provided in the source node, the default value is null if not provided or if node with the same id does not exist.
2062
+ */
2063
+ stpid?: string | number,
2064
+ /**
2065
+ * - a reference to the parent node of a sub tree, default value is null, if the parent node is minimized this proprty is not initalized and can be null even if we have stpid
2066
+ */
2067
+ stParent?: node,
2068
+ isPartner?: boolean,
2069
+ partnerSeparation?: number,
2070
+ /**
2071
+ * array of ids, always initialized
2072
+ */
2073
+ childrenIds?: Array<string | number>,
2074
+ /**
2075
+ * array of children nodes, initialized on demand if all children are collpased it will be empty array
2076
+ */
2077
+ children?: Array<node>,
2078
+ /**
2079
+ * array of sub tree children root node ids, always initialized
2080
+ */
2081
+ stChildrenIds?: Array<string | number>,
2082
+ /**
2083
+ * array of sub tree children root nodes, initialized on demand if the node is minimized it will be empty array
2084
+ */
2085
+ stChildren?: Array<node>,
2086
+ /**
2087
+ * array of string values, the same array you provided in the source node
2088
+ */
2089
+ tags?: Array<string>,
2090
+ /**
2091
+ * template name, you can specify multiple templates with tags in one chart
2092
+ */
2093
+ templateName?: string,
2094
+ /**
2095
+ * a reference to the left node neighbor, the default value is undefined
2096
+ */
2097
+ leftNeighbor?: node | undefined,
2098
+ /**
2099
+ * a reference to the right node neighbor, the default value is undefined
2100
+ */
2101
+ rightNeighbor?: node | undefined,
2102
+ /**
2103
+ * x position, default value undefined
2104
+ */
2105
+ x?: number | undefined,
2106
+ /**
2107
+ * y position, default value undefined
2108
+ */
2109
+ y?: number | undefined,
2110
+ /**
2111
+ * width of the node, default value undefined
2112
+ */
2113
+ w?: number | undefined,
2114
+ /**
2115
+ * height of the node, default value undefined
2116
+ */
2117
+ h?: number | undefined,
2118
+ /**
2119
+ * if the node is assistant is true if not false if the node is not initialized is undefined
2120
+ */
2121
+ isAssistant?: boolean | undefined,
2122
+ /**
2123
+ * sub tree container nodes array, property only for the root node, default value undefined
2124
+ */
2125
+ stContainerNodes?: Array<node> | undefined,
2126
+ /**
2127
+ * it is set only if you define order option, default value undefined
2128
+ */
2129
+ order?: number | undefined,
2130
+ /**
2131
+ * true if the node is collpased, false if it is not and undefined if not initalized
2132
+ */
2133
+ collapsed?: boolean | undefined,
2134
+ /**
2135
+ * a level of the node starting from zero
2136
+ */
2137
+ level?: number,
2138
+ /**
2139
+ * true if the node is minimized, default value undefined
2140
+ */
2141
+ min?: boolean | undefined,
2142
+ /**
2143
+ * sub levels, default value undefined
2144
+ */
2145
+ subLevels?: number | undefined,
2146
+ /**
2147
+ * set only if the node contains sub trees and padding is defined in the template, default value undefined
2148
+ */
2149
+ padding?: number | undefined,
2150
+ /**
2151
+ * layout configuration name, default value undefined
2152
+ */
2153
+ lcn?: string | undefined,
2154
+ /**
2155
+ * for assistant nodes and mixed layout we create dynamic nodes called splits, default value undefined
2156
+ */
2157
+ isSplit?: boolean | undefined
2158
+ }
2149
2159
  /**
2150
2160
  * deprecated, use OrgChart.align.center isntead
2151
2161
  * @ignore