@progress/kendo-vue-data-tools 7.0.3-develop.1 → 7.1.0-develop.2

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.
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2025 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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=o=>{var n,r;return{enabled:typeof o=="boolean"?o:(n=o==null?void 0:o.enabled)!=null?n:!0,mode:typeof o=="boolean"?"incell":(r=o==null?void 0:o.mode)!=null?r:"incell"}};exports.getEditableOptions=c;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ const r = (o) => {
9
+ var n, p;
10
+ return {
11
+ enabled: typeof o == "boolean" ? o : (n = o == null ? void 0 : o.enabled) != null ? n : !0,
12
+ mode: typeof o == "boolean" ? "incell" : (p = o == null ? void 0 : o.mode) != null ? p : "incell"
13
+ };
14
+ };
15
+ export {
16
+ r as getEditableOptions
17
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2025 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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var N=(e=>(e.TOGGLE="GROUP-EXPAND_TOGGLE",e.EXPAND="GROUP-EXPAND_EXPAND",e.COLLAPSE="GROUP-EXPAND_COLLAPSE",e.RESET="GROUP-EXPAND_RESET",e))(N||{});const U=e=>{var r;return{enabled:typeof e=="boolean"?e:(r=e==null?void 0:e.enabled)!=null?r:!0,defaultExpand:typeof e=="object"?e==null?void 0:e.defaultExpand:!0}},i=(e=[],r=null)=>{const u=[];return e==null||e.forEach(d=>{var a;const l={value:d.value,field:d.field,parents:r?[r,...(a=r.parents)!=null?a:[]]:[]};d.expanded!==void 0&&(l.expanded=d.expanded),d.groups&&u.push(...i(d.groups,l)),u.push(l)}),u},x=e=>{var r,u,d,l;return`${(r=e.parents)!=null&&r.length?((l=(d=(u=e.parents)==null?void 0:u.slice())==null?void 0:d.reverse())==null?void 0:l.map(a=>x({field:a.field,value:a.value})).join("/"))+"/":""}${e.field}:${e.value}`},w=(e,r)=>{const u=i(e);return g(u,r)},j=(e,r)=>{var l;const u=i(e),d=g(u,r);return d?(l=d.expanded)!=null?l:!0:!1},v=e=>{var l;const r=new Map;r.set("root",{value:null,field:"",groups:new Set}),(a=>{a.forEach(s=>{var o,P,h,G;const c=x(s),n=(o=r.get(c))!=null?o:{value:s.value,field:s.field};s.expanded!==void 0&&(n.expanded=s.expanded),r.has(c)||r.set(c,n);let f=n;(P=s.parents)!=null&&P.length?s.parents.forEach((p,O)=>{var A,L,R,S,T,D,X;const E=x({value:p.value,field:p.field,parents:(L=s.parents)==null?void 0:L.slice(O+1,(A=s==null?void 0:s.parents)==null?void 0:A.length)}),t=(R=r.get(E))!=null?R:{value:p.value,field:p.field};p.expanded&&(t.expanded=p.expanded),r.has(E)||r.set(E,t),t!=null&&t.groups||(t.groups=new Set),t.groups.add(f),f=t,O===((T=(S=s.parents)==null?void 0:S.length)!=null?T:-1)-1&&((X=(D=r.get("root"))==null?void 0:D.groups)==null||X.add(t))}):(G=(h=r.get("root"))==null?void 0:h.groups)==null||G.add(f)})})(e);const d=a=>{a.groups&&(a.groups=Array.from(a.groups),a.groups.forEach(d))};return d(r.get("root")),((l=r.get("root"))==null?void 0:l.groups)||[]},F=(e,r)=>{var u;return!!((u=r.parents)!=null&&u.every((d,l)=>{var a;return(a=e.parents)==null?void 0:a.find(s=>d.value===s.value&&d.field===s.field)}))},g=(e,r)=>e.find(d=>d.value===r.value&&d.field===r.field&&F(d,r)),_=(e,r,u)=>{var a,s,c;const d=i(e!=null?e:[]),l=g(d,r.group);switch(r.type){case"GROUP-EXPAND_TOGGLE":return v(l?d==null?void 0:d.map(n=>{var f,o;return n===l?{...n,expanded:!((o=(f=n.expanded)!=null?f:u==null?void 0:u.defaultExpand)==null||o)}:n}):[...d,{...r.group,expanded:!((a=u==null?void 0:u.defaultExpand)==null||a)}]);case"GROUP-EXPAND_EXPAND":{let n;return l?n=d==null?void 0:d.map(f=>f===l?{...f,expanded:!0}:f):(s=u==null?void 0:u.defaultExpand)==null||s?n=d:n=[...d,{...r.group,expanded:!0}],v(n)}case"GROUP-EXPAND_COLLAPSE":{let n;return l?n=d==null?void 0:d.map(f=>f===l?{...f,expanded:!1}:f):(c=u==null?void 0:u.defaultExpand)==null||c?n=[...d,{...r.group,expanded:!1}]:n=d,v(n)}default:return e}};exports.GROUP_EXPAND_ACTION=N;exports.findGroupExpand=w;exports.flatToTree=v;exports.getGroupExpandableOptions=U;exports.groupExpandReducer=_;exports.isExpanded=j;
@@ -0,0 +1,107 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2025 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ var w = /* @__PURE__ */ ((e) => (e.TOGGLE = "GROUP-EXPAND_TOGGLE", e.EXPAND = "GROUP-EXPAND_EXPAND", e.COLLAPSE = "GROUP-EXPAND_COLLAPSE", e.RESET = "GROUP-EXPAND_RESET", e))(w || {});
9
+ const U = (e) => {
10
+ var r;
11
+ return {
12
+ enabled: typeof e == "boolean" ? e : (r = e == null ? void 0 : e.enabled) != null ? r : !0,
13
+ defaultExpand: typeof e == "object" ? e == null ? void 0 : e.defaultExpand : !0
14
+ };
15
+ }, E = (e = [], r = null) => {
16
+ const u = [];
17
+ return e == null || e.forEach((d) => {
18
+ var s;
19
+ const l = {
20
+ value: d.value,
21
+ field: d.field,
22
+ parents: r ? [r, ...(s = r.parents) != null ? s : []] : []
23
+ };
24
+ d.expanded !== void 0 && (l.expanded = d.expanded), d.groups && u.push(...E(d.groups, l)), u.push(l);
25
+ }), u;
26
+ }, h = (e) => {
27
+ var r, u, d, l;
28
+ return `${(r = e.parents) != null && r.length ? ((l = (d = (u = e.parents) == null ? void 0 : u.slice()) == null ? void 0 : d.reverse()) == null ? void 0 : l.map((s) => h({ field: s.field, value: s.value })).join("/")) + "/" : ""}${e.field}:${e.value}`;
29
+ }, F = (e, r) => {
30
+ const u = E(e);
31
+ return x(u, r);
32
+ }, $ = (e, r) => {
33
+ var l;
34
+ const u = E(e), d = x(u, r);
35
+ return d ? (l = d.expanded) != null ? l : !0 : !1;
36
+ }, o = (e) => {
37
+ var l;
38
+ const r = /* @__PURE__ */ new Map();
39
+ r.set("root", { value: null, field: "", groups: /* @__PURE__ */ new Set() }), ((s) => {
40
+ s.forEach((f) => {
41
+ var p, P, g, G;
42
+ const c = h(f), a = (p = r.get(c)) != null ? p : {
43
+ value: f.value,
44
+ field: f.field
45
+ };
46
+ f.expanded !== void 0 && (a.expanded = f.expanded), r.has(c) || r.set(c, a);
47
+ let n = a;
48
+ (P = f.parents) != null && P.length ? f.parents.forEach((v, L) => {
49
+ var A, O, D, R, S, X, T;
50
+ const i = h({
51
+ value: v.value,
52
+ field: v.field,
53
+ parents: (O = f.parents) == null ? void 0 : O.slice(L + 1, (A = f == null ? void 0 : f.parents) == null ? void 0 : A.length)
54
+ }), t = (D = r.get(i)) != null ? D : {
55
+ value: v.value,
56
+ field: v.field
57
+ };
58
+ v.expanded && (t.expanded = v.expanded), r.has(i) || r.set(i, t), t != null && t.groups || (t.groups = /* @__PURE__ */ new Set()), t.groups.add(n), n = t, L === ((S = (R = f.parents) == null ? void 0 : R.length) != null ? S : -1) - 1 && ((T = (X = r.get("root")) == null ? void 0 : X.groups) == null || T.add(t));
59
+ }) : (G = (g = r.get("root")) == null ? void 0 : g.groups) == null || G.add(n);
60
+ });
61
+ })(e);
62
+ const d = (s) => {
63
+ s.groups && (s.groups = Array.from(s.groups), s.groups.forEach(d));
64
+ };
65
+ return d(r.get("root")), ((l = r.get("root")) == null ? void 0 : l.groups) || [];
66
+ }, N = (e, r) => {
67
+ var u;
68
+ return !!((u = r.parents) != null && u.every((d, l) => {
69
+ var s;
70
+ return (s = e.parents) == null ? void 0 : s.find((f) => d.value === f.value && d.field === f.field);
71
+ }));
72
+ }, x = (e, r) => e.find((d) => d.value === r.value && d.field === r.field && N(d, r)), j = (e, r, u) => {
73
+ var s, f, c;
74
+ const d = E(e != null ? e : []), l = x(d, r.group);
75
+ switch (r.type) {
76
+ case "GROUP-EXPAND_TOGGLE":
77
+ return o(
78
+ l ? d == null ? void 0 : d.map(
79
+ (a) => {
80
+ var n, p;
81
+ return a === l ? {
82
+ ...a,
83
+ expanded: !((p = (n = a.expanded) != null ? n : u == null ? void 0 : u.defaultExpand) == null || p)
84
+ } : a;
85
+ }
86
+ ) : [...d, { ...r.group, expanded: !((s = u == null ? void 0 : u.defaultExpand) == null || s) }]
87
+ );
88
+ case "GROUP-EXPAND_EXPAND": {
89
+ let a;
90
+ return l ? a = d == null ? void 0 : d.map((n) => n === l ? { ...n, expanded: !0 } : n) : (f = u == null ? void 0 : u.defaultExpand) == null || f ? a = d : a = [...d, { ...r.group, expanded: !0 }], o(a);
91
+ }
92
+ case "GROUP-EXPAND_COLLAPSE": {
93
+ let a;
94
+ return l ? a = d == null ? void 0 : d.map((n) => n === l ? { ...n, expanded: !1 } : n) : (c = u == null ? void 0 : u.defaultExpand) == null || c ? a = [...d, { ...r.group, expanded: !1 }] : a = d, o(a);
95
+ }
96
+ default:
97
+ return e;
98
+ }
99
+ };
100
+ export {
101
+ w as GROUP_EXPAND_ACTION,
102
+ F as findGroupExpand,
103
+ o as flatToTree,
104
+ U as getGroupExpandableOptions,
105
+ j as groupExpandReducer,
106
+ $ as isExpanded
107
+ };
@@ -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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../navigation/utils.js"),c=require("../../interfaces/ColumnProps.js");function I(t,r){const i=t[r].depth;let n=null;for(let l=r+1;l<t.length;l++)if(t[l].depth===i){n=t[l];break}return n}const g=t=>{let r=t.width?parseFloat(t.width.toString()):0;return!r&&t.children&&t.children.length&&(r=t.children.reduce((i,n)=>g(n)+i,0)),r};function S(t){const r=[[]];let i=0;for(let e=t.length-1;e>=0;e--)i=Math.max(i,t[e].depth),t[e].colSpan=t[e].colSpan||1,t[e].parentIndex!==-1&&(t[t[e].parentIndex].colSpan=(t[t[e].parentIndex].colSpan||0)+t[e].colSpan);const n=[];let l=1;t.forEach((e,d)=>{r[e.depth]=r[e.depth]||[];let o=!1;r[e.depth].length===0&&(l<=1?l=1+(e.children.length>0?0:i-e.depth):(l--,o=!0)),e.rowSpan=1+(e.children.length>0?0:i-e.depth),e.kFirst=o,e.index=r[e.depth].length,r[e.depth].push(d),e.ariaColumnIndex=n[e.depth]?n[e.depth]+1:1;for(let p=e.depth;p<e.depth+e.rowSpan;p++)n[p]=(n[p]||0)+e.colSpan});let h=new Array(r.length).fill(0),a=0;t.forEach(e=>{if(e.locked)if(e.left=h[e.depth],a=g(e),e.children.length===0)for(let d=e.depth;d<h.length;d++)h[d]+=a;else h[e.depth]+=a});let f=new Array(r.length).fill(0);for(let e=t.length-1;e>=0;e--){const d=t[e];if(d.locked){if(d.right=f[d.depth],a=g(d),d.children.length===0)for(let p=d.depth;p<f.length;p++)f[p]+=a;else f[d.depth]+=a;const o=I(t,e);d.rightBorder=!(o&&o.locked)}}return r}function x(t,r,i=0){let n=[];if(!t||!t.length)return[];t.forEach(h=>{const a=x(h.children||[],r,i+1);n.push(Object.assign({},{depth:i},c.ColumnDefaultProps,h,{id:h.id?h.id:s.generateNavigatableId(`${r.prevId++}`,r.idPrefix,"column"),declarationIndex:n.length,children:a,rowSpan:0,colSpan:0,isAccessible:!0}))});const l=(h,a)=>h.orderIndex===a.orderIndex?h.declarationIndex-a.declarationIndex:(h.orderIndex||0)-(a.orderIndex||0);if(n.sort(l),i===0){let h=[];const a=(f,e)=>f.forEach(d=>{d.parentIndex=e,a(d.children,h.push(d)-1)});return a(n,-1),h}return n}function w(t){return!!(t&&getComputedStyle(t).direction==="rtl")}function C(t,r){if(!r||!t||!t.originalEvent)return-1;let i=r.ownerDocument?r.ownerDocument.elementFromPoint(t.clientX,t.originalEvent.clientY):null;for(;i&&i.parentElement!==r;)i=i.parentElement;const n=r.children;for(let l=0;l<n.length;l++)if(n[l]===i)return l;return-1}exports.getIndex=C;exports.isRtl=w;exports.mapColumns=S;exports.readColumns=x;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../../navigation/utils.js"),w=require("../../interfaces/ColumnProps.js");function p(t,n){const d=t[n].depth;let i=null;for(let h=n+1;h<t.length;h++)if(t[h].depth===d){i=t[h];break}return i}const f=t=>{let n=t.width?parseFloat(t.width.toString()):0;return!n&&t.children&&t.children.length&&(n=t.children.reduce((d,i)=>f(i)+d,0)),n};function S(t,n){const d=[[]];let i=0;for(let e=t.length-1;e>=0;e--)i=Math.max(i,t[e].depth),t[e].colSpan=t[e].colSpan||1,t[e].children.length>0&&(t[e].colSpan=t[e].children.reduce((l,a)=>a.hidden?l:l+a.colSpan,0));const h=[];let r=1;return t.forEach((e,l)=>{d[e.depth]=d[e.depth]||[];let a=!1;d[e.depth].length===0&&(r<=1?r=1+(e.children.length>0?0:i-e.depth):(r--,a=!0)),e.rowSpan=1+(e.children.length>0?0:i-e.depth),e.kFirst=a,e.index=d[e.depth].length,d[e.depth].push(l),e.ariaColumnIndex=h[e.depth]?h[e.depth]+1:1;for(let o=e.depth;o<e.depth+e.rowSpan;o++)h[o]=(h[o]||0)+e.colSpan}),g(d,t,n),c(d,t,n),d}function g(t,n,d){const i=new Array(t.length).fill(0);let h=0;n.forEach(r=>{if(r.locked&&(!r.left||d))if(r.left=i[r.depth],h=f(r),r.children.length===0)for(let e=r.depth;e<i.length;e++)i[e]+=h;else i[r.depth]+=h})}function c(t,n,d){let i=0;const h=new Array(t.length).fill(0);for(let r=n.length-1;r>=0;r--){const e=n[r];if(e.locked&&(!e.right||d)){if(e.right=h[e.depth],i=f(e),e.children.length===0)for(let a=e.depth;a<h.length;a++)h[a]+=i;else h[e.depth]+=i;const l=p(n,r);e.rightBorder=!(l&&l.locked)}}}function s(t,n,d=0){const i=[];if(!t||!t.length)return[];t.forEach(r=>{const e=s(r.children||[],n,d+1);i.push({depth:d,...w.ColumnDefaultProps,...r,id:r.id?r.id:x.generateNavigatableId(`${n.prevId++}`,n.idPrefix,"column"),declarationIndex:i.length,children:e,rowSpan:0,colSpan:0,isAccessible:!0})});const h=(r,e)=>r.orderIndex===e.orderIndex?r.declarationIndex-e.declarationIndex:(r.orderIndex||0)-(e.orderIndex||0);if(i.sort(h),d===0){const r=[],e=(l,a)=>l.forEach(o=>{o.parentIndex=a,e(o.children,r.push(o)-1)});return e(i,-1),r}return i}function y(t){return!!(t&&getComputedStyle(t).direction==="rtl")}function I(t,n){if(!n||!t||!t.originalEvent)return-1;const d={x:t.clientX,y:t.originalEvent.clientY};let i=n.ownerDocument?n.ownerDocument.elementFromPoint(d.x,d.y):null;for(;i&&i.parentElement!==n;)i=i.parentElement;if(!i&&n.matches("tr")){const r=e=>{const l=e.getBoundingClientRect();return d.x>l.left&&d.x<l.left+l.width&&d.y>l.top&&d.y<l.top+l.height};i=Array.from(n.children).find(r)||null}const h=n.children;for(let r=0;r<h.length;r++)if(h[r]===i)return r;return-1}exports.getIndex=I;exports.isRtl=y;exports.mapColumns=S;exports.nextColumn=p;exports.readColumns=s;exports.updateLeft=g;exports.updateRight=c;
@@ -5,111 +5,126 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { generateNavigatableId as x } from "../../navigation/utils.mjs";
9
- import { ColumnDefaultProps as I } from "../../interfaces/ColumnProps.mjs";
10
- function w(t, r) {
11
- const i = t[r].depth;
12
- let d = null;
13
- for (let l = r + 1; l < t.length; l++)
14
- if (t[l].depth === i) {
15
- d = t[l];
8
+ import { generateNavigatableId as p } from "../../navigation/utils.mjs";
9
+ import { ColumnDefaultProps as g } from "../../interfaces/ColumnProps.mjs";
10
+ function c(t, n) {
11
+ const d = t[n].depth;
12
+ let i = null;
13
+ for (let h = n + 1; h < t.length; h++)
14
+ if (t[h].depth === d) {
15
+ i = t[h];
16
16
  break;
17
17
  }
18
- return d;
18
+ return i;
19
19
  }
20
20
  const o = (t) => {
21
- let r = t.width ? parseFloat(t.width.toString()) : 0;
22
- return !r && t.children && t.children.length && (r = t.children.reduce((i, d) => o(d) + i, 0)), r;
21
+ let n = t.width ? parseFloat(t.width.toString()) : 0;
22
+ return !n && t.children && t.children.length && (n = t.children.reduce((d, i) => o(i) + d, 0)), n;
23
23
  };
24
- function E(t) {
25
- const r = [[]];
24
+ function I(t, n) {
25
+ const d = [[]];
26
26
  let i = 0;
27
27
  for (let e = t.length - 1; e >= 0; e--)
28
- i = Math.max(i, t[e].depth), t[e].colSpan = t[e].colSpan || 1, t[e].parentIndex !== -1 && (t[t[e].parentIndex].colSpan = (t[t[e].parentIndex].colSpan || 0) + t[e].colSpan);
29
- const d = [];
30
- let l = 1;
31
- t.forEach((e, n) => {
32
- r[e.depth] = r[e.depth] || [];
33
- let g = !1;
34
- r[e.depth].length === 0 && (l <= 1 ? l = 1 + (e.children.length > 0 ? 0 : i - e.depth) : (l--, g = !0)), e.rowSpan = 1 + (e.children.length > 0 ? 0 : i - e.depth), e.kFirst = g, e.index = r[e.depth].length, r[e.depth].push(n), e.ariaColumnIndex = d[e.depth] ? d[e.depth] + 1 : 1;
35
- for (let p = e.depth; p < e.depth + e.rowSpan; p++)
36
- d[p] = (d[p] || 0) + e.colSpan;
37
- });
38
- let h = new Array(r.length).fill(0), a = 0;
39
- t.forEach((e) => {
40
- if (e.locked)
41
- if (e.left = h[e.depth], a = o(e), e.children.length === 0)
42
- for (let n = e.depth; n < h.length; n++)
43
- h[n] += a;
28
+ i = Math.max(i, t[e].depth), t[e].colSpan = t[e].colSpan || 1, t[e].children.length > 0 && (t[e].colSpan = t[e].children.reduce(
29
+ (l, f) => f.hidden ? l : l + f.colSpan,
30
+ 0
31
+ ));
32
+ const h = [];
33
+ let r = 1;
34
+ return t.forEach((e, l) => {
35
+ d[e.depth] = d[e.depth] || [];
36
+ let f = !1;
37
+ d[e.depth].length === 0 && (r <= 1 ? r = 1 + (e.children.length > 0 ? 0 : i - e.depth) : (r--, f = !0)), e.rowSpan = 1 + (e.children.length > 0 ? 0 : i - e.depth), e.kFirst = f, e.index = d[e.depth].length, d[e.depth].push(l), e.ariaColumnIndex = h[e.depth] ? h[e.depth] + 1 : 1;
38
+ for (let a = e.depth; a < e.depth + e.rowSpan; a++)
39
+ h[a] = (h[a] || 0) + e.colSpan;
40
+ }), x(d, t, n), s(d, t, n), d;
41
+ }
42
+ function x(t, n, d) {
43
+ const i = new Array(t.length).fill(0);
44
+ let h = 0;
45
+ n.forEach((r) => {
46
+ if (r.locked && (!r.left || d))
47
+ if (r.left = i[r.depth], h = o(r), r.children.length === 0)
48
+ for (let e = r.depth; e < i.length; e++)
49
+ i[e] += h;
44
50
  else
45
- h[e.depth] += a;
51
+ i[r.depth] += h;
46
52
  });
47
- let f = new Array(r.length).fill(0);
48
- for (let e = t.length - 1; e >= 0; e--) {
49
- const n = t[e];
50
- if (n.locked) {
51
- if (n.right = f[n.depth], a = o(n), n.children.length === 0)
52
- for (let p = n.depth; p < f.length; p++)
53
- f[p] += a;
53
+ }
54
+ function s(t, n, d) {
55
+ let i = 0;
56
+ const h = new Array(t.length).fill(0);
57
+ for (let r = n.length - 1; r >= 0; r--) {
58
+ const e = n[r];
59
+ if (e.locked && (!e.right || d)) {
60
+ if (e.right = h[e.depth], i = o(e), e.children.length === 0)
61
+ for (let f = e.depth; f < h.length; f++)
62
+ h[f] += i;
54
63
  else
55
- f[n.depth] += a;
56
- const g = w(t, e);
57
- n.rightBorder = !(g && g.locked);
64
+ h[e.depth] += i;
65
+ const l = c(n, r);
66
+ e.rightBorder = !(l && l.locked);
58
67
  }
59
68
  }
60
- return r;
61
69
  }
62
- function S(t, r, i = 0) {
63
- let d = [];
70
+ function w(t, n, d = 0) {
71
+ const i = [];
64
72
  if (!t || !t.length)
65
73
  return [];
66
- t.forEach((h) => {
67
- const a = S(h.children || [], r, i + 1);
68
- d.push(
69
- Object.assign(
70
- {},
71
- { depth: i },
72
- I,
73
- h,
74
- {
75
- id: h.id ? h.id : x(`${r.prevId++}`, r.idPrefix, "column"),
76
- declarationIndex: d.length,
77
- children: a,
78
- rowSpan: 0,
79
- colSpan: 0,
80
- isAccessible: !0
81
- }
82
- )
74
+ t.forEach((r) => {
75
+ const e = w(r.children || [], n, d + 1);
76
+ i.push(
77
+ {
78
+ depth: d,
79
+ ...g,
80
+ ...r,
81
+ id: r.id ? r.id : p(`${n.prevId++}`, n.idPrefix, "column"),
82
+ declarationIndex: i.length,
83
+ children: e,
84
+ rowSpan: 0,
85
+ colSpan: 0,
86
+ isAccessible: !0
87
+ }
83
88
  );
84
89
  });
85
- const l = (h, a) => h.orderIndex === a.orderIndex ? h.declarationIndex - a.declarationIndex : (h.orderIndex || 0) - (a.orderIndex || 0);
86
- if (d.sort(l), i === 0) {
87
- let h = [];
88
- const a = (f, e) => f.forEach((n) => {
89
- n.parentIndex = e, a(n.children, h.push(n) - 1);
90
+ const h = (r, e) => r.orderIndex === e.orderIndex ? r.declarationIndex - e.declarationIndex : (r.orderIndex || 0) - (e.orderIndex || 0);
91
+ if (i.sort(h), d === 0) {
92
+ const r = [], e = (l, f) => l.forEach((a) => {
93
+ a.parentIndex = f, e(a.children, r.push(a) - 1);
90
94
  });
91
- return a(d, -1), h;
95
+ return e(i, -1), r;
92
96
  }
93
- return d;
97
+ return i;
94
98
  }
95
- function k(t) {
99
+ function E(t) {
96
100
  return !!(t && getComputedStyle(t).direction === "rtl");
97
101
  }
98
- function C(t, r) {
99
- if (!r || !t || !t.originalEvent)
102
+ function k(t, n) {
103
+ if (!n || !t || !t.originalEvent)
100
104
  return -1;
101
- let i = r.ownerDocument ? r.ownerDocument.elementFromPoint(t.clientX, t.originalEvent.clientY) : null;
102
- for (; i && i.parentElement !== r; )
105
+ const d = { x: t.clientX, y: t.originalEvent.clientY };
106
+ let i = n.ownerDocument ? n.ownerDocument.elementFromPoint(d.x, d.y) : null;
107
+ for (; i && i.parentElement !== n; )
103
108
  i = i.parentElement;
104
- const d = r.children;
105
- for (let l = 0; l < d.length; l++)
106
- if (d[l] === i)
107
- return l;
109
+ if (!i && n.matches("tr")) {
110
+ const r = (e) => {
111
+ const l = e.getBoundingClientRect();
112
+ return d.x > l.left && d.x < l.left + l.width && d.y > l.top && d.y < l.top + l.height;
113
+ };
114
+ i = Array.from(n.children).find(r) || null;
115
+ }
116
+ const h = n.children;
117
+ for (let r = 0; r < h.length; r++)
118
+ if (h[r] === i)
119
+ return r;
108
120
  return -1;
109
121
  }
110
122
  export {
111
- C as getIndex,
112
- k as isRtl,
113
- E as mapColumns,
114
- S as readColumns
123
+ k as getIndex,
124
+ E as isRtl,
125
+ I as mapColumns,
126
+ c as nextColumn,
127
+ w as readColumns,
128
+ x as updateLeft,
129
+ s as updateRight
115
130
  };