@balkangraph/orgchart.js 8.2.78 → 8.3.1
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 +146 -112
- package/orgchart.js +1 -1
- package/package.json +1 -1
package/orgchart.d.ts
CHANGED
|
@@ -647,8 +647,14 @@ declare class OrgChart extends OrgChartBase {
|
|
|
647
647
|
firefox?: { smooth?: number; speed?: number; },
|
|
648
648
|
opera?: { smooth?: number; speed?: number; }
|
|
649
649
|
};
|
|
650
|
+
|
|
650
651
|
|
|
651
652
|
static events: {
|
|
653
|
+
/**
|
|
654
|
+
* node-created and layout event listeners are obsolete use node-initialized or node-layout instead
|
|
655
|
+
* @param type
|
|
656
|
+
* @param listener
|
|
657
|
+
*/
|
|
652
658
|
on(type: "node-created" | "layout", listener: (args: any, args1: any, args2: any) => void): void
|
|
653
659
|
};
|
|
654
660
|
static state: { clear(stateName: string): void };
|
|
@@ -800,6 +806,118 @@ declare namespace OrgChart {
|
|
|
800
806
|
|
|
801
807
|
var template: object;
|
|
802
808
|
|
|
809
|
+
interface node {
|
|
810
|
+
/**
|
|
811
|
+
* the same id you provided in the source node
|
|
812
|
+
*/
|
|
813
|
+
id?: string | number,
|
|
814
|
+
/**
|
|
815
|
+
* 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.
|
|
816
|
+
*/
|
|
817
|
+
ppid?: string | number,
|
|
818
|
+
/**
|
|
819
|
+
* 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
|
|
820
|
+
*/
|
|
821
|
+
parent?: node,
|
|
822
|
+
/**
|
|
823
|
+
* 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.
|
|
824
|
+
*/
|
|
825
|
+
stpid?: string | number,
|
|
826
|
+
/**
|
|
827
|
+
* - 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
|
|
828
|
+
*/
|
|
829
|
+
stParent?: node,
|
|
830
|
+
isPartner?: boolean,
|
|
831
|
+
partnerSeparation?: number,
|
|
832
|
+
/**
|
|
833
|
+
* array of ids, always initialized
|
|
834
|
+
*/
|
|
835
|
+
childrenIds?: Array<string | number>,
|
|
836
|
+
/**
|
|
837
|
+
* array of children nodes, initialized on demand if all children are collpased it will be empty array
|
|
838
|
+
*/
|
|
839
|
+
children?: Array<node>,
|
|
840
|
+
/**
|
|
841
|
+
* array of sub tree children root node ids, always initialized
|
|
842
|
+
*/
|
|
843
|
+
stChildrenIds?: Array<string | number>,
|
|
844
|
+
/**
|
|
845
|
+
* array of sub tree children root nodes, initialized on demand if the node is minimized it will be empty array
|
|
846
|
+
*/
|
|
847
|
+
stChildren?: Array<node>,
|
|
848
|
+
/**
|
|
849
|
+
* array of string values, the same array you provided in the source node
|
|
850
|
+
*/
|
|
851
|
+
tags?: Array<string>,
|
|
852
|
+
/**
|
|
853
|
+
* template name, you can specify multiple templates with tags in one chart
|
|
854
|
+
*/
|
|
855
|
+
templateName?: string,
|
|
856
|
+
/**
|
|
857
|
+
* a reference to the left node neighbor, the default value is undefined
|
|
858
|
+
*/
|
|
859
|
+
leftNeighbor?: node | undefined,
|
|
860
|
+
/**
|
|
861
|
+
* a reference to the right node neighbor, the default value is undefined
|
|
862
|
+
*/
|
|
863
|
+
rightNeighbor?: node | undefined,
|
|
864
|
+
/**
|
|
865
|
+
* x position, default value undefined
|
|
866
|
+
*/
|
|
867
|
+
x?: number | undefined,
|
|
868
|
+
/**
|
|
869
|
+
* y position, default value undefined
|
|
870
|
+
*/
|
|
871
|
+
y?: number | undefined,
|
|
872
|
+
/**
|
|
873
|
+
* width of the node, default value undefined
|
|
874
|
+
*/
|
|
875
|
+
w?: number | undefined,
|
|
876
|
+
/**
|
|
877
|
+
* height of the node, default value undefined
|
|
878
|
+
*/
|
|
879
|
+
h?: number | undefined,
|
|
880
|
+
/**
|
|
881
|
+
* if the node is assistant is true if not false if the node is not initialized is undefined
|
|
882
|
+
*/
|
|
883
|
+
isAssistant?: boolean | undefined,
|
|
884
|
+
/**
|
|
885
|
+
* sub tree container nodes array, property only for the root node, default value undefined
|
|
886
|
+
*/
|
|
887
|
+
stContainerNodes?: Array<node> | undefined,
|
|
888
|
+
/**
|
|
889
|
+
* it is set only if you define order option, default value undefined
|
|
890
|
+
*/
|
|
891
|
+
order?: number | undefined,
|
|
892
|
+
/**
|
|
893
|
+
* true if the node is collpased, false if it is not and undefined if not initalized
|
|
894
|
+
*/
|
|
895
|
+
collapsed?: boolean | undefined,
|
|
896
|
+
/**
|
|
897
|
+
* a level of the node starting from zero
|
|
898
|
+
*/
|
|
899
|
+
level?: number,
|
|
900
|
+
/**
|
|
901
|
+
* true if the node is minimized, default value undefined
|
|
902
|
+
*/
|
|
903
|
+
min?: boolean | undefined,
|
|
904
|
+
/**
|
|
905
|
+
* sub levels, default value undefined
|
|
906
|
+
*/
|
|
907
|
+
subLevels?: number | undefined,
|
|
908
|
+
/**
|
|
909
|
+
* set only if the node contains sub trees and padding is defined in the template, default value undefined
|
|
910
|
+
*/
|
|
911
|
+
padding?: number | undefined,
|
|
912
|
+
/**
|
|
913
|
+
* layout configuration name, default value undefined
|
|
914
|
+
*/
|
|
915
|
+
lcn?: string | undefined,
|
|
916
|
+
/**
|
|
917
|
+
* for assistant nodes and mixed layout we create dynamic nodes called splits, default value undefined
|
|
918
|
+
*/
|
|
919
|
+
isSplit?: boolean | undefined
|
|
920
|
+
}
|
|
803
921
|
|
|
804
922
|
|
|
805
923
|
interface template
|
|
@@ -888,6 +1006,14 @@ declare namespace OrgChart {
|
|
|
888
1006
|
createItem(img: string, id: string | number, first: string, second: string): string;
|
|
889
1007
|
}
|
|
890
1008
|
|
|
1009
|
+
|
|
1010
|
+
interface filterUI {
|
|
1011
|
+
init(instance: OrgChart): void;
|
|
1012
|
+
update(): void;
|
|
1013
|
+
shouldFilter(data: object): boolean;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
|
|
891
1017
|
interface menuUI {
|
|
892
1018
|
init(obj: OrgChart, menu: { [key: string]: menu }): void;
|
|
893
1019
|
/**
|
|
@@ -1685,7 +1811,21 @@ declare namespace OrgChart {
|
|
|
1685
1811
|
* });
|
|
1686
1812
|
* ```
|
|
1687
1813
|
*/
|
|
1688
|
-
orderBy?: string
|
|
1814
|
+
orderBy?: string | Array<OrgChart.orderBy>,
|
|
1815
|
+
/**
|
|
1816
|
+
* Filter the OrgChart by the specified fields.
|
|
1817
|
+
* ```typescript
|
|
1818
|
+
* var chart = new OrgChart('#tree', {
|
|
1819
|
+
* filterBy: 'all'
|
|
1820
|
+
* });
|
|
1821
|
+
* ```
|
|
1822
|
+
* ```typescript
|
|
1823
|
+
* var chart = new OrgChart('#tree', {
|
|
1824
|
+
* filterBy: ['country', 'title']
|
|
1825
|
+
* });
|
|
1826
|
+
* ```
|
|
1827
|
+
*/
|
|
1828
|
+
filterBy?: string | Array<string> | boolean,
|
|
1689
1829
|
/**
|
|
1690
1830
|
* @ignore
|
|
1691
1831
|
*/
|
|
@@ -1694,6 +1834,10 @@ declare namespace OrgChart {
|
|
|
1694
1834
|
* @ignore
|
|
1695
1835
|
*/
|
|
1696
1836
|
searchUI?: OrgChart.searchUI,
|
|
1837
|
+
/**
|
|
1838
|
+
* @ignore
|
|
1839
|
+
*/
|
|
1840
|
+
filterUI?: OrgChart.filterUI,
|
|
1697
1841
|
/**
|
|
1698
1842
|
* @ignore
|
|
1699
1843
|
*/
|
|
@@ -1931,7 +2075,7 @@ declare class OrgChartBase {
|
|
|
1931
2075
|
* @param type A case-sensitive string representing the event type to listen for.
|
|
1932
2076
|
* @param listener The object that receives a notification when an event of the specified type occurs. This must be a JavaScript function.
|
|
1933
2077
|
*/
|
|
1934
|
-
on(type: "init" | "field" | "update" | "add" | "remove" | "renderbuttons" | "label" | "render-link" | "drag" | "drop" | "redraw" | "expcollclick" | "exportstart" | "exportend" | "click" | "dbclick" | "slink-click" | "clink-click" | "up-click" | "searchclick" | "import" | "adding" | "added" | "updated" | "key-down" | "visibility-change" | "renderdefs" | "render" | "prerender" | "screen-reader-text" | "removed" | "ready" | "ripple", listener: (sender: OrgChart, args?: any, args1?: any, args2?: any) => void | boolean): OrgChart;
|
|
2078
|
+
on(type: "init" | "field" | "update" | "add" | "remove" | "renderbuttons" | "label" | "render-link" | "drag" | "drop" | "redraw" | "expcollclick" | "exportstart" | "exportend" | "click" | "dbclick" | "slink-click" | "clink-click" | "up-click" | "searchclick" | "import" | "adding" | "added" | "updated" | "key-down" | "visibility-change" | "renderdefs" | "render" | "prerender" | "screen-reader-text" | "removed" | "ready" | "ripple" | "node-initialized" | "node-layout", listener: (sender: OrgChart, args?: any, args1?: any, args2?: any) => void | boolean): OrgChart;
|
|
1935
2079
|
|
|
1936
2080
|
/**
|
|
1937
2081
|
* Occurs when the node data has been updated by updateNode method.
|
|
@@ -2041,120 +2185,10 @@ declare class OrgChartBase {
|
|
|
2041
2185
|
declare namespace OrgChart {
|
|
2042
2186
|
|
|
2043
2187
|
interface node {
|
|
2044
|
-
/**
|
|
2045
|
-
* the same id you provided in the source node
|
|
2046
|
-
*/
|
|
2047
|
-
id?: string | number,
|
|
2048
2188
|
/**
|
|
2049
2189
|
* 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
2190
|
*/
|
|
2051
2191
|
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
2192
|
}
|
|
2159
2193
|
/**
|
|
2160
2194
|
* deprecated, use OrgChart.align.center isntead
|