@balkangraph/orgchart.js 8.2.76 → 8.2.79
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 +122 -111
- package/orgchart.js +1 -1
- 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.
|
|
@@ -639,6 +647,7 @@ declare class OrgChart extends OrgChartBase {
|
|
|
639
647
|
firefox?: { smooth?: number; speed?: number; },
|
|
640
648
|
opera?: { smooth?: number; speed?: number; }
|
|
641
649
|
};
|
|
650
|
+
|
|
642
651
|
|
|
643
652
|
static events: {
|
|
644
653
|
on(type: "node-created" | "layout", listener: (args: any, args1: any, args2: any) => void): void
|
|
@@ -792,6 +801,118 @@ declare namespace OrgChart {
|
|
|
792
801
|
|
|
793
802
|
var template: object;
|
|
794
803
|
|
|
804
|
+
interface node {
|
|
805
|
+
/**
|
|
806
|
+
* the same id you provided in the source node
|
|
807
|
+
*/
|
|
808
|
+
id?: string | number,
|
|
809
|
+
/**
|
|
810
|
+
* 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.
|
|
811
|
+
*/
|
|
812
|
+
ppid?: string | number,
|
|
813
|
+
/**
|
|
814
|
+
* 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
|
|
815
|
+
*/
|
|
816
|
+
parent?: node,
|
|
817
|
+
/**
|
|
818
|
+
* 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.
|
|
819
|
+
*/
|
|
820
|
+
stpid?: string | number,
|
|
821
|
+
/**
|
|
822
|
+
* - 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
|
|
823
|
+
*/
|
|
824
|
+
stParent?: node,
|
|
825
|
+
isPartner?: boolean,
|
|
826
|
+
partnerSeparation?: number,
|
|
827
|
+
/**
|
|
828
|
+
* array of ids, always initialized
|
|
829
|
+
*/
|
|
830
|
+
childrenIds?: Array<string | number>,
|
|
831
|
+
/**
|
|
832
|
+
* array of children nodes, initialized on demand if all children are collpased it will be empty array
|
|
833
|
+
*/
|
|
834
|
+
children?: Array<node>,
|
|
835
|
+
/**
|
|
836
|
+
* array of sub tree children root node ids, always initialized
|
|
837
|
+
*/
|
|
838
|
+
stChildrenIds?: Array<string | number>,
|
|
839
|
+
/**
|
|
840
|
+
* array of sub tree children root nodes, initialized on demand if the node is minimized it will be empty array
|
|
841
|
+
*/
|
|
842
|
+
stChildren?: Array<node>,
|
|
843
|
+
/**
|
|
844
|
+
* array of string values, the same array you provided in the source node
|
|
845
|
+
*/
|
|
846
|
+
tags?: Array<string>,
|
|
847
|
+
/**
|
|
848
|
+
* template name, you can specify multiple templates with tags in one chart
|
|
849
|
+
*/
|
|
850
|
+
templateName?: string,
|
|
851
|
+
/**
|
|
852
|
+
* a reference to the left node neighbor, the default value is undefined
|
|
853
|
+
*/
|
|
854
|
+
leftNeighbor?: node | undefined,
|
|
855
|
+
/**
|
|
856
|
+
* a reference to the right node neighbor, the default value is undefined
|
|
857
|
+
*/
|
|
858
|
+
rightNeighbor?: node | undefined,
|
|
859
|
+
/**
|
|
860
|
+
* x position, default value undefined
|
|
861
|
+
*/
|
|
862
|
+
x?: number | undefined,
|
|
863
|
+
/**
|
|
864
|
+
* y position, default value undefined
|
|
865
|
+
*/
|
|
866
|
+
y?: number | undefined,
|
|
867
|
+
/**
|
|
868
|
+
* width of the node, default value undefined
|
|
869
|
+
*/
|
|
870
|
+
w?: number | undefined,
|
|
871
|
+
/**
|
|
872
|
+
* height of the node, default value undefined
|
|
873
|
+
*/
|
|
874
|
+
h?: number | undefined,
|
|
875
|
+
/**
|
|
876
|
+
* if the node is assistant is true if not false if the node is not initialized is undefined
|
|
877
|
+
*/
|
|
878
|
+
isAssistant?: boolean | undefined,
|
|
879
|
+
/**
|
|
880
|
+
* sub tree container nodes array, property only for the root node, default value undefined
|
|
881
|
+
*/
|
|
882
|
+
stContainerNodes?: Array<node> | undefined,
|
|
883
|
+
/**
|
|
884
|
+
* it is set only if you define order option, default value undefined
|
|
885
|
+
*/
|
|
886
|
+
order?: number | undefined,
|
|
887
|
+
/**
|
|
888
|
+
* true if the node is collpased, false if it is not and undefined if not initalized
|
|
889
|
+
*/
|
|
890
|
+
collapsed?: boolean | undefined,
|
|
891
|
+
/**
|
|
892
|
+
* a level of the node starting from zero
|
|
893
|
+
*/
|
|
894
|
+
level?: number,
|
|
895
|
+
/**
|
|
896
|
+
* true if the node is minimized, default value undefined
|
|
897
|
+
*/
|
|
898
|
+
min?: boolean | undefined,
|
|
899
|
+
/**
|
|
900
|
+
* sub levels, default value undefined
|
|
901
|
+
*/
|
|
902
|
+
subLevels?: number | undefined,
|
|
903
|
+
/**
|
|
904
|
+
* set only if the node contains sub trees and padding is defined in the template, default value undefined
|
|
905
|
+
*/
|
|
906
|
+
padding?: number | undefined,
|
|
907
|
+
/**
|
|
908
|
+
* layout configuration name, default value undefined
|
|
909
|
+
*/
|
|
910
|
+
lcn?: string | undefined,
|
|
911
|
+
/**
|
|
912
|
+
* for assistant nodes and mixed layout we create dynamic nodes called splits, default value undefined
|
|
913
|
+
*/
|
|
914
|
+
isSplit?: boolean | undefined
|
|
915
|
+
}
|
|
795
916
|
|
|
796
917
|
|
|
797
918
|
interface template
|
|
@@ -2033,120 +2154,10 @@ declare class OrgChartBase {
|
|
|
2033
2154
|
declare namespace OrgChart {
|
|
2034
2155
|
|
|
2035
2156
|
interface node {
|
|
2036
|
-
/**
|
|
2037
|
-
* the same id you provided in the source node
|
|
2038
|
-
*/
|
|
2039
|
-
id?: string | number,
|
|
2040
2157
|
/**
|
|
2041
2158
|
* 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
|
|
2042
2159
|
*/
|
|
2043
2160
|
pid?: string | number,
|
|
2044
|
-
/**
|
|
2045
|
-
* 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.
|
|
2046
|
-
*/
|
|
2047
|
-
ppid?: string | number,
|
|
2048
|
-
/**
|
|
2049
|
-
* 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
|
|
2050
|
-
*/
|
|
2051
|
-
parent?: node,
|
|
2052
|
-
/**
|
|
2053
|
-
* 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.
|
|
2054
|
-
*/
|
|
2055
|
-
stpid?: string | number,
|
|
2056
|
-
/**
|
|
2057
|
-
* - 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
|
|
2058
|
-
*/
|
|
2059
|
-
stParent?: node,
|
|
2060
|
-
isPartner?: boolean,
|
|
2061
|
-
partnerSeparation?: number,
|
|
2062
|
-
/**
|
|
2063
|
-
* array of ids, always initialized
|
|
2064
|
-
*/
|
|
2065
|
-
childrenIds?: Array<string | number>,
|
|
2066
|
-
/**
|
|
2067
|
-
* array of children nodes, initialized on demand if all children are collpased it will be empty array
|
|
2068
|
-
*/
|
|
2069
|
-
children?: Array<node>,
|
|
2070
|
-
/**
|
|
2071
|
-
* array of sub tree children root node ids, always initialized
|
|
2072
|
-
*/
|
|
2073
|
-
stChildrenIds?: Array<string | number>,
|
|
2074
|
-
/**
|
|
2075
|
-
* array of sub tree children root nodes, initialized on demand if the node is minimized it will be empty array
|
|
2076
|
-
*/
|
|
2077
|
-
stChildren?: Array<node>,
|
|
2078
|
-
/**
|
|
2079
|
-
* array of string values, the same array you provided in the source node
|
|
2080
|
-
*/
|
|
2081
|
-
tags?: Array<string>,
|
|
2082
|
-
/**
|
|
2083
|
-
* template name, you can specify multiple templates with tags in one chart
|
|
2084
|
-
*/
|
|
2085
|
-
templateName?: string,
|
|
2086
|
-
/**
|
|
2087
|
-
* a reference to the left node neighbor, the default value is undefined
|
|
2088
|
-
*/
|
|
2089
|
-
leftNeighbor?: node | undefined,
|
|
2090
|
-
/**
|
|
2091
|
-
* a reference to the right node neighbor, the default value is undefined
|
|
2092
|
-
*/
|
|
2093
|
-
rightNeighbor?: node | undefined,
|
|
2094
|
-
/**
|
|
2095
|
-
* x position, default value undefined
|
|
2096
|
-
*/
|
|
2097
|
-
x?: number | undefined,
|
|
2098
|
-
/**
|
|
2099
|
-
* y position, default value undefined
|
|
2100
|
-
*/
|
|
2101
|
-
y?: number | undefined,
|
|
2102
|
-
/**
|
|
2103
|
-
* width of the node, default value undefined
|
|
2104
|
-
*/
|
|
2105
|
-
w?: number | undefined,
|
|
2106
|
-
/**
|
|
2107
|
-
* height of the node, default value undefined
|
|
2108
|
-
*/
|
|
2109
|
-
h?: number | undefined,
|
|
2110
|
-
/**
|
|
2111
|
-
* if the node is assistant is true if not false if the node is not initialized is undefined
|
|
2112
|
-
*/
|
|
2113
|
-
isAssistant?: boolean | undefined,
|
|
2114
|
-
/**
|
|
2115
|
-
* sub tree container nodes array, property only for the root node, default value undefined
|
|
2116
|
-
*/
|
|
2117
|
-
stContainerNodes?: Array<node> | undefined,
|
|
2118
|
-
/**
|
|
2119
|
-
* it is set only if you define order option, default value undefined
|
|
2120
|
-
*/
|
|
2121
|
-
order?: number | undefined,
|
|
2122
|
-
/**
|
|
2123
|
-
* true if the node is collpased, false if it is not and undefined if not initalized
|
|
2124
|
-
*/
|
|
2125
|
-
collapsed?: boolean | undefined,
|
|
2126
|
-
/**
|
|
2127
|
-
* a level of the node starting from zero
|
|
2128
|
-
*/
|
|
2129
|
-
level?: number,
|
|
2130
|
-
/**
|
|
2131
|
-
* true if the node is minimized, default value undefined
|
|
2132
|
-
*/
|
|
2133
|
-
min?: boolean | undefined,
|
|
2134
|
-
/**
|
|
2135
|
-
* sub levels, default value undefined
|
|
2136
|
-
*/
|
|
2137
|
-
subLevels?: number | undefined,
|
|
2138
|
-
/**
|
|
2139
|
-
* set only if the node contains sub trees and padding is defined in the template, default value undefined
|
|
2140
|
-
*/
|
|
2141
|
-
padding?: number | undefined,
|
|
2142
|
-
/**
|
|
2143
|
-
* layout configuration name, default value undefined
|
|
2144
|
-
*/
|
|
2145
|
-
lcn?: string | undefined,
|
|
2146
|
-
/**
|
|
2147
|
-
* for assistant nodes and mixed layout we create dynamic nodes called splits, default value undefined
|
|
2148
|
-
*/
|
|
2149
|
-
isSplit?: boolean | undefined
|
|
2150
2161
|
}
|
|
2151
2162
|
/**
|
|
2152
2163
|
* deprecated, use OrgChart.align.center isntead
|