@progress/kendo-react-orgchart 9.4.0-develop.2 → 9.4.0-develop.21

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.
@@ -5,14 +5,13 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  const e = {
10
9
  name: "@progress/kendo-react-orgchart",
11
10
  productName: "KendoReact",
12
11
  productCode: "KENDOUIREACT",
13
12
  productCodes: ["KENDOUIREACT"],
14
- publishDate: 1737714348,
15
- version: "9.4.0-develop.2",
13
+ publishDate: 1738929118,
14
+ version: "9.4.0-develop.21",
16
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"
17
16
  };
18
17
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-orgchart",
3
- "version": "9.4.0-develop.2",
3
+ "version": "9.4.0-develop.21",
4
4
  "description": "React OrgChart renders a message to the user with information about the status of an app process. KendoReact OrgChart package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -27,9 +27,9 @@
27
27
  "peerDependencies": {
28
28
  "@progress/kendo-data-query": "^1.0.0",
29
29
  "@progress/kendo-licensing": "^1.3.4",
30
- "@progress/kendo-react-buttons": "9.4.0-develop.2",
31
- "@progress/kendo-react-common": "9.4.0-develop.2",
32
- "@progress/kendo-react-layout": "9.4.0-develop.2",
30
+ "@progress/kendo-react-buttons": "9.4.0-develop.21",
31
+ "@progress/kendo-react-common": "9.4.0-develop.21",
32
+ "@progress/kendo-react-layout": "9.4.0-develop.21",
33
33
  "@progress/kendo-svg-icons": "^4.0.0",
34
34
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
35
35
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
@@ -55,7 +55,7 @@
55
55
  "package": {
56
56
  "productName": "KendoReact",
57
57
  "productCode": "KENDOUIREACT",
58
- "publishDate": 1737714348,
58
+ "publishDate": 1738929118,
59
59
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"
60
60
  }
61
61
  },
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("@progress/kendo-react-common"),d=require("./utils/consts.js");function C(n,t){if(!n||!n.length)return[];let e=n;const l=t.cloneField||"cloned",i=t.expandField||d.EXPAND_FIELD,s=t.selectField||d.SELECT_FIELD,r=t.checkField||d.CHECK_FIELD,c=t.childrenField||d.CHILDREN_FIELD;return e=o(e,i,t.expand,l,c),e=o(e,s,t.select,l,c),e=o(e,r,t.check,l,c),a(e,c,t.check),e}function o(n,t,e,l,i){if(e){const{ids:s,field:r}=E(e,t),c=!f.isArray(e)&&e.idField?f.resolveItemsIds(s,e.idField,n,i):s;return F(n,c,r,l,i)}return n}function E(n,t){let e,l;return f.isArray(n)?(e=n,l=t):(e=n.ids||[],l=n.operationField||t),{ids:e,field:l}}function F(n,t,e,l,i){let s=n;return t.forEach(r=>{s=f.updateItem(s,r,c=>g(e,c),l,i)}),s}function g(n,t){const e=(n||"").split(".");let l=t;for(let i=0;i<e.length;i++){const s=e[i];if(i===e.length-1)l[s]=!0;else if(l[s]!==void 0)l[s]={...l[s]},l=l[s];else return}}function a(n,t,e){if(e&&!f.isArray(e)&&e.applyCheckIndeterminate){const{field:l}=E(e,d.CHECK_FIELD),i=e.checkIndeterminateField||d.CHECK_INDETERMINATE_FIELD;for(let s=0;s<n.length;s++){const r=n[s],c=r[t];c&&I(c,f.getNestedValue(l,r)?[]:[r],t,l,i)}}}function I(n,t,e,l,i){let s=!1;for(let r=0;r<n.length;r++){const c=n[r];if(f.getNestedValue(l,c)){if(!s)for(let u=0;u<t.length;u++)g(i,t[u]);s=!0,c[e]&&I(c[e],[],e,l,i)}else c[e]&&I(c[e],s?[c]:t.concat([c]),e,l,i)}}exports.processOrgChartItems=C;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("@progress/kendo-react-common"),d=require("./utils/consts.js");function C(n,t){if(!n||!n.length)return[];let e=n;const l=t.cloneField||"cloned",i=t.expandField||d.EXPAND_FIELD,s=t.selectField||d.SELECT_FIELD,r=t.checkField||d.CHECK_FIELD,c=t.childrenField||d.CHILDREN_FIELD;return e=o(e,i,t.expand,l,c),e=o(e,s,t.select,l,c),e=o(e,r,t.check,l,c),a(e,c,t.check),e}function o(n,t,e,l,i){if(e){const{ids:s,field:r}=E(e,t),c=!f.isArray(e)&&e.idField?f.resolveItemsIds(s,e.idField,n,i):s;return F(n,c,r,l,i)}return n}function E(n,t){let e,l;return f.isArray(n)?(e=n,l=t):(e=n.ids||[],l=n.operationField||t),{ids:e,field:l}}function F(n,t,e,l,i){let s=n;return t.forEach(r=>{s=f.updateItem(s,r,c=>g(e,c),l,i)}),s}function g(n,t){const e=(n||"").split(".");let l=t;for(let i=0;i<e.length;i++){const s=e[i];if(i===e.length-1)l[s]=!0;else if(l[s]!==void 0)l[s]={...l[s]},l=l[s];else return}}function a(n,t,e){if(e&&!f.isArray(e)&&e.applyCheckIndeterminate){const{field:l}=E(e,d.CHECK_FIELD),i=e.checkIndeterminateField||d.CHECK_INDETERMINATE_FIELD;for(let s=0;s<n.length;s++){const r=n[s],c=r[t];c&&I(c,f.getNestedValue(l,r)?[]:[r],t,l,i)}}}function I(n,t,e,l,i){let s=!1;for(let r=0;r<n.length;r++){const c=n[r];if(f.getNestedValue(l,c)){if(!s)for(let u=0;u<t.length;u++)g(i,t[u]);s=!0,c[e]&&I(c[e],[],e,l,i)}else c[e]&&I(c[e],s?[c]:t.concat([c]),e,l,i)}}exports.processOrgChartItems=C;
@@ -5,20 +5,19 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import { isArray as I, resolveItemsIds as g, updateItem as C, getNestedValue as E } from "@progress/kendo-react-common";
10
9
  import { EXPAND_FIELD as D, SELECT_FIELD as L, CHECK_FIELD as o, CHILDREN_FIELD as h, CHECK_INDETERMINATE_FIELD as N } from "./utils/consts.mjs";
11
10
  function a(n, t) {
12
11
  if (!n || !n.length)
13
12
  return [];
14
13
  let e = n;
15
- const l = t.cloneField || "cloned", f = t.expandField || D, s = t.selectField || L, c = t.checkField || o, i = t.childrenField || h;
16
- return e = d(e, f, t.expand, l, i), e = d(e, s, t.select, l, i), e = d(e, c, t.check, l, i), p(e, i, t.check), e;
14
+ const l = t.cloneField || "cloned", i = t.expandField || D, s = t.selectField || L, c = t.checkField || o, f = t.childrenField || h;
15
+ return e = d(e, i, t.expand, l, f), e = d(e, s, t.select, l, f), e = d(e, c, t.check, l, f), p(e, f, t.check), e;
17
16
  }
18
- function d(n, t, e, l, f) {
17
+ function d(n, t, e, l, i) {
19
18
  if (e) {
20
- const { ids: s, field: c } = m(e, t), i = !I(e) && e.idField ? g(s, e.idField, n, f) : s;
21
- return _(n, i, c, l, f);
19
+ const { ids: s, field: c } = m(e, t), f = !I(e) && e.idField ? g(s, e.idField, n, i) : s;
20
+ return _(n, f, c, l, i);
22
21
  }
23
22
  return n;
24
23
  }
@@ -26,18 +25,18 @@ function m(n, t) {
26
25
  let e, l;
27
26
  return I(n) ? (e = n, l = t) : (e = n.ids || [], l = n.operationField || t), { ids: e, field: l };
28
27
  }
29
- function _(n, t, e, l, f) {
28
+ function _(n, t, e, l, i) {
30
29
  let s = n;
31
30
  return t.forEach((c) => {
32
- s = C(s, c, (i) => F(e, i), l, f);
31
+ s = C(s, c, (f) => F(e, f), l, i);
33
32
  }), s;
34
33
  }
35
34
  function F(n, t) {
36
35
  const e = (n || "").split(".");
37
36
  let l = t;
38
- for (let f = 0; f < e.length; f++) {
39
- const s = e[f];
40
- if (f === e.length - 1)
37
+ for (let i = 0; i < e.length; i++) {
38
+ const s = e[i];
39
+ if (i === e.length - 1)
41
40
  l[s] = !0;
42
41
  else if (l[s] !== void 0)
43
42
  l[s] = { ...l[s] }, l = l[s];
@@ -47,41 +46,41 @@ function F(n, t) {
47
46
  }
48
47
  function p(n, t, e) {
49
48
  if (e && !I(e) && e.applyCheckIndeterminate) {
50
- const { field: l } = m(e, o), f = e.checkIndeterminateField || N;
49
+ const { field: l } = m(e, o), i = e.checkIndeterminateField || N;
51
50
  for (let s = 0; s < n.length; s++) {
52
- const c = n[s], i = c[t];
53
- i && u(
54
- i,
51
+ const c = n[s], f = c[t];
52
+ f && u(
53
+ f,
55
54
  E(l, c) ? [] : [c],
56
55
  t,
57
56
  l,
58
- f
57
+ i
59
58
  );
60
59
  }
61
60
  }
62
61
  }
63
- function u(n, t, e, l, f) {
62
+ function u(n, t, e, l, i) {
64
63
  let s = !1;
65
64
  for (let c = 0; c < n.length; c++) {
66
- const i = n[c];
67
- if (E(l, i)) {
65
+ const f = n[c];
66
+ if (E(l, f)) {
68
67
  if (!s)
69
68
  for (let r = 0; r < t.length; r++)
70
- F(f, t[r]);
71
- s = !0, i[e] && u(
72
- i[e],
69
+ F(i, t[r]);
70
+ s = !0, f[e] && u(
71
+ f[e],
73
72
  [],
74
73
  e,
75
74
  l,
76
- f
75
+ i
77
76
  );
78
77
  } else
79
- i[e] && u(
80
- i[e],
81
- s ? [i] : t.concat([i]),
78
+ f[e] && u(
79
+ f[e],
80
+ s ? [f] : t.concat([f]),
82
81
  e,
83
82
  l,
84
- f
83
+ i
85
84
  );
86
85
  }
87
86
  }
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react"),S=require("@progress/kendo-react-common"),$=require("./ServerOrgChartNode.js"),F=require("./ServerOrgChartGroup.js"),K=require("@progress/kendo-data-query"),n=require("../utils/consts.js");function Q(o){const I=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const a in o)if(a!=="default"){const e=Object.getOwnPropertyDescriptor(o,a);Object.defineProperty(I,a,e.get?e:{enumerable:!0,get:()=>o[a]})}}return I.default=o,Object.freeze(I)}const b=Q(B),W=({dataByGroups:o,data:I=[],cardWidth:a,childrenField:e,idField:t,expandField:r,hasChildrenField:i,groupField:h,level:d=1,parentId:l=0})=>{I.forEach(s=>{const c=s[e];if(s[r]&&c&&c.length){const O=c.some(T=>T[e]&&T[e].length||i&&T[i]),f=O?"horizontal":"vertical",v=O?null:a+2*n.HORIZONTAL_GAP,E=o.find(T=>T.parentId===l),R=o.find(T=>T.ids.includes(l));let _=!1;if(E){const T=E.ids[0],x=R.items.find(G=>G[t]===T),N=R.items.find(G=>G[t]===s[t]);_=x[h]===N[h]}E&&_?(E.ids.push(s[t]),E.items=E.items.concat(c)):o.push({ids:[s[t]],items:c,level:d,parentId:l,hasChildren:O,orientation:f,width:v}),W({dataByGroups:o,data:s[e],childrenField:e,cardWidth:a,idField:t,expandField:r,hasChildrenField:i,groupField:h,level:d+1,parentId:s[t]})}})},J=(o,I)=>{const a=I||n.NODE_WIDTH,e=o.sort((t,r)=>r.level-t.level);e.forEach(t=>{if(!t.width){const r=e.filter(i=>t.ids.includes(i.parentId));if(r.length){const i=Math.max(...r.map(s=>s.width||0)),h=Math.max(...r.map(s=>s.groupedItems.length||0)),d=Math.max(...t.groupedItems.map(s=>{const c=t.orientation==="horizontal"?s.items.length:1;return c*(a+2*n.HORIZONTAL_GAP)+n.HORIZONTAL_GAP*(c-1)})),l=i*h+n.HORIZONTAL_GAP*(h-1);t.width=Math.max(l,d)}else{const i=Math.max(...t.groupedItems.map(h=>{const d=t.orientation==="horizontal"?h.items.length:1;return d*(a+2*n.HORIZONTAL_GAP)+n.HORIZONTAL_GAP*(d-1)}));t.width=i}}})},X=(o,I)=>{const a=o.sort((e,t)=>e.level-t.level);a.forEach(e=>{var c;if(e.level===0)return;const t=a.find(m=>m.ids.includes(e.parentId)),r=(t==null?void 0:t.groupedItems.findIndex(m=>m.items.some(O=>e.ids.includes(O[I]))))||0,i=(t==null?void 0:t.groupedItems)||[],h=t.width?(t.width-(i.length-1)*n.HORIZONTAL_GAP)/i.length:0;if(!e.left){let m=(t==null?void 0:t.left)||0;i.forEach((O,f)=>{f<r&&(m+=h+n.HORIZONTAL_GAP)}),e.left=m}const d=(t==null?void 0:t.width)||0,l=(t==null?void 0:t.groupedItems.length)||1,s=(d-(l-1)*n.HORIZONTAL_GAP)/l;if(e.width=s,t){const m=e.width-(e.width-(e.groupedItems.length-1)*n.HORIZONTAL_GAP)/e.groupedItems.length;t.childLineWidths?(c=t.childLineWidths)==null||c.push(m):t.childLineWidths=[m]}})},Y=(o,I,a,e,t)=>{const r=I||n.NODE_HEIGHT,i=t||n.VERTICAL_LINE,h=a+e+n.GROUP_PADDINGS;o.forEach(d=>{const l=d.level,s=(r+i+h)*l+n.VERTICAL_LINE*(l?l-1:0)-(i-n.VERTICAL_LINE)*(l?1:0);d.top=s})},tt=(o,I,a,e,t)=>{const r=I||n.NODE_HEIGHT,i=a||n.VERTICAL_LINE,d=(e||n.GROUP_TITLE_HEIGHT)+n.GROUP_SUBTITLE_HEIGHT+n.GROUP_PADDINGS;return Math.max(...o.map(s=>{const c=s.top||0,m=Math.max(...s.groupedItems.map(v=>v.items.length)),O=s.hasChildren?n.VERTICAL_LINE:0,f=s.orientation==="horizontal"?r+i+d+i+O:m*(r+i)+d+i;return c+f}))},y=o=>{const I={width:"100%",data:[],ariaLabel:"Org Chart",idField:"id",childrenField:"items",avatarField:"avatar",titleField:"title",subtitleField:"subtitle",expandField:"expanded",orientation:"horizontal",showAvatar:!0},{id:a,width:e,data:t,groupField:r,cardWidth:i,cardHeight:h,groupTitleHeight:d,groupSubtitleHeight:l,verticalLine:s,idField:c,childrenField:m,expandField:O,hasChildrenField:f,avatarField:v,titleField:E,subtitleField:R,cardsColors:_,ariaLabel:T,itemRender:x,groupTitleRender:N,groupSubtitleRender:G,height:D,avatarType:k,showAvatar:M}={...I,...o},p=[{items:t,level:0,hasChildren:!0,orientation:"horizontal",ids:[0],parentId:null,width:null}];W({dataByGroups:p,data:t,cardWidth:i,expandField:O,hasChildrenField:f,childrenField:m,idField:c,groupField:r}),p.map(u=>{u.groupedItems=K.groupBy(u.items,[{field:r}])}),J(p,i),X(p,c),Y(p,h||n.NODE_HEIGHT,d||n.GROUP_TITLE_HEIGHT,l||n.GROUP_SUBTITLE_HEIGHT,s);const U=tt(p,h||n.NODE_HEIGHT,d||n.GROUP_TITLE_HEIGHT,l||n.GROUP_SUBTITLE_HEIGHT);return b.createElement("div",{className:"k-orgchart-container",style:{width:e,height:D||U}},p.map(u=>{const H=u.level,w=u.groupedItems.map(L=>{const C=L.items.some(A=>A[O]);return{...L,expanded:C}}),Z=w.filter(L=>L.expanded),P="horizontal",z=_&&_[H]||"green";return b.createElement("div",{role:H===0?"tree":"group",id:a+"-"+H+"-"+u.ids[0],"aria-label":H===0?T:void 0,"aria-orientation":H===0?P:void 0,key:u.ids[0]+"_"+H,className:S.classNames("k-orgchart-group",`k-orgchart-level-${H}`,"k-pos-absolute",{[`k-${S.kendoThemeMaps.orientationMap[P]}`]:P}),style:{width:u.width||"100%",left:u.left,top:u.top}},t.length>0&&w.map((L,C)=>{const A=L.items.some(g=>g[m]&&g[m].length||f&&g[f]),q=u.width?(u.width-(w.length-1)*n.HORIZONTAL_GAP)/w.length:void 0,V=Z.findIndex(g=>g===L);return b.createElement(F.ServerOrgChartGroup,{id:a+"-"+(H+1)+"-"+L.items[0][c],style:{width:q},groupTitleHeight:d,groupSubtitleHeight:l,groupTitleRender:N,groupSubtitleRender:G,key:C,level:H,verticalLine:s||n.VERTICAL_LINE,title:L.items[0][r||E],subtitle:r,orientation:u.orientation,childLineWidth:A&&L.expanded&&u.orientation==="horizontal"?u.childLineWidths[V]:0,line:A,nodes:L.items,expanded:L.expanded,plus:A},L.items.map((g,j)=>b.createElement($.ServerOrgChartNode,{cardHeight:h,cardWidth:i,itemRender:x,color:z,key:j,level:H,avatar:g[v],avatarType:k,showAvatar:M,title:g[E],subtitle:g[R],verticalLine:0,line:!1,node:g,childLineWidth:0,plus:!1},g.text)))}))}))};y.displayName="KendoServerGroupedOrgChart";exports.ServerGroupedOrgChart=y;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react"),S=require("@progress/kendo-react-common"),$=require("./ServerOrgChartNode.js"),F=require("./ServerOrgChartGroup.js"),K=require("@progress/kendo-data-query"),n=require("../utils/consts.js");function Q(o){const I=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const a in o)if(a!=="default"){const e=Object.getOwnPropertyDescriptor(o,a);Object.defineProperty(I,a,e.get?e:{enumerable:!0,get:()=>o[a]})}}return I.default=o,Object.freeze(I)}const b=Q(B),W=({dataByGroups:o,data:I=[],cardWidth:a,childrenField:e,idField:t,expandField:r,hasChildrenField:i,groupField:h,level:d=1,parentId:l=0})=>{I.forEach(s=>{const c=s[e];if(s[r]&&c&&c.length){const O=c.some(T=>T[e]&&T[e].length||i&&T[i]),f=O?"horizontal":"vertical",v=O?null:a+2*n.HORIZONTAL_GAP,E=o.find(T=>T.parentId===l),R=o.find(T=>T.ids.includes(l));let _=!1;if(E){const T=E.ids[0],x=R.items.find(G=>G[t]===T),N=R.items.find(G=>G[t]===s[t]);_=x[h]===N[h]}E&&_?(E.ids.push(s[t]),E.items=E.items.concat(c)):o.push({ids:[s[t]],items:c,level:d,parentId:l,hasChildren:O,orientation:f,width:v}),W({dataByGroups:o,data:s[e],childrenField:e,cardWidth:a,idField:t,expandField:r,hasChildrenField:i,groupField:h,level:d+1,parentId:s[t]})}})},J=(o,I)=>{const a=I||n.NODE_WIDTH,e=o.sort((t,r)=>r.level-t.level);e.forEach(t=>{if(!t.width){const r=e.filter(i=>t.ids.includes(i.parentId));if(r.length){const i=Math.max(...r.map(s=>s.width||0)),h=Math.max(...r.map(s=>s.groupedItems.length||0)),d=Math.max(...t.groupedItems.map(s=>{const c=t.orientation==="horizontal"?s.items.length:1;return c*(a+2*n.HORIZONTAL_GAP)+n.HORIZONTAL_GAP*(c-1)})),l=i*h+n.HORIZONTAL_GAP*(h-1);t.width=Math.max(l,d)}else{const i=Math.max(...t.groupedItems.map(h=>{const d=t.orientation==="horizontal"?h.items.length:1;return d*(a+2*n.HORIZONTAL_GAP)+n.HORIZONTAL_GAP*(d-1)}));t.width=i}}})},X=(o,I)=>{const a=o.sort((e,t)=>e.level-t.level);a.forEach(e=>{var c;if(e.level===0)return;const t=a.find(m=>m.ids.includes(e.parentId)),r=(t==null?void 0:t.groupedItems.findIndex(m=>m.items.some(O=>e.ids.includes(O[I]))))||0,i=(t==null?void 0:t.groupedItems)||[],h=t.width?(t.width-(i.length-1)*n.HORIZONTAL_GAP)/i.length:0;if(!e.left){let m=(t==null?void 0:t.left)||0;i.forEach((O,f)=>{f<r&&(m+=h+n.HORIZONTAL_GAP)}),e.left=m}const d=(t==null?void 0:t.width)||0,l=(t==null?void 0:t.groupedItems.length)||1,s=(d-(l-1)*n.HORIZONTAL_GAP)/l;if(e.width=s,t){const m=e.width-(e.width-(e.groupedItems.length-1)*n.HORIZONTAL_GAP)/e.groupedItems.length;t.childLineWidths?(c=t.childLineWidths)==null||c.push(m):t.childLineWidths=[m]}})},Y=(o,I,a,e,t)=>{const r=I||n.NODE_HEIGHT,i=t||n.VERTICAL_LINE,h=a+e+n.GROUP_PADDINGS;o.forEach(d=>{const l=d.level,s=(r+i+h)*l+n.VERTICAL_LINE*(l?l-1:0)-(i-n.VERTICAL_LINE)*(l?1:0);d.top=s})},tt=(o,I,a,e,t)=>{const r=I||n.NODE_HEIGHT,i=a||n.VERTICAL_LINE,d=(e||n.GROUP_TITLE_HEIGHT)+n.GROUP_SUBTITLE_HEIGHT+n.GROUP_PADDINGS;return Math.max(...o.map(s=>{const c=s.top||0,m=Math.max(...s.groupedItems.map(v=>v.items.length)),O=s.hasChildren?n.VERTICAL_LINE:0,f=s.orientation==="horizontal"?r+i+d+i+O:m*(r+i)+d+i;return c+f}))},y=o=>{const I={width:"100%",data:[],ariaLabel:"Org Chart",idField:"id",childrenField:"items",avatarField:"avatar",titleField:"title",subtitleField:"subtitle",expandField:"expanded",orientation:"horizontal",showAvatar:!0},{id:a,width:e,data:t,groupField:r,cardWidth:i,cardHeight:h,groupTitleHeight:d,groupSubtitleHeight:l,verticalLine:s,idField:c,childrenField:m,expandField:O,hasChildrenField:f,avatarField:v,titleField:E,subtitleField:R,cardsColors:_,ariaLabel:T,itemRender:x,groupTitleRender:N,groupSubtitleRender:G,height:D,avatarType:k,showAvatar:M}={...I,...o},p=[{items:t,level:0,hasChildren:!0,orientation:"horizontal",ids:[0],parentId:null,width:null}];W({dataByGroups:p,data:t,cardWidth:i,expandField:O,hasChildrenField:f,childrenField:m,idField:c,groupField:r}),p.map(u=>{u.groupedItems=K.groupBy(u.items,[{field:r}])}),J(p,i),X(p,c),Y(p,h||n.NODE_HEIGHT,d||n.GROUP_TITLE_HEIGHT,l||n.GROUP_SUBTITLE_HEIGHT,s);const U=tt(p,h||n.NODE_HEIGHT,d||n.GROUP_TITLE_HEIGHT,l||n.GROUP_SUBTITLE_HEIGHT);return b.createElement("div",{className:"k-orgchart-container",style:{width:e,height:D||U}},p.map(u=>{const H=u.level,w=u.groupedItems.map(L=>{const C=L.items.some(A=>A[O]);return{...L,expanded:C}}),Z=w.filter(L=>L.expanded),P="horizontal",z=_&&_[H]||"green";return b.createElement("div",{role:H===0?"tree":"group",id:a+"-"+H+"-"+u.ids[0],"aria-label":H===0?T:void 0,"aria-orientation":H===0?P:void 0,key:u.ids[0]+"_"+H,className:S.classNames("k-orgchart-group",`k-orgchart-level-${H}`,"k-pos-absolute",{[`k-${S.kendoThemeMaps.orientationMap[P]}`]:P}),style:{width:u.width||"100%",left:u.left,top:u.top}},t.length>0&&w.map((L,C)=>{const A=L.items.some(g=>g[m]&&g[m].length||f&&g[f]),q=u.width?(u.width-(w.length-1)*n.HORIZONTAL_GAP)/w.length:void 0,V=Z.findIndex(g=>g===L);return b.createElement(F.ServerOrgChartGroup,{id:a+"-"+(H+1)+"-"+L.items[0][c],style:{width:q},groupTitleHeight:d,groupSubtitleHeight:l,groupTitleRender:N,groupSubtitleRender:G,key:C,level:H,verticalLine:s||n.VERTICAL_LINE,title:L.items[0][r||E],subtitle:r,orientation:u.orientation,childLineWidth:A&&L.expanded&&u.orientation==="horizontal"?u.childLineWidths[V]:0,line:A,nodes:L.items,expanded:L.expanded,plus:A},L.items.map((g,j)=>b.createElement($.ServerOrgChartNode,{cardHeight:h,cardWidth:i,itemRender:x,color:z,key:j,level:H,avatar:g[v],avatarType:k,showAvatar:M,title:g[E],subtitle:g[R],verticalLine:0,line:!1,node:g,childLineWidth:0,plus:!1},g.text)))}))}))};y.displayName="KendoServerGroupedOrgChart";exports.ServerGroupedOrgChart=y;
@@ -5,7 +5,6 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import * as R from "react";
10
9
  import { classNames as q, kendoThemeMaps as J } from "@progress/kendo-react-common";
11
10
  import { ServerOrgChartNode as Q } from "./ServerOrgChartNode.mjs";
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),T=require("@progress/kendo-react-common"),z=require("./ServerOrgChartNode.js"),v=require("../utils/consts.js");function G(a){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const s in a)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(a,s);Object.defineProperty(l,s,i.get?i:{enumerable:!0,get:()=>a[s]})}}return l.default=a,Object.freeze(l)}const H=G(j),C=({dataByGroups:a,data:l=[],cardWidth:s,childrenField:i,idField:e,expandField:t,hasChildrenField:n,groupField:c,level:m=1,parentId:d=0})=>{l.forEach(h=>{const f=h[i];if(h[t]&&f&&f.length){const o=f.some(w=>w[i]&&w[i].length||n&&w[n]),u=o?"horizontal":"vertical",L=o?null:s;a.push({ids:[h[e]],items:f,level:m,parentId:d,hasChildren:o,orientation:u,width:L}),C({dataByGroups:a,data:h[i],childrenField:i,cardWidth:s,idField:e,expandField:t,hasChildrenField:n,groupField:c,level:m+1,parentId:h[e]})}})},V=(a,l)=>{const s=l||v.NODE_WIDTH,i=a.sort((e,t)=>t.level-e.level);i.forEach(e=>{if(!e.width){const t=i.filter(d=>e.ids.includes(d.parentId)),n=t.length?Math.max(...t.map(d=>d.width||0)):s,c=e.orientation==="horizontal"?e.items.length:1,m=n*c+v.HORIZONTAL_GAP*(c-1);e.width=m}})},F=(a,l,s)=>{const i=a.sort((e,t)=>e.level-t.level);i.forEach(e=>{if(e.level===0)return;const t=i.find(o=>o.ids.includes(e.parentId)),n=(t==null?void 0:t.items.findIndex(o=>e.ids.includes(o[s])))||0,c=(t==null?void 0:t.items)||[],m=t.width?(t.width-(c.length-1)*v.HORIZONTAL_GAP)/c.length:0;if(!e.left){let o=(t==null?void 0:t.left)||0;c.forEach((u,L)=>{L<n&&(o+=m+v.HORIZONTAL_GAP)}),e.left=o}const d=(t==null?void 0:t.width)||0,h=(t==null?void 0:t.items.length)||1,f=(d-(h-1)*v.HORIZONTAL_GAP)/h;e.width=f;const E=t==null?void 0:t.items.map(o=>{const u=o[l]?o[l].length:0,L=i.find(_=>_.ids.includes(o[s])),w=(L==null?void 0:L.width)||0;return(L==null?void 0:L.orientation)==="vertical"||u===0||!o.expanded?0:w-(w-(u-1)*v.HORIZONTAL_GAP)/u});t&&(t.childLineWidths=E)})},Z=(a,l,s)=>{const i=l||v.NODE_HEIGHT,e=s||v.VERTICAL_LINE;a.forEach(t=>{const n=t.level,c=(i+e)*n+v.VERTICAL_LINE*(n?n-1:0)-(e-v.VERTICAL_LINE)*(n?1:0);t.top=c})},q=(a,l,s)=>{const i=l||v.NODE_HEIGHT,e=s||v.VERTICAL_LINE;return Math.max(...a.map(n=>{const c=n.top||0,m=n.items.length,d=n.orientation==="horizontal"?i+e+e:m*(i+e);return c+d}))},R=a=>{const l={width:"100%",data:[],ariaLabel:"Org Chart",idField:"id",childrenField:"items",avatarField:"avatar",titleField:"title",subtitleField:"subtitle",expandField:"expanded",avatarType:"image",showAvatar:!0},{id:s,width:i,data:e,groupField:t,cardWidth:n,cardHeight:c,verticalLine:m,idField:d,childrenField:h,hasChildrenField:f,expandField:E,avatarField:o,titleField:u,subtitleField:L,ariaLabel:w,itemRender:_,height:W,avatarType:p,showAvatar:x}={...l,...a},O=[{items:e,level:0,hasChildren:!0,orientation:"horizontal",ids:[0],parentId:null,width:null}];C({dataByGroups:O,data:e,cardWidth:n,expandField:E,hasChildrenField:f,childrenField:h,idField:d,groupField:t}),V(O,n),F(O,h,d),Z(O,c,m);const S=q(O,c,m);return H.createElement("div",{className:"k-orgchart-container",style:{width:i,height:W||S}},O.map(r=>{const I=r.level,A=r.items,b=r.orientation;return H.createElement("div",{role:I===0?"tree":"group",id:s+"-"+I+"-"+r.ids[0],"aria-label":I===0?w:void 0,"aria-orientation":I===0?b:void 0,key:r.ids[0]+"_"+I,className:T.classNames("k-orgchart-group",`k-orgchart-level-${I}`,"k-pos-absolute",{[`k-${T.kendoThemeMaps.orientationMap[b]}`]:b}),style:{width:r.width||"100%",left:r.left,top:r.top}},A.length>0&&H.createElement("div",{role:"group",style:{width:"100%"},className:T.classNames("k-orgchart-node-container","k-justify-content-around",{[`k-${T.kendoThemeMaps.orientationMap[r.orientation]}`]:r.orientation})},A.map((g,N)=>{const k=g[h]&&g[h].length||f&&g[f],M=k||r.orientation==="vertical"&&N!==A.length-1,P=r.orientation==="vertical"&&N!==0?0:m||v.VERTICAL_LINE,D=r.childLineWidths?Math.max(...r.childLineWidths):void 0,y=g[E];return H.createElement(z.ServerOrgChartNode,{id:s+"-"+(I+1)+"-"+g[d],style:{width:D},itemRender:_,cardHeight:c,cardWidth:n,verticalLine:P,key:N,level:I,avatar:g[o],avatarType:p,showAvatar:x,title:g[u],subtitle:g[L],line:M,expanded:y,node:g,childLineWidth:k&&y&&r.orientation==="horizontal"?r.childLineWidths[N]:0,plus:k},g.text)})))}))};R.displayName="KendoServerOrgChart";exports.ServerOrgChart=R;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),T=require("@progress/kendo-react-common"),z=require("./ServerOrgChartNode.js"),v=require("../utils/consts.js");function G(a){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const s in a)if(s!=="default"){const i=Object.getOwnPropertyDescriptor(a,s);Object.defineProperty(l,s,i.get?i:{enumerable:!0,get:()=>a[s]})}}return l.default=a,Object.freeze(l)}const H=G(j),C=({dataByGroups:a,data:l=[],cardWidth:s,childrenField:i,idField:e,expandField:t,hasChildrenField:n,groupField:r,level:m=1,parentId:d=0})=>{l.forEach(h=>{const f=h[i];if(h[t]&&f&&f.length){const o=f.some(w=>w[i]&&w[i].length||n&&w[n]),u=o?"horizontal":"vertical",L=o?null:s;a.push({ids:[h[e]],items:f,level:m,parentId:d,hasChildren:o,orientation:u,width:L}),C({dataByGroups:a,data:h[i],childrenField:i,cardWidth:s,idField:e,expandField:t,hasChildrenField:n,groupField:r,level:m+1,parentId:h[e]})}})},V=(a,l)=>{const s=l||v.NODE_WIDTH,i=a.sort((e,t)=>t.level-e.level);i.forEach(e=>{if(!e.width){const t=i.filter(d=>e.ids.includes(d.parentId)),n=t.length?Math.max(...t.map(d=>d.width||0)):s,r=e.orientation==="horizontal"?e.items.length:1,m=n*r+v.HORIZONTAL_GAP*(r-1);e.width=m}})},F=(a,l,s)=>{const i=a.sort((e,t)=>e.level-t.level);i.forEach(e=>{if(e.level===0)return;const t=i.find(o=>o.ids.includes(e.parentId)),n=(t==null?void 0:t.items.findIndex(o=>e.ids.includes(o[s])))||0,r=(t==null?void 0:t.items)||[],m=t.width?(t.width-(r.length-1)*v.HORIZONTAL_GAP)/r.length:0;if(!e.left){let o=(t==null?void 0:t.left)||0;r.forEach((u,L)=>{L<n&&(o+=m+v.HORIZONTAL_GAP)}),e.left=o}const d=(t==null?void 0:t.width)||0,h=(t==null?void 0:t.items.length)||1,f=(d-(h-1)*v.HORIZONTAL_GAP)/h;e.width=f;const E=t==null?void 0:t.items.map(o=>{const u=o[l]?o[l].length:0,L=i.find(_=>_.ids.includes(o[s])),w=(L==null?void 0:L.width)||0;return(L==null?void 0:L.orientation)==="vertical"||u===0||!o.expanded?0:w-(w-(u-1)*v.HORIZONTAL_GAP)/u});t&&(t.childLineWidths=E)})},Z=(a,l,s)=>{const i=l||v.NODE_HEIGHT,e=s||v.VERTICAL_LINE;a.forEach(t=>{const n=t.level,r=(i+e)*n+v.VERTICAL_LINE*(n?n-1:0)-(e-v.VERTICAL_LINE)*(n?1:0);t.top=r})},q=(a,l,s)=>{const i=l||v.NODE_HEIGHT,e=s||v.VERTICAL_LINE;return Math.max(...a.map(n=>{const r=n.top||0,m=n.items.length,d=n.orientation==="horizontal"?i+e+e:m*(i+e);return r+d}))},R=a=>{const l={width:"100%",data:[],ariaLabel:"Org Chart",idField:"id",childrenField:"items",avatarField:"avatar",titleField:"title",subtitleField:"subtitle",expandField:"expanded",avatarType:"image",showAvatar:!0},{id:s,width:i,data:e,groupField:t,cardWidth:n,cardHeight:r,verticalLine:m,idField:d,childrenField:h,hasChildrenField:f,expandField:E,avatarField:o,titleField:u,subtitleField:L,ariaLabel:w,itemRender:_,height:W,avatarType:p,showAvatar:x}={...l,...a},O=[{items:e,level:0,hasChildren:!0,orientation:"horizontal",ids:[0],parentId:null,width:null}];C({dataByGroups:O,data:e,cardWidth:n,expandField:E,hasChildrenField:f,childrenField:h,idField:d,groupField:t}),V(O,n),F(O,h,d),Z(O,r,m);const S=q(O,r,m);return H.createElement("div",{className:"k-orgchart-container",style:{width:i,height:W||S}},O.map(c=>{const I=c.level,A=c.items,b=c.orientation;return H.createElement("div",{role:I===0?"tree":"group",id:s+"-"+I+"-"+c.ids[0],"aria-label":I===0?w:void 0,"aria-orientation":I===0?b:void 0,key:c.ids[0]+"_"+I,className:T.classNames("k-orgchart-group",`k-orgchart-level-${I}`,"k-pos-absolute",{[`k-${T.kendoThemeMaps.orientationMap[b]}`]:b}),style:{width:c.width||"100%",left:c.left,top:c.top}},A.length>0&&H.createElement("div",{role:"group",style:{width:"100%"},className:T.classNames("k-orgchart-node-container","k-justify-content-around",{[`k-${T.kendoThemeMaps.orientationMap[c.orientation]}`]:c.orientation})},A.map((g,N)=>{const k=g[h]&&g[h].length||f&&g[f],M=k||c.orientation==="vertical"&&N!==A.length-1,P=c.orientation==="vertical"&&N!==0?0:m||v.VERTICAL_LINE,D=c.childLineWidths?Math.max(...c.childLineWidths):void 0,y=g[E];return H.createElement(z.ServerOrgChartNode,{id:s+"-"+(I+1)+"-"+g[d],style:{width:D},itemRender:_,cardHeight:r,cardWidth:n,verticalLine:P,key:N,level:I,avatar:g[o],avatarType:p,showAvatar:x,title:g[u],subtitle:g[L],line:M,expanded:y,node:g,childLineWidth:k&&y&&c.orientation==="horizontal"?c.childLineWidths[N]:0,plus:k},g.text)})))}))};R.displayName="KendoServerOrgChart";exports.ServerOrgChart=R;
@@ -5,13 +5,12 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import * as N from "react";
10
9
  import { classNames as O, kendoThemeMaps as b } from "@progress/kendo-react-common";
11
10
  import { ServerOrgChartNode as P } from "./ServerOrgChartNode.mjs";
12
11
  import { VERTICAL_LINE as H, HORIZONTAL_GAP as x, NODE_WIDTH as V, NODE_HEIGHT as M } from "../utils/consts.mjs";
13
12
  const R = ({
14
- dataByGroups: d,
13
+ dataByGroups: c,
15
14
  data: r = [],
16
15
  cardWidth: l,
17
16
  childrenField: n,
@@ -22,14 +21,14 @@ const R = ({
22
21
  level: m = 1,
23
22
  parentId: h = 0
24
23
  }) => {
25
- r.forEach((c) => {
26
- const f = c[n];
27
- if (c[t] && f && f.length) {
24
+ r.forEach((d) => {
25
+ const f = d[n];
26
+ if (d[t] && f && f.length) {
28
27
  const s = f.some(
29
28
  (g) => g[n] && g[n].length || i && g[i]
30
29
  ), L = s ? "horizontal" : "vertical", v = s ? null : l;
31
- d.push({
32
- ids: [c[e]],
30
+ c.push({
31
+ ids: [d[e]],
33
32
  items: f,
34
33
  level: m,
35
34
  parentId: h,
@@ -37,8 +36,8 @@ const R = ({
37
36
  orientation: L,
38
37
  width: v
39
38
  }), R({
40
- dataByGroups: d,
41
- data: c[n],
39
+ dataByGroups: c,
40
+ data: d[n],
42
41
  childrenField: n,
43
42
  cardWidth: l,
44
43
  idField: e,
@@ -46,12 +45,12 @@ const R = ({
46
45
  hasChildrenField: i,
47
46
  groupField: a,
48
47
  level: m + 1,
49
- parentId: c[e]
48
+ parentId: d[e]
50
49
  });
51
50
  }
52
51
  });
53
- }, j = (d, r) => {
54
- const l = r || V, n = d.sort((e, t) => t.level - e.level);
52
+ }, j = (c, r) => {
53
+ const l = r || V, n = c.sort((e, t) => t.level - e.level);
55
54
  n.forEach((e) => {
56
55
  if (!e.width) {
57
56
  const t = n.filter(
@@ -60,8 +59,8 @@ const R = ({
60
59
  e.width = m;
61
60
  }
62
61
  });
63
- }, B = (d, r, l) => {
64
- const n = d.sort((e, t) => e.level - t.level);
62
+ }, B = (c, r, l) => {
63
+ const n = c.sort((e, t) => e.level - t.level);
65
64
  n.forEach((e) => {
66
65
  if (e.level === 0)
67
66
  return;
@@ -74,29 +73,29 @@ const R = ({
74
73
  v < i && (s += m + x);
75
74
  }), e.left = s;
76
75
  }
77
- const h = (t == null ? void 0 : t.width) || 0, c = (t == null ? void 0 : t.items.length) || 1, f = (h - (c - 1) * x) / c;
76
+ const h = (t == null ? void 0 : t.width) || 0, d = (t == null ? void 0 : t.items.length) || 1, f = (h - (d - 1) * x) / d;
78
77
  e.width = f;
79
78
  const k = t == null ? void 0 : t.items.map((s) => {
80
- const L = s[r] ? s[r].length : 0, v = n.find((u) => u.ids.includes(s[l])), g = (v == null ? void 0 : v.width) || 0;
79
+ const L = s[r] ? s[r].length : 0, v = n.find((y) => y.ids.includes(s[l])), g = (v == null ? void 0 : v.width) || 0;
81
80
  return (v == null ? void 0 : v.orientation) === "vertical" || L === 0 || !s.expanded ? 0 : g - (g - (L - 1) * x) / L;
82
81
  });
83
82
  t && (t.childLineWidths = k);
84
83
  });
85
- }, G = (d, r, l) => {
84
+ }, G = (c, r, l) => {
86
85
  const n = r || M, e = l || H;
87
- d.forEach((t) => {
86
+ c.forEach((t) => {
88
87
  const i = t.level, a = (n + e) * i + H * (i ? i - 1 : 0) - (e - H) * (i ? 1 : 0);
89
88
  t.top = a;
90
89
  });
91
- }, K = (d, r, l) => {
90
+ }, K = (c, r, l) => {
92
91
  const n = r || M, e = l || H;
93
92
  return Math.max(
94
- ...d.map((i) => {
93
+ ...c.map((i) => {
95
94
  const a = i.top || 0, m = i.items.length, h = i.orientation === "horizontal" ? n + e + e : m * (n + e);
96
95
  return a + h;
97
96
  })
98
97
  );
99
- }, Z = (d) => {
98
+ }, Z = (c) => {
100
99
  const r = {
101
100
  width: "100%",
102
101
  data: [],
@@ -118,18 +117,18 @@ const R = ({
118
117
  cardHeight: a,
119
118
  verticalLine: m,
120
119
  idField: h,
121
- childrenField: c,
120
+ childrenField: d,
122
121
  hasChildrenField: f,
123
122
  expandField: k,
124
123
  avatarField: s,
125
124
  titleField: L,
126
125
  subtitleField: v,
127
126
  ariaLabel: g,
128
- itemRender: u,
127
+ itemRender: y,
129
128
  height: _,
130
129
  avatarType: z,
131
130
  showAvatar: A
132
- } = { ...r, ...d }, E = [
131
+ } = { ...r, ...c }, E = [
133
132
  {
134
133
  items: e,
135
134
  level: 0,
@@ -146,20 +145,20 @@ const R = ({
146
145
  cardWidth: i,
147
146
  expandField: k,
148
147
  hasChildrenField: f,
149
- childrenField: c,
148
+ childrenField: d,
150
149
  idField: h,
151
150
  groupField: t
152
- }), j(E, i), B(E, c, h), G(E, a, m);
151
+ }), j(E, i), B(E, d, h), G(E, a, m);
153
152
  const D = K(E, a, m);
154
153
  return /* @__PURE__ */ N.createElement("div", { className: "k-orgchart-container", style: { width: n, height: _ || D } }, E.map((o) => {
155
- const W = o.level, y = o.items, T = o.orientation;
154
+ const W = o.level, T = o.items, p = o.orientation;
156
155
  return /* @__PURE__ */ N.createElement(
157
156
  "div",
158
157
  {
159
158
  role: W === 0 ? "tree" : "group",
160
159
  id: l + "-" + W + "-" + o.ids[0],
161
160
  "aria-label": W === 0 ? g : void 0,
162
- "aria-orientation": W === 0 ? T : void 0,
161
+ "aria-orientation": W === 0 ? p : void 0,
163
162
  key: o.ids[0] + "_" + W,
164
163
  className: O(
165
164
  "k-orgchart-group",
@@ -167,7 +166,7 @@ const R = ({
167
166
  `k-orgchart-level-${W}`,
168
167
  "k-pos-absolute",
169
168
  {
170
- [`k-${b.orientationMap[T]}`]: T
169
+ [`k-${b.orientationMap[p]}`]: p
171
170
  }
172
171
  ),
173
172
  style: {
@@ -176,7 +175,7 @@ const R = ({
176
175
  top: o.top
177
176
  }
178
177
  },
179
- y.length > 0 && /* @__PURE__ */ N.createElement(
178
+ T.length > 0 && /* @__PURE__ */ N.createElement(
180
179
  "div",
181
180
  {
182
181
  role: "group",
@@ -185,14 +184,14 @@ const R = ({
185
184
  [`k-${b.orientationMap[o.orientation]}`]: o.orientation
186
185
  })
187
186
  },
188
- y.map((w, I) => {
189
- const p = w[c] && w[c].length || f && w[f], F = p || o.orientation === "vertical" && I !== y.length - 1, S = o.orientation === "vertical" && I !== 0 ? 0 : m || H, $ = o.childLineWidths ? Math.max(...o.childLineWidths) : void 0, C = w[k];
187
+ T.map((w, I) => {
188
+ const u = w[d] && w[d].length || f && w[f], F = u || o.orientation === "vertical" && I !== T.length - 1, S = o.orientation === "vertical" && I !== 0 ? 0 : m || H, $ = o.childLineWidths ? Math.max(...o.childLineWidths) : void 0, C = w[k];
190
189
  return /* @__PURE__ */ N.createElement(
191
190
  P,
192
191
  {
193
192
  id: l + "-" + (W + 1) + "-" + w[h],
194
193
  style: { width: $ },
195
- itemRender: u,
194
+ itemRender: y,
196
195
  cardHeight: a,
197
196
  cardWidth: i,
198
197
  verticalLine: S,
@@ -206,8 +205,8 @@ const R = ({
206
205
  line: F,
207
206
  expanded: C,
208
207
  node: w,
209
- childLineWidth: p && C && o.orientation === "horizontal" ? o.childLineWidths[I] : 0,
210
- plus: p
208
+ childLineWidth: u && C && o.orientation === "horizontal" ? o.childLineWidths[I] : 0,
209
+ plus: u
211
210
  },
212
211
  w.text
213
212
  );
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("react"),s=require("@progress/kendo-react-common"),C=require("../client/ExpandButton.js"),f=require("../client/OrgChartGroupContainer.js"),O=require("../utils/consts.js");function A(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const e=A(G),H="k-orgchart-node-group",T="k-orgchart-node-group-title",k="k-orgchart-node-group-subtitle",L=t=>{const n={orientation:"horizontal"},{id:r,title:a,subtitle:u,line:S,plus:d,focus:P,level:o,verticalLine:v,childLineWidth:g,orientation:l,expanded:c,nodes:i,groupTitleHeight:N,groupSubtitleHeight:R,groupTitleRender:_,groupSubtitleRender:y,...b}={...n,...t},m=_,h=y,p={height:N||O.GROUP_TITLE_HEIGHT},E={height:R||O.GROUP_SUBTITLE_HEIGHT};return e.createElement("div",{...b,className:s.classNames(t.className,H,"k-vstack","k-align-items-center")},o!==0&&e.createElement("div",{className:"k-orgchart-line k-orgchart-line-v k-orgchart-line-v-top",style:{height:v}}),e.createElement(f.OrgChartGroupContainer,{nodes:i,"aria-expanded":!!c,"aria-keyshortcuts":"Enter","aria-level":o+1,"aria-owns":r},m?e.createElement(m,{style:p,className:T,title:a,items:i,level:o,expanded:c}):e.createElement("div",{className:T,style:p},a),h?e.createElement(h,{style:E,className:k,subtitle:u,items:i,level:o,expanded:c}):e.createElement("div",{className:k,style:E},u),e.createElement("div",{role:"group",style:{width:"100%"},className:s.classNames("k-orgchart-node-container",{[`k-${s.kendoThemeMaps.orientationMap[l]||l}`]:l})},t.children)),S&&e.createElement("div",{className:"k-orgchart-line k-orgchart-line-v"}),d&&e.createElement(C.ExpandButton,{expanded:c,nodes:i}),d&&!!g&&e.createElement("div",{className:"k-orgchart-line k-orgchart-line-h",style:{width:g,marginTop:-15}}))};exports.ServerOrgChartGroup=L;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("react"),s=require("@progress/kendo-react-common"),C=require("../client/ExpandButton.js"),f=require("../client/OrgChartGroupContainer.js"),O=require("../utils/consts.js");function A(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const e=A(G),H="k-orgchart-node-group",T="k-orgchart-node-group-title",k="k-orgchart-node-group-subtitle",L=t=>{const n={orientation:"horizontal"},{id:r,title:a,subtitle:u,line:S,plus:d,focus:P,level:o,verticalLine:v,childLineWidth:g,orientation:l,expanded:c,nodes:i,groupTitleHeight:N,groupSubtitleHeight:R,groupTitleRender:_,groupSubtitleRender:y,...b}={...n,...t},m=_,h=y,p={height:N||O.GROUP_TITLE_HEIGHT},E={height:R||O.GROUP_SUBTITLE_HEIGHT};return e.createElement("div",{...b,className:s.classNames(t.className,H,"k-vstack","k-align-items-center")},o!==0&&e.createElement("div",{className:"k-orgchart-line k-orgchart-line-v k-orgchart-line-v-top",style:{height:v}}),e.createElement(f.OrgChartGroupContainer,{nodes:i,"aria-expanded":!!c,"aria-keyshortcuts":"Enter","aria-level":o+1,"aria-owns":r},m?e.createElement(m,{style:p,className:T,title:a,items:i,level:o,expanded:c}):e.createElement("div",{className:T,style:p},a),h?e.createElement(h,{style:E,className:k,subtitle:u,items:i,level:o,expanded:c}):e.createElement("div",{className:k,style:E},u),e.createElement("div",{role:"group",style:{width:"100%"},className:s.classNames("k-orgchart-node-container",{[`k-${s.kendoThemeMaps.orientationMap[l]||l}`]:l})},t.children)),S&&e.createElement("div",{className:"k-orgchart-line k-orgchart-line-v"}),d&&e.createElement(C.ExpandButton,{expanded:c,nodes:i}),d&&!!g&&e.createElement("div",{className:"k-orgchart-line k-orgchart-line-h",style:{width:g,marginTop:-15}}))};exports.ServerOrgChartGroup=L;
@@ -5,13 +5,12 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import * as e from "react";
10
9
  import { classNames as E, kendoThemeMaps as y } from "@progress/kendo-react-common";
11
10
  import { ExpandButton as A } from "../client/ExpandButton.mjs";
12
11
  import { OrgChartGroupContainer as C } from "../client/OrgChartGroupContainer.mjs";
13
12
  import { GROUP_TITLE_HEIGHT as H, GROUP_SUBTITLE_HEIGHT as L } from "../utils/consts.mjs";
14
- const f = "k-orgchart-node-group", u = "k-orgchart-node-group-title", p = "k-orgchart-node-group-subtitle", x = (i) => {
13
+ const f = "k-orgchart-node-group", u = "k-orgchart-node-group-title", p = "k-orgchart-node-group-subtitle", x = (o) => {
15
14
  const T = {
16
15
  orientation: "horizontal"
17
16
  }, {
@@ -24,7 +23,7 @@ const f = "k-orgchart-node-group", u = "k-orgchart-node-group-title", p = "k-org
24
23
  level: t,
25
24
  verticalLine: R,
26
25
  childLineWidth: c,
27
- orientation: o,
26
+ orientation: i,
28
27
  expanded: r,
29
28
  nodes: a,
30
29
  groupTitleHeight: v,
@@ -32,12 +31,12 @@ const f = "k-orgchart-node-group", u = "k-orgchart-node-group-title", p = "k-org
32
31
  groupTitleRender: _,
33
32
  groupSubtitleRender: G,
34
33
  ...O
35
- } = { ...T, ...i }, m = _, h = G, d = { height: v || H }, g = { height: S || L };
34
+ } = { ...T, ...o }, m = _, h = G, d = { height: v || H }, g = { height: S || L };
36
35
  return /* @__PURE__ */ e.createElement(
37
36
  "div",
38
37
  {
39
38
  ...O,
40
- className: E(i.className, f, "k-vstack", "k-align-items-center")
39
+ className: E(o.className, f, "k-vstack", "k-align-items-center")
41
40
  },
42
41
  t !== 0 && /* @__PURE__ */ e.createElement(
43
42
  "div",
@@ -83,10 +82,10 @@ const f = "k-orgchart-node-group", u = "k-orgchart-node-group-title", p = "k-org
83
82
  role: "group",
84
83
  style: { width: "100%" },
85
84
  className: E("k-orgchart-node-container", {
86
- [`k-${y.orientationMap[o] || o}`]: o
85
+ [`k-${y.orientationMap[i] || i}`]: i
87
86
  })
88
87
  },
89
- i.children
88
+ o.children
90
89
  )
91
90
  ),
92
91
  N && /* @__PURE__ */ e.createElement("div", { className: "k-orgchart-line k-orgchart-line-v" }),
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),b=require("@progress/kendo-react-common"),i=require("@progress/kendo-react-layout"),R=require("../client/ExpandButton.js"),S=require("../client/OrgChartCard.js"),T=require("../client/OrgChartCardBody.js");function q(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=q(f),w="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,showAvatar:y,...O}={...r,...t},h=N;return e.createElement("div",{...O,className:b.classNames(t.className,w,"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(S.OrgChartCard,{node:s,style:{width:p,height:v},"aria-level":n+1,"aria-expanded":!!l,"aria-owns":a},e.createElement(T.OrgChartCardBody,{level:n},h?e.createElement(h,{item:s,title:c,subtitle:o,level:n,expanded:l,color:E}):e.createElement(e.Fragment,null,y&&e.createElement(i.Avatar,{type:u,themeColor:"secondary"},u==="image"?e.createElement("img",{src:g,alt:"KendoReact Avatar Customer"}):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(R.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;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),b=require("@progress/kendo-react-common"),i=require("@progress/kendo-react-layout"),R=require("../client/ExpandButton.js"),S=require("../client/OrgChartCard.js"),T=require("../client/OrgChartCardBody.js");function q(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=q(f),w="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,showAvatar:y,...O}={...r,...t},h=N;return e.createElement("div",{...O,className:b.classNames(t.className,w,"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(S.OrgChartCard,{node:s,style:{width:p,height:v},"aria-level":n+1,"aria-expanded":!!l,"aria-owns":a},e.createElement(T.OrgChartCardBody,{level:n},h?e.createElement(h,{item:s,title:c,subtitle:o,level:n,expanded:l,color:E}):e.createElement(e.Fragment,null,y&&e.createElement(i.Avatar,{type:u,themeColor:"secondary"},u==="image"?e.createElement("img",{src:g,alt:"KendoReact Avatar Customer"}):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(R.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;
@@ -5,7 +5,6 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import * as e from "react";
10
9
  import { classNames as f } from "@progress/kendo-react-common";
11
10
  import { Avatar as x, CardTitle as A, CardSubtitle as R } from "@progress/kendo-react-layout";
@@ -20,16 +19,16 @@ const S = "k-orgchart-node", D = (l) => {
20
19
  title: c,
21
20
  subtitle: i,
22
21
  level: t,
23
- childLineWidth: n,
22
+ childLineWidth: m,
24
23
  cardWidth: g,
25
24
  cardHeight: v,
26
25
  verticalLine: E,
27
26
  color: k,
28
27
  line: N,
29
- plus: s,
28
+ plus: n,
30
29
  expanded: a,
31
30
  node: r,
32
- avatar: m,
31
+ avatar: s,
33
32
  avatarType: o,
34
33
  itemRender: C,
35
34
  showAvatar: u,
@@ -67,11 +66,11 @@ const S = "k-orgchart-node", D = (l) => {
67
66
  expanded: a,
68
67
  color: k
69
68
  }
70
- ) : /* @__PURE__ */ e.createElement(e.Fragment, null, u && /* @__PURE__ */ e.createElement(x, { type: o, themeColor: "secondary" }, o === "image" ? /* @__PURE__ */ e.createElement("img", { src: m, alt: "KendoReact Avatar Customer" }) : m), /* @__PURE__ */ e.createElement("div", { className: "k-card-title-wrap k-vstack" }, /* @__PURE__ */ e.createElement(A, { 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" })))
69
+ ) : /* @__PURE__ */ e.createElement(e.Fragment, null, u && /* @__PURE__ */ e.createElement(x, { type: o, themeColor: "secondary" }, o === "image" ? /* @__PURE__ */ e.createElement("img", { src: s, alt: "KendoReact Avatar Customer" }) : s), /* @__PURE__ */ e.createElement("div", { className: "k-card-title-wrap k-vstack" }, /* @__PURE__ */ e.createElement(A, { 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" })))
71
70
  ),
72
71
  N && /* @__PURE__ */ e.createElement("div", { className: "k-orgchart-line k-orgchart-line-v" }),
73
- s && /* @__PURE__ */ e.createElement(w, { expanded: a, node: r }),
74
- s && !!n && /* @__PURE__ */ e.createElement("div", { className: "k-orgchart-line k-orgchart-line-h", style: { width: n, marginTop: -15 } })
72
+ n && /* @__PURE__ */ e.createElement(w, { expanded: a, node: r }),
73
+ n && !!m && /* @__PURE__ */ e.createElement("div", { className: "k-orgchart-line k-orgchart-line-h", style: { width: m, marginTop: -15 } })
75
74
  );
76
75
  };
77
76
  export {
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
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=`
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=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
9
  <div class="k-var--series-a"></div>
10
10
  <div class="k-var--series-b"></div>
11
11
  <div class="k-var--series-c"></div>
@@ -18,4 +18,4 @@
18
18
  <div class="k-var--series">
19
19
  ${m()}
20
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;
21
+ `;class k{getSeriesColors(){const e=this.element,r=[].slice.call(e.querySelectorAll(".k-var--series div")),t=a(e.querySelector(".k-var--series-unset"));return r.reduce((o,l)=>{const c=v(l.className),n=a(l);return n!==t&&(o[c]=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;
@@ -5,7 +5,6 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  const c = (s) => window.getComputedStyle(s).backgroundColor, d = (s) => s.toLowerCase().charCodeAt(0) - 97, v = (s) => {
10
9
  const e = s.match(/series-([a-z])$/);
11
10
  if (e !== null)
package/utils/consts.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
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;
8
+ "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,N=40,e=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=e;exports.HORIZONTAL_GAP=c;exports.NODE_HEIGHT=t;exports.NODE_WIDTH=H;exports.ORGCHART_CLASSNAME=L;exports.SELECT_FIELD=_;exports.VERTICAL_LINE=N;
package/utils/consts.mjs CHANGED
@@ -5,8 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
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;
8
+ const E = "expanded", c = "items", t = "selected", I = "checked", n = "checkIndeterminate", _ = "k-orgchart", o = 80, s = 300, T = 25, e = 40, D = 20, L = 20, H = 82;
10
9
  export {
11
10
  I as CHECK_FIELD,
12
11
  n as CHECK_INDETERMINATE_FIELD,
@@ -15,10 +14,10 @@ export {
15
14
  H as GROUP_PADDINGS,
16
15
  L as GROUP_SUBTITLE_HEIGHT,
17
16
  D as GROUP_TITLE_HEIGHT,
18
- o as HORIZONTAL_GAP,
19
- _ as NODE_HEIGHT,
20
- e as NODE_WIDTH,
21
- s as ORGCHART_CLASSNAME,
17
+ T as HORIZONTAL_GAP,
18
+ o as NODE_HEIGHT,
19
+ s as NODE_WIDTH,
20
+ _ as ORGCHART_CLASSNAME,
22
21
  t as SELECT_FIELD,
23
- T as VERTICAL_LINE
22
+ e as VERTICAL_LINE
24
23
  };