@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.
- package/detail-expansion/expandReducer.js +8 -0
- package/detail-expansion/expandReducer.mjs +26 -0
- package/detail-expansion/utils.js +8 -0
- package/detail-expansion/utils.mjs +17 -0
- package/dist/cdn/js/kendo-vue-datatools.js +1 -1
- package/editing/editReducer.js +8 -0
- package/editing/editReducer.mjs +43 -0
- package/editing/utils.js +8 -0
- package/editing/utils.mjs +17 -0
- package/group-expansion/groupExpandReducer.js +8 -0
- package/group-expansion/groupExpandReducer.mjs +107 -0
- package/header/utils/main.js +1 -1
- package/header/utils/main.mjs +95 -80
- package/index.d.mts +256 -4
- package/index.d.ts +256 -4
- package/index.js +1 -1
- package/index.mjs +133 -110
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
- package/utils/data-operations.js +1 -1
- package/utils/data-operations.mjs +41 -24
package/editing/utils.js
ADDED
|
@@ -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
|
+
};
|
package/header/utils/main.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
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;
|
package/header/utils/main.mjs
CHANGED
|
@@ -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
|
|
9
|
-
import { ColumnDefaultProps as
|
|
10
|
-
function
|
|
11
|
-
const
|
|
12
|
-
let
|
|
13
|
-
for (let
|
|
14
|
-
if (t[
|
|
15
|
-
|
|
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
|
|
18
|
+
return i;
|
|
19
19
|
}
|
|
20
20
|
const o = (t) => {
|
|
21
|
-
let
|
|
22
|
-
return !
|
|
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
|
|
25
|
-
const
|
|
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].
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
|
|
51
|
+
i[r.depth] += h;
|
|
46
52
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
56
|
-
const
|
|
57
|
-
|
|
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
|
|
63
|
-
|
|
70
|
+
function w(t, n, d = 0) {
|
|
71
|
+
const i = [];
|
|
64
72
|
if (!t || !t.length)
|
|
65
73
|
return [];
|
|
66
|
-
t.forEach((
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
|
|
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
|
|
95
|
+
return e(i, -1), r;
|
|
92
96
|
}
|
|
93
|
-
return
|
|
97
|
+
return i;
|
|
94
98
|
}
|
|
95
|
-
function
|
|
99
|
+
function E(t) {
|
|
96
100
|
return !!(t && getComputedStyle(t).direction === "rtl");
|
|
97
101
|
}
|
|
98
|
-
function
|
|
99
|
-
if (!
|
|
102
|
+
function k(t, n) {
|
|
103
|
+
if (!n || !t || !t.originalEvent)
|
|
100
104
|
return -1;
|
|
101
|
-
|
|
102
|
-
|
|
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
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
};
|