@progress/kendo-react-orgchart 7.2.4-develop.2 → 7.2.4-develop.4
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.js +8 -0
- package/OrgChart.mjs +83 -0
- package/client/ClientOrgChart.js +8 -0
- package/client/ClientOrgChart.mjs +236 -0
- package/client/ExpandButton.js +8 -0
- package/client/ExpandButton.mjs +36 -0
- package/client/OrgChartCard.js +8 -0
- package/client/OrgChartCard.mjs +59 -0
- package/client/OrgChartCardBody.js +8 -0
- package/client/OrgChartCardBody.mjs +18 -0
- package/client/OrgChartGroupContainer.js +8 -0
- package/client/OrgChartGroupContainer.mjs +58 -0
- package/dist/cdn/js/kendo-react-orgchart.js +8 -18
- package/index.d.mts +520 -5
- package/index.d.ts +520 -12
- package/index.js +8 -18
- package/index.mjs +17 -1146
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +4 -4
- package/processOrgChartItems.js +8 -0
- package/processOrgChartItems.mjs +84 -0
- package/server/ServerGroupedOrgChart.js +8 -0
- package/server/ServerGroupedOrgChart.mjs +260 -0
- package/server/ServerOrgChart.js +8 -0
- package/server/ServerOrgChart.mjs +210 -0
- package/server/ServerOrgChartGroup.js +8 -0
- package/server/ServerOrgChartGroup.mjs +114 -0
- package/server/ServerOrgChartNode.js +8 -0
- package/server/ServerOrgChartNode.mjs +95 -0
- package/theming/theme-service.js +21 -0
- package/theming/theme-service.mjs +60 -0
- package/utils/consts.js +8 -0
- package/utils/consts.mjs +24 -0
- package/OrgChart.d.ts +0 -10
- package/OrgChartOperationDescriptors.d.ts +0 -80
- package/client/ClientOrgChart.d.ts +0 -98
- package/client/ExpandButton.d.ts +0 -17
- package/client/OrgChartCard.d.ts +0 -23
- package/client/OrgChartCardBody.d.ts +0 -16
- package/client/OrgChartGroupContainer.d.ts +0 -23
- package/interfaces/ChildGroup.d.ts +0 -20
- package/interfaces/OrgChartActionEvent.d.ts +0 -25
- package/interfaces/OrgChartExpandChangeEvent.d.ts +0 -25
- package/interfaces/SeverOrgChartProps.d.ts +0 -109
- package/package-metadata.d.ts +0 -9
- package/processOrgChartItems.d.ts +0 -55
- package/server/ServerGroupedOrgChart.d.ts +0 -12
- package/server/ServerOrgChart.d.ts +0 -12
- package/server/ServerOrgChartGroup.d.ts +0 -100
- package/server/ServerOrgChartNode.d.ts +0 -79
- package/theming/theme-service.d.ts +0 -9
- package/utils/consts.d.ts +0 -76
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as e from "react";
|
|
10
|
+
import { classNames as u, kendoThemeMaps as y } from "@progress/kendo-react-common";
|
|
11
|
+
import { ExpandButton as A } from "../client/ExpandButton.mjs";
|
|
12
|
+
import { OrgChartGroupContainer as C } from "../client/OrgChartGroupContainer.mjs";
|
|
13
|
+
import { GROUP_TITLE_HEIGHT as H, GROUP_SUBTITLE_HEIGHT as L } from "../utils/consts.mjs";
|
|
14
|
+
const f = "k-orgchart-node-group", E = "k-orgchart-node-group-title", p = "k-orgchart-node-group-subtitle", x = (n) => {
|
|
15
|
+
const k = {
|
|
16
|
+
orientation: "horizontal"
|
|
17
|
+
}, {
|
|
18
|
+
id: T,
|
|
19
|
+
title: i,
|
|
20
|
+
subtitle: l,
|
|
21
|
+
line: N,
|
|
22
|
+
plus: s,
|
|
23
|
+
focus: U,
|
|
24
|
+
level: t,
|
|
25
|
+
verticalLine: R,
|
|
26
|
+
childLineWidth: c,
|
|
27
|
+
orientation: o,
|
|
28
|
+
expanded: r,
|
|
29
|
+
nodes: a,
|
|
30
|
+
groupTitleHeight: v,
|
|
31
|
+
groupSubtitleHeight: S,
|
|
32
|
+
groupTitleRender: _,
|
|
33
|
+
groupSubtitleRender: G,
|
|
34
|
+
...O
|
|
35
|
+
} = { ...k, ...n }, m = _, h = G, d = { height: v || H }, g = { height: S || L };
|
|
36
|
+
return /* @__PURE__ */ e.createElement(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
...O,
|
|
40
|
+
className: u(
|
|
41
|
+
n.className,
|
|
42
|
+
f,
|
|
43
|
+
"k-vstack",
|
|
44
|
+
"k-align-items-center"
|
|
45
|
+
)
|
|
46
|
+
},
|
|
47
|
+
t !== 0 && /* @__PURE__ */ e.createElement(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
className: "k-orgchart-line k-orgchart-line-v k-orgchart-line-v-top",
|
|
51
|
+
style: { height: R }
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ e.createElement(
|
|
55
|
+
C,
|
|
56
|
+
{
|
|
57
|
+
nodes: a,
|
|
58
|
+
"aria-expanded": !!r,
|
|
59
|
+
"aria-keyshortcuts": "Enter",
|
|
60
|
+
"aria-level": t + 1,
|
|
61
|
+
"aria-owns": T
|
|
62
|
+
},
|
|
63
|
+
m ? /* @__PURE__ */ e.createElement(
|
|
64
|
+
m,
|
|
65
|
+
{
|
|
66
|
+
style: d,
|
|
67
|
+
className: E,
|
|
68
|
+
title: i,
|
|
69
|
+
items: a,
|
|
70
|
+
level: t,
|
|
71
|
+
expanded: r
|
|
72
|
+
}
|
|
73
|
+
) : /* @__PURE__ */ e.createElement("div", { className: E, style: d }, i),
|
|
74
|
+
h ? /* @__PURE__ */ e.createElement(
|
|
75
|
+
h,
|
|
76
|
+
{
|
|
77
|
+
style: g,
|
|
78
|
+
className: p,
|
|
79
|
+
subtitle: l,
|
|
80
|
+
items: a,
|
|
81
|
+
level: t,
|
|
82
|
+
expanded: r
|
|
83
|
+
}
|
|
84
|
+
) : /* @__PURE__ */ e.createElement("div", { className: p, style: g }, l),
|
|
85
|
+
/* @__PURE__ */ e.createElement(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
role: "group",
|
|
89
|
+
style: { width: "100%" },
|
|
90
|
+
className: u(
|
|
91
|
+
"k-orgchart-node-container",
|
|
92
|
+
"k-justify-content-around",
|
|
93
|
+
{
|
|
94
|
+
[`k-${y.orientationMap[o] || o}`]: o
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
},
|
|
98
|
+
n.children
|
|
99
|
+
)
|
|
100
|
+
),
|
|
101
|
+
N && /* @__PURE__ */ e.createElement("div", { className: "k-orgchart-line k-orgchart-line-v" }),
|
|
102
|
+
s && /* @__PURE__ */ e.createElement(A, { expanded: r, nodes: a }),
|
|
103
|
+
s && !!c && /* @__PURE__ */ e.createElement(
|
|
104
|
+
"div",
|
|
105
|
+
{
|
|
106
|
+
className: "k-orgchart-line k-orgchart-line-h",
|
|
107
|
+
style: { width: c, marginTop: -15 }
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
export {
|
|
113
|
+
x as ServerOrgChartGroup
|
|
114
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),f=require("@progress/kendo-react-common"),i=require("@progress/kendo-react-layout"),b=require("../client/ExpandButton.js"),R=require("../client/OrgChartCard.js"),S=require("../client/OrgChartCardBody.js");function T(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const c=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(r,a,c.get?c:{enumerable:!0,get:()=>t[a]})}}return r.default=t,Object.freeze(r)}const e=T(O),q="k-orgchart-node",x=t=>{const r={avatarType:"image"},{id:a,title:c,subtitle:o,level:n,childLineWidth:d,cardWidth:p,cardHeight:v,verticalLine:k,color:E,line:C,plus:m,expanded:l,node:s,avatar:g,avatarType:u,itemRender:N,...y}={...t,...r},h=N;return e.createElement("div",{...y,className:f.classNames(t.className,q,"k-vstack","k-align-items-center")},n!==0&&e.createElement("div",{className:"k-orgchart-line k-orgchart-line-v k-orgchart-line-v-top",style:{height:k}}),e.createElement(R.OrgChartCard,{node:s,style:{width:p,height:v},"aria-level":n+1,"aria-expanded":!!l,"aria-owns":a},e.createElement(S.OrgChartCardBody,{level:n},h?e.createElement(h,{item:s,title:c,subtitle:o,level:n,expanded:l,color:E}):e.createElement(e.Fragment,null,e.createElement(i.Avatar,{type:u,themeColor:"secondary"},u==="image"?e.createElement("img",{src:g,alt:"KendoReact Avatar Customer Image"}):g),e.createElement("div",{className:"k-card-title-wrap k-vstack"},e.createElement(i.CardTitle,{className:"k-text-ellipsis"},c),e.createElement("span",{className:"k-spacer"}),e.createElement(i.CardSubtitle,{className:"k-text-ellipsis"},o)),e.createElement("span",{className:"k-spacer"})))),C&&e.createElement("div",{className:"k-orgchart-line k-orgchart-line-v"}),m&&e.createElement(b.ExpandButton,{expanded:l,node:s}),m&&!!d&&e.createElement("div",{className:"k-orgchart-line k-orgchart-line-h",style:{width:d,marginTop:-15}}))};exports.ServerOrgChartNode=x;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as e from "react";
|
|
10
|
+
import { classNames as y } from "@progress/kendo-react-common";
|
|
11
|
+
import { Avatar as f, CardTitle as x, CardSubtitle as R } from "@progress/kendo-react-layout";
|
|
12
|
+
import { ExpandButton as A } from "../client/ExpandButton.mjs";
|
|
13
|
+
import { OrgChartCard as O } from "../client/OrgChartCard.mjs";
|
|
14
|
+
import { OrgChartCardBody as T } from "../client/OrgChartCardBody.mjs";
|
|
15
|
+
const w = "k-orgchart-node", I = (l) => {
|
|
16
|
+
const h = {
|
|
17
|
+
avatarType: "image"
|
|
18
|
+
}, {
|
|
19
|
+
id: p,
|
|
20
|
+
title: c,
|
|
21
|
+
subtitle: i,
|
|
22
|
+
level: t,
|
|
23
|
+
childLineWidth: m,
|
|
24
|
+
cardWidth: g,
|
|
25
|
+
cardHeight: v,
|
|
26
|
+
verticalLine: E,
|
|
27
|
+
color: k,
|
|
28
|
+
line: N,
|
|
29
|
+
plus: n,
|
|
30
|
+
expanded: a,
|
|
31
|
+
node: r,
|
|
32
|
+
avatar: s,
|
|
33
|
+
avatarType: o,
|
|
34
|
+
itemRender: C,
|
|
35
|
+
...u
|
|
36
|
+
} = { ...l, ...h }, d = C;
|
|
37
|
+
return /* @__PURE__ */ e.createElement(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
...u,
|
|
41
|
+
className: y(
|
|
42
|
+
l.className,
|
|
43
|
+
w,
|
|
44
|
+
"k-vstack",
|
|
45
|
+
"k-align-items-center"
|
|
46
|
+
)
|
|
47
|
+
},
|
|
48
|
+
t !== 0 && /* @__PURE__ */ e.createElement(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
className: "k-orgchart-line k-orgchart-line-v k-orgchart-line-v-top",
|
|
52
|
+
style: { height: E }
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ e.createElement(
|
|
56
|
+
O,
|
|
57
|
+
{
|
|
58
|
+
node: r,
|
|
59
|
+
style: { width: g, height: v },
|
|
60
|
+
"aria-level": t + 1,
|
|
61
|
+
"aria-expanded": !!a,
|
|
62
|
+
"aria-owns": p
|
|
63
|
+
},
|
|
64
|
+
/* @__PURE__ */ e.createElement(T, { level: t }, d ? /* @__PURE__ */ e.createElement(
|
|
65
|
+
d,
|
|
66
|
+
{
|
|
67
|
+
item: r,
|
|
68
|
+
title: c,
|
|
69
|
+
subtitle: i,
|
|
70
|
+
level: t,
|
|
71
|
+
expanded: a,
|
|
72
|
+
color: k
|
|
73
|
+
}
|
|
74
|
+
) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(f, { type: o, themeColor: "secondary" }, o === "image" ? /* @__PURE__ */ e.createElement(
|
|
75
|
+
"img",
|
|
76
|
+
{
|
|
77
|
+
src: s,
|
|
78
|
+
alt: "KendoReact Avatar Customer Image"
|
|
79
|
+
}
|
|
80
|
+
) : s), /* @__PURE__ */ e.createElement("div", { className: "k-card-title-wrap k-vstack" }, /* @__PURE__ */ e.createElement(x, { className: "k-text-ellipsis" }, c), /* @__PURE__ */ e.createElement("span", { className: "k-spacer" }), /* @__PURE__ */ e.createElement(R, { className: "k-text-ellipsis" }, i)), /* @__PURE__ */ e.createElement("span", { className: "k-spacer" })))
|
|
81
|
+
),
|
|
82
|
+
N && /* @__PURE__ */ e.createElement("div", { className: "k-orgchart-line k-orgchart-line-v" }),
|
|
83
|
+
n && /* @__PURE__ */ e.createElement(A, { expanded: a, node: r }),
|
|
84
|
+
n && !!m && /* @__PURE__ */ e.createElement(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
className: "k-orgchart-line k-orgchart-line-h",
|
|
88
|
+
style: { width: m, marginTop: -15 }
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
export {
|
|
94
|
+
I as ServerOrgChartNode
|
|
95
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=s=>window.getComputedStyle(s).backgroundColor,d=s=>s.toLowerCase().charCodeAt(0)-97,v=s=>{const e=s.match(/series-([a-z])$/);if(e!==null)return d(e[1]);const r=s.split("--series-")[1];return parseInt(r,10)-1},u=30,m=()=>{let s=`
|
|
9
|
+
<div class="k-var--series-a"></div>
|
|
10
|
+
<div class="k-var--series-b"></div>
|
|
11
|
+
<div class="k-var--series-c"></div>
|
|
12
|
+
<div class="k-var--series-d"></div>
|
|
13
|
+
<div class="k-var--series-e"></div>
|
|
14
|
+
<div class="k-var--series-f"></div>
|
|
15
|
+
`;for(let e=0;e<u;e++)s+=`
|
|
16
|
+
<div class="k-var--series-${e+1}"></div>`;return s},C=`
|
|
17
|
+
<div class="k-var--series-unset"></div>
|
|
18
|
+
<div class="k-var--series">
|
|
19
|
+
${m()}
|
|
20
|
+
</div>
|
|
21
|
+
`;class k{getSeriesColors(){const e=this.element,r=[].slice.call(e.querySelectorAll(".k-var--series div")),t=c(e.querySelector(".k-var--series-unset"));return r.reduce((o,l)=>{const a=v(l.className),n=c(l);return n!==t&&(o[a]=n),o},[])}}const p=(s,e)=>{const r=new k,t=r.element=e.createElement("div");t.style.display="none",t.innerHTML=C,e.body.appendChild(t);let i;try{i=r.getSeriesColors()}finally{e.body.removeChild(r.element),delete r.element,s(i)}};exports.loadTheme=p;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
const c = (s) => window.getComputedStyle(s).backgroundColor, d = (s) => s.toLowerCase().charCodeAt(0) - 97, v = (s) => {
|
|
10
|
+
const e = s.match(/series-([a-z])$/);
|
|
11
|
+
if (e !== null)
|
|
12
|
+
return d(e[1]);
|
|
13
|
+
const r = s.split("--series-")[1];
|
|
14
|
+
return parseInt(r, 10) - 1;
|
|
15
|
+
};
|
|
16
|
+
const u = () => {
|
|
17
|
+
let s = `
|
|
18
|
+
<div class="k-var--series-a"></div>
|
|
19
|
+
<div class="k-var--series-b"></div>
|
|
20
|
+
<div class="k-var--series-c"></div>
|
|
21
|
+
<div class="k-var--series-d"></div>
|
|
22
|
+
<div class="k-var--series-e"></div>
|
|
23
|
+
<div class="k-var--series-f"></div>
|
|
24
|
+
`;
|
|
25
|
+
for (let e = 0; e < 30; e++)
|
|
26
|
+
s += `
|
|
27
|
+
<div class="k-var--series-${e + 1}"></div>`;
|
|
28
|
+
return s;
|
|
29
|
+
}, C = `
|
|
30
|
+
<div class="k-var--series-unset"></div>
|
|
31
|
+
<div class="k-var--series">
|
|
32
|
+
${u()}
|
|
33
|
+
</div>
|
|
34
|
+
`;
|
|
35
|
+
class m {
|
|
36
|
+
getSeriesColors() {
|
|
37
|
+
const e = this.element, r = [].slice.call(e.querySelectorAll(".k-var--series div")), t = c(e.querySelector(".k-var--series-unset"));
|
|
38
|
+
return r.reduce(
|
|
39
|
+
(o, l) => {
|
|
40
|
+
const a = v(l.className), n = c(l);
|
|
41
|
+
return n !== t && (o[a] = n), o;
|
|
42
|
+
},
|
|
43
|
+
[]
|
|
44
|
+
// Will populate the series colors in this array
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const k = (s, e) => {
|
|
49
|
+
const r = new m(), t = r.element = e.createElement("div");
|
|
50
|
+
t.style.display = "none", t.innerHTML = C, e.body.appendChild(t);
|
|
51
|
+
let i;
|
|
52
|
+
try {
|
|
53
|
+
i = r.getSeriesColors();
|
|
54
|
+
} finally {
|
|
55
|
+
e.body.removeChild(r.element), delete r.element, s(i);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
k as loadTheme
|
|
60
|
+
};
|
package/utils/consts.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E="expanded",I="items",_="selected",T="checked",D="checkIndeterminate",L="k-orgchart",t=80,H=300,c=25,e=40,N=20,n=20,o=82;exports.CHECK_FIELD=T;exports.CHECK_INDETERMINATE_FIELD=D;exports.CHILDREN_FIELD=I;exports.EXPAND_FIELD=E;exports.GROUP_PADDINGS=o;exports.GROUP_SUBTITLE_HEIGHT=n;exports.GROUP_TITLE_HEIGHT=N;exports.HORIZONTAL_GAP=c;exports.NODE_HEIGHT=t;exports.NODE_WIDTH=H;exports.ORGCHART_CLASSNAME=L;exports.SELECT_FIELD=_;exports.VERTICAL_LINE=e;
|
package/utils/consts.mjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
const E = "expanded", c = "items", t = "selected", I = "checked", n = "checkIndeterminate", s = "k-orgchart", _ = 80, e = 300, o = 25, T = 40, D = 20, L = 20, H = 82;
|
|
10
|
+
export {
|
|
11
|
+
I as CHECK_FIELD,
|
|
12
|
+
n as CHECK_INDETERMINATE_FIELD,
|
|
13
|
+
c as CHILDREN_FIELD,
|
|
14
|
+
E as EXPAND_FIELD,
|
|
15
|
+
H as GROUP_PADDINGS,
|
|
16
|
+
L as GROUP_SUBTITLE_HEIGHT,
|
|
17
|
+
D as GROUP_TITLE_HEIGHT,
|
|
18
|
+
o as HORIZONTAL_GAP,
|
|
19
|
+
_ as NODE_HEIGHT,
|
|
20
|
+
e as NODE_WIDTH,
|
|
21
|
+
s as ORGCHART_CLASSNAME,
|
|
22
|
+
t as SELECT_FIELD,
|
|
23
|
+
T as VERTICAL_LINE
|
|
24
|
+
};
|
package/OrgChart.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import { OrgChartProps } from './client/ClientOrgChart';
|
|
7
|
-
/**
|
|
8
|
-
* Represents the OrgChart component.
|
|
9
|
-
*/
|
|
10
|
-
export declare const OrgChart: React.FunctionComponent<OrgChartProps>;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* The descriptors of the data operations which are applied to the OrgChart component.
|
|
7
|
-
*/
|
|
8
|
-
export interface OrgChartOperationDescriptors {
|
|
9
|
-
/**
|
|
10
|
-
* The hierarchical indices of the items to which the expand operation will be applied, or the descriptor of the operation.
|
|
11
|
-
*/
|
|
12
|
-
expand?: string[] | OrgChartOperationDescriptor;
|
|
13
|
-
/**
|
|
14
|
-
* The hierarchical indices of the items to which the select operation will be applied, or the descriptor of the operation.
|
|
15
|
-
*/
|
|
16
|
-
select?: string[] | OrgChartOperationDescriptor;
|
|
17
|
-
/**
|
|
18
|
-
* The hierarchical indices of the items to which the check operation will be applied, or the descriptor of the operation.
|
|
19
|
-
*/
|
|
20
|
-
check?: string[] | OrgChartCheckDescriptor;
|
|
21
|
-
/**
|
|
22
|
-
* When the operations are applied, the corresponding items and their parents are cloned.
|
|
23
|
-
* For performance reasons, OrgChart items are cloned only once.
|
|
24
|
-
* The name of the field which provides a Boolean representation of whether an item is already cloned.
|
|
25
|
-
* Defaults to `cloned`.
|
|
26
|
-
*/
|
|
27
|
-
cloneField?: string;
|
|
28
|
-
/**
|
|
29
|
-
* The expand field of the item.
|
|
30
|
-
*/
|
|
31
|
-
expandField?: string;
|
|
32
|
-
/**
|
|
33
|
-
* The select field of the item.
|
|
34
|
-
*/
|
|
35
|
-
selectField?: string;
|
|
36
|
-
/**
|
|
37
|
-
* The check field of the item.
|
|
38
|
-
*/
|
|
39
|
-
checkField?: string;
|
|
40
|
-
/**
|
|
41
|
-
* The children field of the item.
|
|
42
|
-
*/
|
|
43
|
-
childrenField?: string;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* The descriptor which is used for expanding, selecting, and checking.
|
|
47
|
-
*/
|
|
48
|
-
export interface OrgChartOperationDescriptor {
|
|
49
|
-
/**
|
|
50
|
-
* The IDs of the items to which the operation will be applied. By default, the OrgChart applies the hierarchical indices of the items. These indices are zero-based. The first root item has a `0` (zero) index. If the first root item has children, the first child acquires a `0_0` index and the second acquires a `0_1` index.
|
|
51
|
-
*/
|
|
52
|
-
ids?: any[];
|
|
53
|
-
/**
|
|
54
|
-
* The name of the field which will provide a Boolean representation for the operation state of the item.
|
|
55
|
-
*
|
|
56
|
-
* The default fields are:
|
|
57
|
-
* * `expanded`—Indicates that an item is expanded.
|
|
58
|
-
* * `selected`—Indicates that an item is selected.
|
|
59
|
-
* * `checked`—Indicates that an item is checked.
|
|
60
|
-
*/
|
|
61
|
-
operationField?: string;
|
|
62
|
-
/**
|
|
63
|
-
* The name of the field which will uniquely describe an item as an alternative to its hierarchical index.
|
|
64
|
-
*/
|
|
65
|
-
idField?: string;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* The descriptor which is used for checking.
|
|
69
|
-
*/
|
|
70
|
-
export interface OrgChartCheckDescriptor extends OrgChartOperationDescriptor {
|
|
71
|
-
/**
|
|
72
|
-
* Determines if a parent item will have an indeterminate state when not all its children are checked.
|
|
73
|
-
*/
|
|
74
|
-
applyCheckIndeterminate?: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* The name of the field which will provide a Boolean representation for the indeterminate state of a parent item.
|
|
77
|
-
* Defaults to `checkIndeterminate`.
|
|
78
|
-
*/
|
|
79
|
-
checkIndeterminateField?: string;
|
|
80
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
|
-
import { ServerOrgChartProps } from '../interfaces/SeverOrgChartProps';
|
|
8
|
-
import { OrgChartActionEvent } from '../interfaces/OrgChartActionEvent';
|
|
9
|
-
import { OrgChartExpandChangeEvent } from '..';
|
|
10
|
-
/**
|
|
11
|
-
* Represents the props of the [KendoReact OrgChart component]({% slug overview_orgchart %}).
|
|
12
|
-
*/
|
|
13
|
-
export interface OrgChartProps extends ServerOrgChartProps {
|
|
14
|
-
/**
|
|
15
|
-
* Specifies if the OrgChart can be navigatable with keyboard.
|
|
16
|
-
* Defaults to `true`.
|
|
17
|
-
*/
|
|
18
|
-
navigatable?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Fires when a node or group is expanded.
|
|
21
|
-
*/
|
|
22
|
-
onExpandChange?: (ev: OrgChartExpandChangeEvent) => void;
|
|
23
|
-
/**
|
|
24
|
-
* @hidden
|
|
25
|
-
*/
|
|
26
|
-
onKeyDown?: (ev: OrgChartActionEvent) => void;
|
|
27
|
-
/**
|
|
28
|
-
* Triggers the item action event.
|
|
29
|
-
*/
|
|
30
|
-
onItemAction?: (ev: OrgChartActionEvent) => void;
|
|
31
|
-
/**
|
|
32
|
-
* Triggers the item double click action event.
|
|
33
|
-
*/
|
|
34
|
-
onItemDoubleClick?: (ev: OrgChartActionEvent) => void;
|
|
35
|
-
/**
|
|
36
|
-
* Triggers the item contextmenu action event.
|
|
37
|
-
*/
|
|
38
|
-
onItemContextMenu?: (ev: OrgChartActionEvent) => void;
|
|
39
|
-
/**
|
|
40
|
-
* Triggers the group action event.
|
|
41
|
-
*/
|
|
42
|
-
onGroupAction?: (ev: OrgChartActionEvent) => void;
|
|
43
|
-
/**
|
|
44
|
-
* @hidden
|
|
45
|
-
*/
|
|
46
|
-
onGroupBlur?: (ev: OrgChartActionEvent) => void;
|
|
47
|
-
/**
|
|
48
|
-
* @hidden
|
|
49
|
-
*/
|
|
50
|
-
onGroupFocus?: (ev: OrgChartActionEvent) => void;
|
|
51
|
-
}
|
|
52
|
-
type OrgChartEventsContextType = {
|
|
53
|
-
cardColors?: string[];
|
|
54
|
-
onExpandChange?: (ev: OrgChartExpandChangeEvent) => void;
|
|
55
|
-
onKeyDown?: (ev: OrgChartActionEvent) => void;
|
|
56
|
-
onItemAction?: (ev: OrgChartActionEvent) => void;
|
|
57
|
-
onItemContextMenu?: (ev: OrgChartActionEvent) => void;
|
|
58
|
-
onItemDoubleClick?: (ev: OrgChartActionEvent) => void;
|
|
59
|
-
onGroupAction?: (ev: OrgChartActionEvent) => void;
|
|
60
|
-
onGroupBlur?: (ev: OrgChartActionEvent) => void;
|
|
61
|
-
onGroupFocus?: (ev: OrgChartActionEvent) => void;
|
|
62
|
-
};
|
|
63
|
-
export declare const OrgChartEventsContextContext: React.Context<OrgChartEventsContextType>;
|
|
64
|
-
/**
|
|
65
|
-
* @hidden
|
|
66
|
-
*/
|
|
67
|
-
export declare const ClientOrgChart: {
|
|
68
|
-
(props: OrgChartProps): import("react/jsx-runtime").JSX.Element;
|
|
69
|
-
propTypes: {
|
|
70
|
-
className: PropTypes.Requireable<string>;
|
|
71
|
-
style: PropTypes.Requireable<object>;
|
|
72
|
-
id: PropTypes.Requireable<string>;
|
|
73
|
-
ariaLabel: PropTypes.Requireable<string>;
|
|
74
|
-
idField: PropTypes.Requireable<string>;
|
|
75
|
-
childrenField: PropTypes.Requireable<string>;
|
|
76
|
-
expandField: PropTypes.Requireable<string>;
|
|
77
|
-
titleField: PropTypes.Requireable<string>;
|
|
78
|
-
hasChildrenField: PropTypes.Requireable<string>;
|
|
79
|
-
subtitleField: PropTypes.Requireable<string>;
|
|
80
|
-
avatarField: PropTypes.Requireable<string>;
|
|
81
|
-
cardsColors: PropTypes.Requireable<any[]>;
|
|
82
|
-
data: PropTypes.Requireable<any[]>;
|
|
83
|
-
groupField: PropTypes.Requireable<string>;
|
|
84
|
-
cardHeight: PropTypes.Requireable<number>;
|
|
85
|
-
cardWidth: PropTypes.Requireable<number>;
|
|
86
|
-
groupTitleHeight: PropTypes.Requireable<number>;
|
|
87
|
-
groupSubtitleHeight: PropTypes.Requireable<number>;
|
|
88
|
-
verticalLine: PropTypes.Requireable<number>;
|
|
89
|
-
height: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
90
|
-
onExpandChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
91
|
-
onItemAction: PropTypes.Requireable<(...args: any[]) => any>;
|
|
92
|
-
onItemDoubleClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
93
|
-
onItemContextMenu: PropTypes.Requireable<(...args: any[]) => any>;
|
|
94
|
-
onGroupAction: PropTypes.Requireable<(...args: any[]) => any>;
|
|
95
|
-
};
|
|
96
|
-
displayName: string;
|
|
97
|
-
};
|
|
98
|
-
export {};
|
package/client/ExpandButton.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export interface ExpandButtonProps {
|
|
10
|
-
node?: any;
|
|
11
|
-
nodes?: any[];
|
|
12
|
-
expanded?: boolean;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
export declare const ExpandButton: React.FunctionComponent<ExpandButtonProps>;
|
package/client/OrgChartCard.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export interface OrgChartCardProps {
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
children?: React.ReactNode;
|
|
14
|
-
/**
|
|
15
|
-
* The styles that are applied to the OrgChart.
|
|
16
|
-
*/
|
|
17
|
-
style?: React.CSSProperties;
|
|
18
|
-
node?: any;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* @hidden
|
|
22
|
-
*/
|
|
23
|
-
export declare const OrgChartCard: React.FunctionComponent<OrgChartCardProps>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export interface OrgChartCardBodyProps {
|
|
10
|
-
level: number;
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
export declare const OrgChartCardBody: React.FunctionComponent<OrgChartCardBodyProps>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export interface OrgChartGroupContainerProps {
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
children?: React.ReactNode;
|
|
14
|
-
/**
|
|
15
|
-
* The styles that are applied to the OrgChart.
|
|
16
|
-
*/
|
|
17
|
-
style?: React.CSSProperties;
|
|
18
|
-
nodes?: any[];
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* @hidden
|
|
22
|
-
*/
|
|
23
|
-
export declare const OrgChartGroupContainer: React.FunctionComponent<OrgChartGroupContainerProps>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*/
|
|
8
|
-
export interface ChildGroup {
|
|
9
|
-
items: any[];
|
|
10
|
-
groupedItems: any[];
|
|
11
|
-
level: number;
|
|
12
|
-
ids: number[];
|
|
13
|
-
parentId: number;
|
|
14
|
-
hasChildren: boolean;
|
|
15
|
-
orientation: 'horizontal' | 'vertical';
|
|
16
|
-
width: number | null;
|
|
17
|
-
childLineWidths?: number[];
|
|
18
|
-
left?: number;
|
|
19
|
-
top?: number;
|
|
20
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
/**
|
|
6
|
-
* Represents the OrgChartActionEvent event argument.
|
|
7
|
-
*/
|
|
8
|
-
export interface OrgChartActionEvent {
|
|
9
|
-
/**
|
|
10
|
-
* Represents the triggered React event.
|
|
11
|
-
*/
|
|
12
|
-
event: React.KeyboardEvent | React.MouseEvent | React.FocusEvent;
|
|
13
|
-
/**
|
|
14
|
-
* Item that triggers the event.
|
|
15
|
-
*/
|
|
16
|
-
item?: any;
|
|
17
|
-
/**
|
|
18
|
-
* Items that belong to the group that triggers the event.
|
|
19
|
-
*/
|
|
20
|
-
items?: any;
|
|
21
|
-
/**
|
|
22
|
-
* @hidden
|
|
23
|
-
*/
|
|
24
|
-
containerRef?: React.RefObject<HTMLDivElement>;
|
|
25
|
-
}
|