@progress/kendo-vue-grid 8.1.0-develop.2 → 8.1.0-develop.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Grid.d.ts +56 -5
- package/Grid.js +1 -1
- package/Grid.mjs +667 -649
- package/GridNav.d.ts +24 -4
- package/GridNav.js +1 -1
- package/GridNav.mjs +62 -22
- package/GridState.d.ts +4 -0
- package/RootGrid.d.ts +32 -11
- package/RootGrid.js +1 -1
- package/RootGrid.mjs +96 -57
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +35 -26
- package/cells/GridGroupCell.d.ts +10 -0
- package/cells/GridGroupCell.js +1 -1
- package/cells/GridGroupCell.mjs +95 -53
- package/columnMenu/GridColumnMenuCheckboxFilter.d.ts +1 -1
- package/columnMenu/GridColumnMenuCheckboxFilter.js +1 -1
- package/columnMenu/GridColumnMenuCheckboxFilter.mjs +11 -11
- package/common.d.ts +2 -0
- package/common.js +1 -1
- package/common.mjs +2 -0
- package/components/StickyGroupTable.d.ts +85 -0
- package/components/StickyGroupTable.js +8 -0
- package/components/StickyGroupTable.mjs +113 -0
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/drag/ColumnResize.d.ts +10 -1
- package/drag/ColumnResize.js +1 -1
- package/drag/ColumnResize.mjs +129 -104
- package/drag/GroupingIndicator.d.ts +1 -0
- package/drag/GroupingIndicator.js +1 -1
- package/drag/GroupingIndicator.mjs +28 -18
- package/footer/FooterCell.d.ts +43 -0
- package/footer/FooterCell.js +8 -0
- package/footer/FooterCell.mjs +68 -0
- package/footer/FooterRow.d.ts +5 -6
- package/footer/FooterRow.js +1 -1
- package/footer/FooterRow.mjs +16 -39
- package/getRowContents.d.ts +85 -0
- package/getRowContents.js +8 -0
- package/getRowContents.mjs +172 -0
- package/header/GridHeaderGroupSpacerCell.d.ts +11 -0
- package/hooks/useStickyGroups.d.ts +72 -0
- package/hooks/useStickyGroups.js +8 -0
- package/hooks/useStickyGroups.mjs +350 -0
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -1
- package/index.mjs +74 -73
- package/interfaces/GridCellProps.d.ts +4 -0
- package/interfaces/GridCellsSettings.d.ts +320 -0
- package/interfaces/GridColumnProps.d.ts +11 -1
- package/interfaces/GridGroupableSettings.d.ts +23 -0
- package/interfaces/GridProps.d.ts +33 -0
- package/messages/main.d.ts +5 -0
- package/messages/main.js +2 -2
- package/messages/main.mjs +15 -13
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
- package/utils/main.js +1 -1
- package/utils/main.mjs +80 -76
package/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 S=require("@progress/kendo-vue-data-tools"),y=require("@progress/kendo-vue-common"),D=require("../GridColumn.js"),b="string";function E(e,t){const n=e.split(".");let
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("@progress/kendo-vue-data-tools"),y=require("@progress/kendo-vue-common"),D=require("../GridColumn.js"),b="string";function E(e,t){const n=e.split(".");let r=t;return n.forEach(a=>{r=r?r[a]:void 0}),r}function M(e,t,n,r,a,s,i,o,d,h,p=0,f){let c=p;for(let g=0;g<t.length;g++){let l;if(!a||t[g].value===void 0||t[g].items===void 0){const C=d?!!(s!=null&&s[y.getter(d)(t[g])]):!1;e[e.length]={dataIndex:r.index,dataItem:t[g],rowType:"data",level:p,group:f,expanded:h!==void 0?E(h,t[g]):C!=null?C:!1},r.index++;continue}else{let C;f!=null&&f.parents?C=[{field:f.field,value:f.value},...f.parents]:f?C=[f]:C=[],l={field:t[g].field,value:t[g].value,parents:C}}c=Math.max(c,p+1);let x=!1;const I=S.findGroupExpand(i||[],l);h?x=h===void 0||E(h,t[g])===void 0||E(h,t[g]):x=I?I.expanded!==!1:o!==!1,e[e.length]={dataIndex:-1,dataItem:t[g],level:p,group:l,rowType:"groupHeader",expanded:x},x&&(l.expanded=x,c=Math.max(M(e,t[g].items,n,r,a,s,i,o,d,h,p+1,l),c)),(n==="always"||x&&n==="visible")&&(e[e.length]={dataIndex:-1,dataItem:t[g],rowType:"groupFooter",level:p,expanded:x})}return c}function N(e){return e&&getComputedStyle(e).direction==="rtl"||!1}function m(e,t){if(!t||!e||!e.originalEvent||!y.canUseDOM)return-1;let n=document.elementFromPoint(e.clientX,e.originalEvent.clientY);for(;n&&n.parentElement!==t;)n=n.parentElement;const r=t.children;for(let a=0;a<r.length;a++)if(r[a]===n)return a;return-1}const A=["sortChange","filterChange","groupChange","pageChange","expandChange","selectionChange","headerSelectionChange","rowClick","itemChange","dataStateChange","columnResize","columnReorder"],H=(e,t)=>`The ${e} event handler property is deprecated, use https://www.telerik.com/kendo-vue-ui/components/grid/api/GridProps/#toc-${t} instead`;function L(e){for(let t=0;t<A.length;t++){const n=A[t];if(e[n]!==void 0){const r="on"+n.charAt(0).toUpperCase()+n.slice(1);console.warn(H(n,r))}}}function P(e,t){const n=[[]];let r=0;for(let i=e.length-1;i>=0;i--)r=Math.max(r,e[i].depth),e[i].headerColSpan=e[i].headerColSpan||1,e[i].children.length>0&&(e[i].headerColSpan=e[i].children.reduce((o,d)=>d.hidden?o:o+d.headerColSpan,0));const a=[];let s=1;return e.forEach((i,o)=>{n[i.depth]=n[i.depth]||[];let d=!1;n[i.depth].length===0&&(s<=1?s=1+(i.children.length>0?0:r-i.depth):(s--,d=!0)),i.rowSpan=1+(i.children.length>0?0:r-i.depth),i.kFirst=d,i.index=n[i.depth].length,i.ariaColumnIndex=a[i.depth]?a[i.depth]+1:1;let h=0;const p=[],f=new Set;let c=i.parentIndex;for(;c>=0&&!f.has(c);)f.add(c),p.unshift(c),c=e[c].parentIndex;for(let l=0;l<p.length;l++){const x=p[l],I=e[x],C=n[I.depth],v=C.indexOf(x);for(let u=0;u<v;u++){const w=C[u];h+=e[w].headerColSpan}}for(let l=0;l<i.depth;l++){const x=n[l]||[],C=(n[i.depth]||[]).indexOf(o);let v=0;for(const u of x){const w=e[u];v<C&&w.depth+w.rowSpan-1>=i.depth&&(p.includes(u)||(h+=w.headerColSpan)),v+=w.headerColSpan}}const g=n[i.depth];for(const l of g){const x=e[l];x.parentIndex===i.parentIndex&&(h+=x.headerColSpan)}i.virtualColumnOffset=h,n[i.depth].push(o);for(let l=i.depth;l<i.depth+i.rowSpan;l++)a[l]=(a[l]||0)+i.headerColSpan}),S.updateLeft(n,e,t),S.updateRight(n,e,t),n}function T(e,t,n,r=0,a=!1){const s=[];if(!e)return[];e&&e.length===void 0&&(e=[e]),e.forEach((o,d)=>{o=o;const h=o.id?o.id:S.tableKeyboardNavigationTools.generateNavigatableId(`${n.prevId++}`,n.idPrefix,"column"),p=y.canUseDOM&&o.media&&window.matchMedia?!window.matchMedia(o.media).matches:!1,f=a||p||o.hidden,c=t==null?void 0:t.find(l=>l.id===h),g=T(o.children,(c==null?void 0:c.children)||[],n,r+1,f);s.push({depth:r,...D.gridDefaultProps,...g.length?{cell:()=>null,filterCell:()=>null}:{},...o,id:h,declarationIndex:s.length,children:g,headerColSpan:0,rowSpan:0,columnType:o.columnType||"data",colSpan:o.colSpan||1,isAccessible:!0,hidden:f,left:null,right:null,rowSpannable:o.rowSpannable,...c?{width:c.width,orderIndex:c.orderIndex}:{}})});const i=(o,d)=>o.orderIndex===d.orderIndex?o.declarationIndex-d.declarationIndex:(o.orderIndex||0)-(d.orderIndex||0);if(s.sort(i),r===0){const o=[],d=(h,p)=>h.forEach(f=>{f.parentIndex=p,d(f.children,o.push(f)-1)});return d(s,-1),o}return s}const F=e=>Array.isArray(e)?e:e?e.data:[];function V(e,t,n,r){const a=F(e),s=[];if(a.length>0){let i=a[0];if(t)for(let d=0;d<t.length;d++)i=i.items&&i.items[0];Object.getOwnPropertyNames(i).forEach(d=>{d!==n.column&&s.push({id:S.tableKeyboardNavigationTools.generateNavigatableId(`${r.prevId++}`,r.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,headerColSpan:0,rowSpan:0,index:0,columnType:"data",left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0,...D.gridDefaultProps,field:d})})}return s}const j=(e,t)=>{var r;let n=e[t.parentIndex];for(;n;){if(n.footerCell||(r=n.cells)!=null&&r.footerCell)return!0;n=e[n.parentIndex]}return!1},K=e=>e.filter(t=>{var n;return j(e,t)?!1:!!(t.footerCell||(n=t.cells)!=null&&n.footerCell)||!(t.children&&t.children.length>0)}),$={number:function(e,t,n){return typeof e===b&&e.toLowerCase()==="null"?null:t.parseNumber(e,n)},date:function(e,t,n){return typeof e===b&&e.toLowerCase()==="null"?null:t.parseDate(e,n)},boolean:function(e){return typeof e===b?e.toLowerCase()==="null"?null:e.toLowerCase()==="true":e!=null?!!e:e},string:function(e){return typeof e===b&&e.toLowerCase()==="null"?null:e!=null?e+"":e},default:function(e){return e}};function O(e,t,n,r){return e.forEach(a=>{a.expanded=t[r]&&!t[r].includes(R(a,n)),a.items&&a.items.length&&(a.items=O(a.items,t,n,r+1))}),e}function z(e,t,n){return t&&t.length&&e.data.forEach(r=>{r.expanded=r.expanded!==void 0?r.expanded:t[0]&&!t[0].includes(R(r,n)),r.items&&r.items.length&&(r.items=O(r.items,t,n,1))}),e}function R(e,t){let n=e;for(;n.items&&n.items.length;)n=n.items[0];return t?n[t]:e.value}const B=e=>{const t=[],n=r=>r==null?void 0:r.forEach(a=>{t.push(a),n(a.children)});return n(e),t},U=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),q=17895697,W=e=>e.width!==void 0?Math.floor(parseFloat(e.width.toString()))+"px":void 0,X=(e,t)=>t&&t.filter(n=>n.field===e).length>0,k=e=>(e.sort((t,n)=>t.declarationIndex-n.declarationIndex),e.map(t=>{const{declarationIndex:n,parentIndex:r,depth:a,headerColSpan:s,rowSpan:i,index:o,kFirst:d,children:h,...p}=t;return h.length?{children:k(h),...p}:p})),Y=(e,t)=>typeof e.colSpan=="function"?e.colSpan({dataItem:t,column:e}):e.colSpan||1,J=e=>{var r,a;const t=typeof e=="object"?(r=e.enabled)!=null?r:!0:e!=null?e:!1,n=typeof e=="object"?(a=e.valueGetter)!=null?a:((s,i)=>y.getter(i)(s)):(s,i)=>y.getter(i)(s);return{enabled:t,valueGetter:n}},Q=e=>{let t=0;if(e){const n=e.insertRow(0),r=n.insertCell(0);r.textContent=" ",t=n.getBoundingClientRect().height,e.deleteRow(0)}return t};exports.applyExpandedState=z;exports.autoGenerateColumns=V;exports.calcRowHeight=Q;exports.checkPropCompatibility=L;exports.firefox=U;exports.firefoxMaxHeight=q;exports.flatData=M;exports.footerColumns=K;exports.getColSpan=Y;exports.getColumnWidth=W;exports.getDataAsArray=F;exports.getFlatColumnsState=B;exports.getIndex=m;exports.getNestedValue=E;exports.getRowSpanOptions=J;exports.groupedFirstItemValue=R;exports.isRtl=N;exports.isSorted=X;exports.mapColumns=P;exports.parsers=$;exports.readColumns=T;exports.sanitizeColumns=k;
|
package/utils/main.mjs
CHANGED
|
@@ -11,26 +11,26 @@ import { gridDefaultProps as M } from "../GridColumn.mjs";
|
|
|
11
11
|
const y = "string";
|
|
12
12
|
function v(e, t) {
|
|
13
13
|
const n = e.split(".");
|
|
14
|
-
let
|
|
14
|
+
let r = t;
|
|
15
15
|
return n.forEach((a) => {
|
|
16
|
-
|
|
17
|
-
}),
|
|
16
|
+
r = r ? r[a] : void 0;
|
|
17
|
+
}), r;
|
|
18
18
|
}
|
|
19
|
-
function L(e, t, n,
|
|
19
|
+
function L(e, t, n, r, a, s, i, o, d, h, p = 0, f) {
|
|
20
20
|
let c = p;
|
|
21
21
|
for (let g = 0; g < t.length; g++) {
|
|
22
22
|
let l;
|
|
23
23
|
if (!a || t[g].value === void 0 || t[g].items === void 0) {
|
|
24
|
-
const C =
|
|
24
|
+
const C = d ? !!(s != null && s[E(d)(t[g])]) : !1;
|
|
25
25
|
e[e.length] = {
|
|
26
|
-
dataIndex:
|
|
26
|
+
dataIndex: r.index,
|
|
27
27
|
dataItem: t[g],
|
|
28
28
|
rowType: "data",
|
|
29
29
|
level: p,
|
|
30
30
|
group: f,
|
|
31
31
|
// This is related to detail-row expansion
|
|
32
32
|
expanded: h !== void 0 ? v(h, t[g]) : C != null ? C : !1
|
|
33
|
-
},
|
|
33
|
+
}, r.index++;
|
|
34
34
|
continue;
|
|
35
35
|
} else {
|
|
36
36
|
let C;
|
|
@@ -42,8 +42,8 @@ function L(e, t, n, i, a, s, r, d, o, h, p = 0, f) {
|
|
|
42
42
|
}
|
|
43
43
|
c = Math.max(c, p + 1);
|
|
44
44
|
let x = !1;
|
|
45
|
-
const u = T(
|
|
46
|
-
h ? x = h === void 0 || v(h, t[g]) === void 0 || v(h, t[g]) : x = u ? u.expanded !== !1 :
|
|
45
|
+
const u = T(i || [], l);
|
|
46
|
+
h ? x = h === void 0 || v(h, t[g]) === void 0 || v(h, t[g]) : x = u ? u.expanded !== !1 : o !== !1, e[e.length] = {
|
|
47
47
|
dataIndex: -1,
|
|
48
48
|
dataItem: t[g],
|
|
49
49
|
level: p,
|
|
@@ -55,12 +55,12 @@ function L(e, t, n, i, a, s, r, d, o, h, p = 0, f) {
|
|
|
55
55
|
e,
|
|
56
56
|
t[g].items,
|
|
57
57
|
n,
|
|
58
|
-
|
|
58
|
+
r,
|
|
59
59
|
a,
|
|
60
60
|
s,
|
|
61
|
-
|
|
62
|
-
d,
|
|
61
|
+
i,
|
|
63
62
|
o,
|
|
63
|
+
d,
|
|
64
64
|
h,
|
|
65
65
|
p + 1,
|
|
66
66
|
l
|
|
@@ -76,18 +76,18 @@ function L(e, t, n, i, a, s, r, d, o, h, p = 0, f) {
|
|
|
76
76
|
}
|
|
77
77
|
return c;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function W(e) {
|
|
80
80
|
return e && getComputedStyle(e).direction === "rtl" || !1;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function X(e, t) {
|
|
83
83
|
if (!t || !e || !e.originalEvent || !b)
|
|
84
84
|
return -1;
|
|
85
85
|
let n = document.elementFromPoint(e.clientX, e.originalEvent.clientY);
|
|
86
86
|
for (; n && n.parentElement !== t; )
|
|
87
87
|
n = n.parentElement;
|
|
88
|
-
const
|
|
89
|
-
for (let a = 0; a <
|
|
90
|
-
if (
|
|
88
|
+
const r = t.children;
|
|
89
|
+
for (let a = 0; a < r.length; a++)
|
|
90
|
+
if (r[a] === n)
|
|
91
91
|
return a;
|
|
92
92
|
return -1;
|
|
93
93
|
}
|
|
@@ -105,32 +105,32 @@ const A = [
|
|
|
105
105
|
"columnResize",
|
|
106
106
|
"columnReorder"
|
|
107
107
|
], N = (e, t) => `The ${e} event handler property is deprecated, use https://www.telerik.com/kendo-vue-ui/components/grid/api/GridProps/#toc-${t} instead`;
|
|
108
|
-
function
|
|
108
|
+
function Y(e) {
|
|
109
109
|
for (let t = 0; t < A.length; t++) {
|
|
110
110
|
const n = A[t];
|
|
111
111
|
if (e[n] !== void 0) {
|
|
112
|
-
const
|
|
113
|
-
console.warn(N(n,
|
|
112
|
+
const r = "on" + n.charAt(0).toUpperCase() + n.slice(1);
|
|
113
|
+
console.warn(N(n, r));
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function m(e, t) {
|
|
118
118
|
const n = [[]];
|
|
119
|
-
let
|
|
120
|
-
for (let
|
|
121
|
-
|
|
122
|
-
(
|
|
119
|
+
let r = 0;
|
|
120
|
+
for (let i = e.length - 1; i >= 0; i--)
|
|
121
|
+
r = Math.max(r, e[i].depth), e[i].headerColSpan = e[i].headerColSpan || 1, e[i].children.length > 0 && (e[i].headerColSpan = e[i].children.reduce(
|
|
122
|
+
(o, d) => d.hidden ? o : o + d.headerColSpan,
|
|
123
123
|
0
|
|
124
124
|
));
|
|
125
125
|
const a = [];
|
|
126
126
|
let s = 1;
|
|
127
|
-
return e.forEach((
|
|
128
|
-
n[
|
|
129
|
-
let
|
|
130
|
-
n[
|
|
127
|
+
return e.forEach((i, o) => {
|
|
128
|
+
n[i.depth] = n[i.depth] || [];
|
|
129
|
+
let d = !1;
|
|
130
|
+
n[i.depth].length === 0 && (s <= 1 ? s = 1 + (i.children.length > 0 ? 0 : r - i.depth) : (s--, d = !0)), i.rowSpan = 1 + (i.children.length > 0 ? 0 : r - i.depth), i.kFirst = d, i.index = n[i.depth].length, i.ariaColumnIndex = a[i.depth] ? a[i.depth] + 1 : 1;
|
|
131
131
|
let h = 0;
|
|
132
132
|
const p = [], f = /* @__PURE__ */ new Set();
|
|
133
|
-
let c =
|
|
133
|
+
let c = i.parentIndex;
|
|
134
134
|
for (; c >= 0 && !f.has(c); )
|
|
135
135
|
f.add(c), p.unshift(c), c = e[c].parentIndex;
|
|
136
136
|
for (let l = 0; l < p.length; l++) {
|
|
@@ -140,74 +140,74 @@ function Y(e, t) {
|
|
|
140
140
|
h += e[I].headerColSpan;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
|
-
for (let l = 0; l <
|
|
144
|
-
const x = n[l] || [], C = (n[
|
|
143
|
+
for (let l = 0; l < i.depth; l++) {
|
|
144
|
+
const x = n[l] || [], C = (n[i.depth] || []).indexOf(o);
|
|
145
145
|
let S = 0;
|
|
146
146
|
for (const w of x) {
|
|
147
147
|
const I = e[w];
|
|
148
|
-
S < C && I.depth + I.rowSpan - 1 >=
|
|
148
|
+
S < C && I.depth + I.rowSpan - 1 >= i.depth && (p.includes(w) || (h += I.headerColSpan)), S += I.headerColSpan;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
const g = n[
|
|
151
|
+
const g = n[i.depth];
|
|
152
152
|
for (const l of g) {
|
|
153
153
|
const x = e[l];
|
|
154
|
-
x.parentIndex ===
|
|
154
|
+
x.parentIndex === i.parentIndex && (h += x.headerColSpan);
|
|
155
155
|
}
|
|
156
|
-
|
|
157
|
-
for (let l =
|
|
158
|
-
a[l] = (a[l] || 0) +
|
|
156
|
+
i.virtualColumnOffset = h, n[i.depth].push(o);
|
|
157
|
+
for (let l = i.depth; l < i.depth + i.rowSpan; l++)
|
|
158
|
+
a[l] = (a[l] || 0) + i.headerColSpan;
|
|
159
159
|
}), O(n, e, t), k(n, e, t), n;
|
|
160
160
|
}
|
|
161
|
-
function H(e, t, n,
|
|
161
|
+
function H(e, t, n, r = 0, a = !1) {
|
|
162
162
|
const s = [];
|
|
163
163
|
if (!e)
|
|
164
164
|
return [];
|
|
165
|
-
e && e.length === void 0 && (e = [e]), e.forEach((
|
|
166
|
-
|
|
167
|
-
const h =
|
|
165
|
+
e && e.length === void 0 && (e = [e]), e.forEach((o, d) => {
|
|
166
|
+
o = o;
|
|
167
|
+
const h = o.id ? o.id : R.generateNavigatableId(`${n.prevId++}`, n.idPrefix, "column"), p = b && o.media && window.matchMedia ? !window.matchMedia(o.media).matches : !1, f = a || p || o.hidden, c = t == null ? void 0 : t.find((l) => l.id === h), g = H(o.children, (c == null ? void 0 : c.children) || [], n, r + 1, f);
|
|
168
168
|
s.push(
|
|
169
169
|
{
|
|
170
|
-
depth:
|
|
170
|
+
depth: r,
|
|
171
171
|
...M,
|
|
172
172
|
...g.length ? { cell: () => null, filterCell: () => null } : {},
|
|
173
|
-
...
|
|
173
|
+
...o,
|
|
174
174
|
id: h,
|
|
175
175
|
declarationIndex: s.length,
|
|
176
176
|
children: g,
|
|
177
177
|
headerColSpan: 0,
|
|
178
178
|
rowSpan: 0,
|
|
179
|
-
columnType:
|
|
180
|
-
colSpan:
|
|
179
|
+
columnType: o.columnType || "data",
|
|
180
|
+
colSpan: o.colSpan || 1,
|
|
181
181
|
isAccessible: !0,
|
|
182
182
|
hidden: f,
|
|
183
183
|
left: null,
|
|
184
184
|
right: null,
|
|
185
|
-
rowSpannable:
|
|
185
|
+
rowSpannable: o.rowSpannable,
|
|
186
186
|
...c ? { width: c.width, orderIndex: c.orderIndex } : {}
|
|
187
187
|
}
|
|
188
188
|
);
|
|
189
189
|
});
|
|
190
|
-
const
|
|
191
|
-
if (s.sort(
|
|
192
|
-
const
|
|
193
|
-
f.parentIndex = p,
|
|
190
|
+
const i = (o, d) => o.orderIndex === d.orderIndex ? o.declarationIndex - d.declarationIndex : (o.orderIndex || 0) - (d.orderIndex || 0);
|
|
191
|
+
if (s.sort(i), r === 0) {
|
|
192
|
+
const o = [], d = (h, p) => h.forEach((f) => {
|
|
193
|
+
f.parentIndex = p, d(f.children, o.push(f) - 1);
|
|
194
194
|
});
|
|
195
|
-
return
|
|
195
|
+
return d(s, -1), o;
|
|
196
196
|
}
|
|
197
197
|
return s;
|
|
198
198
|
}
|
|
199
199
|
const j = (e) => Array.isArray(e) ? e : e ? e.data : [];
|
|
200
|
-
function J(e, t, n,
|
|
200
|
+
function J(e, t, n, r) {
|
|
201
201
|
const a = j(e), s = [];
|
|
202
202
|
if (a.length > 0) {
|
|
203
|
-
let
|
|
203
|
+
let i = a[0];
|
|
204
204
|
if (t)
|
|
205
|
-
for (let
|
|
206
|
-
|
|
207
|
-
Object.getOwnPropertyNames(
|
|
208
|
-
|
|
205
|
+
for (let d = 0; d < t.length; d++)
|
|
206
|
+
i = i.items && i.items[0];
|
|
207
|
+
Object.getOwnPropertyNames(i).forEach((d) => {
|
|
208
|
+
d !== n.column && s.push(
|
|
209
209
|
{
|
|
210
|
-
id: R.generateNavigatableId(`${
|
|
210
|
+
id: R.generateNavigatableId(`${r.prevId++}`, r.idPrefix, "column"),
|
|
211
211
|
declarationIndex: -1,
|
|
212
212
|
parentIndex: -1,
|
|
213
213
|
depth: 0,
|
|
@@ -223,7 +223,7 @@ function J(e, t, n, i) {
|
|
|
223
223
|
ariaColumnIndex: 0,
|
|
224
224
|
isAccessible: !0,
|
|
225
225
|
...M,
|
|
226
|
-
field:
|
|
226
|
+
field: d
|
|
227
227
|
}
|
|
228
228
|
);
|
|
229
229
|
});
|
|
@@ -231,14 +231,18 @@ function J(e, t, n, i) {
|
|
|
231
231
|
return s;
|
|
232
232
|
}
|
|
233
233
|
const $ = (e, t) => {
|
|
234
|
+
var r;
|
|
234
235
|
let n = e[t.parentIndex];
|
|
235
236
|
for (; n; ) {
|
|
236
|
-
if (n.footerCell)
|
|
237
|
+
if (n.footerCell || (r = n.cells) != null && r.footerCell)
|
|
237
238
|
return !0;
|
|
238
239
|
n = e[n.parentIndex];
|
|
239
240
|
}
|
|
240
241
|
return !1;
|
|
241
|
-
}, Q = (e) => e.filter((t) =>
|
|
242
|
+
}, Q = (e) => e.filter((t) => {
|
|
243
|
+
var n;
|
|
244
|
+
return $(e, t) ? !1 : !!(t.footerCell || (n = t.cells) != null && n.footerCell) || !(t.children && t.children.length > 0);
|
|
245
|
+
}), Z = {
|
|
242
246
|
number: function(e, t, n) {
|
|
243
247
|
return typeof e === y && e.toLowerCase() === "null" ? null : t.parseNumber(e, n);
|
|
244
248
|
},
|
|
@@ -255,14 +259,14 @@ const $ = (e, t) => {
|
|
|
255
259
|
return e;
|
|
256
260
|
}
|
|
257
261
|
};
|
|
258
|
-
function D(e, t, n,
|
|
262
|
+
function D(e, t, n, r) {
|
|
259
263
|
return e.forEach((a) => {
|
|
260
|
-
a.expanded = t[
|
|
264
|
+
a.expanded = t[r] && !t[r].includes(F(a, n)), a.items && a.items.length && (a.items = D(a.items, t, n, r + 1));
|
|
261
265
|
}), e;
|
|
262
266
|
}
|
|
263
267
|
function _(e, t, n) {
|
|
264
|
-
return t && t.length && e.data.forEach((
|
|
265
|
-
|
|
268
|
+
return t && t.length && e.data.forEach((r) => {
|
|
269
|
+
r.expanded = r.expanded !== void 0 ? r.expanded : t[0] && !t[0].includes(F(r, n)), r.items && r.items.length && (r.items = D(r.items, t, n, 1));
|
|
266
270
|
}), e;
|
|
267
271
|
}
|
|
268
272
|
function F(e, t) {
|
|
@@ -272,25 +276,25 @@ function F(e, t) {
|
|
|
272
276
|
return t ? n[t] : e.value;
|
|
273
277
|
}
|
|
274
278
|
const q = (e) => {
|
|
275
|
-
const t = [], n = (
|
|
279
|
+
const t = [], n = (r) => r == null ? void 0 : r.forEach((a) => {
|
|
276
280
|
t.push(a), n(a.children);
|
|
277
281
|
});
|
|
278
282
|
return n(e), t;
|
|
279
283
|
}, G = typeof window != "undefined" && /Firefox/.test(window.navigator.userAgent), ee = 17895697, te = (e) => e.width !== void 0 ? Math.floor(parseFloat(e.width.toString())) + "px" : void 0, ne = (e, t) => t && t.filter((n) => n.field === e).length > 0, B = (e) => (e.sort((t, n) => t.declarationIndex - n.declarationIndex), e.map((t) => {
|
|
280
|
-
const { declarationIndex: n, parentIndex:
|
|
284
|
+
const { declarationIndex: n, parentIndex: r, depth: a, headerColSpan: s, rowSpan: i, index: o, kFirst: d, children: h, ...p } = t;
|
|
281
285
|
return h.length ? {
|
|
282
286
|
children: B(h),
|
|
283
287
|
...p
|
|
284
288
|
} : p;
|
|
285
289
|
})), re = (e, t) => typeof e.colSpan == "function" ? e.colSpan({ dataItem: t, column: e }) : e.colSpan || 1, ie = (e) => {
|
|
286
|
-
var
|
|
287
|
-
const t = typeof e == "object" ? (
|
|
290
|
+
var r, a;
|
|
291
|
+
const t = typeof e == "object" ? (r = e.enabled) != null ? r : !0 : e != null ? e : !1, n = typeof e == "object" ? (a = e.valueGetter) != null ? a : ((s, i) => E(i)(s)) : (s, i) => E(i)(s);
|
|
288
292
|
return { enabled: t, valueGetter: n };
|
|
289
293
|
}, ae = (e) => {
|
|
290
294
|
let t = 0;
|
|
291
295
|
if (e) {
|
|
292
|
-
const n = e.insertRow(0),
|
|
293
|
-
|
|
296
|
+
const n = e.insertRow(0), r = n.insertCell(0);
|
|
297
|
+
r.textContent = " ", t = n.getBoundingClientRect().height, e.deleteRow(0);
|
|
294
298
|
}
|
|
295
299
|
return t;
|
|
296
300
|
};
|
|
@@ -298,7 +302,7 @@ export {
|
|
|
298
302
|
_ as applyExpandedState,
|
|
299
303
|
J as autoGenerateColumns,
|
|
300
304
|
ae as calcRowHeight,
|
|
301
|
-
|
|
305
|
+
Y as checkPropCompatibility,
|
|
302
306
|
G as firefox,
|
|
303
307
|
ee as firefoxMaxHeight,
|
|
304
308
|
L as flatData,
|
|
@@ -307,13 +311,13 @@ export {
|
|
|
307
311
|
te as getColumnWidth,
|
|
308
312
|
j as getDataAsArray,
|
|
309
313
|
q as getFlatColumnsState,
|
|
310
|
-
|
|
314
|
+
X as getIndex,
|
|
311
315
|
v as getNestedValue,
|
|
312
316
|
ie as getRowSpanOptions,
|
|
313
317
|
F as groupedFirstItemValue,
|
|
314
|
-
|
|
318
|
+
W as isRtl,
|
|
315
319
|
ne as isSorted,
|
|
316
|
-
|
|
320
|
+
m as mapColumns,
|
|
317
321
|
Z as parsers,
|
|
318
322
|
H as readColumns,
|
|
319
323
|
B as sanitizeColumns
|