@progress/kendo-react-grid 9.1.0-develop.8 → 9.1.0
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.js +1 -1
- package/Grid.mjs +98 -100
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/footer/Footer.js +1 -1
- package/footer/Footer.mjs +23 -32
- package/header/Header.js +1 -1
- package/header/Header.mjs +12 -13
- package/package-metadata.mjs +1 -1
- package/package.json +11 -11
- package/utils/index.js +1 -1
- package/utils/index.mjs +12 -12
package/header/Header.mjs
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as t from "react";
|
|
10
|
-
import { useRtl as
|
|
10
|
+
import { useRtl as g, useUnstyled as h, uGrid as N, classNames as c } from "@progress/kendo-react-common";
|
|
11
11
|
import { tableKeyboardNavigationHeaderAttributes as u } from "@progress/kendo-react-data-tools";
|
|
12
12
|
const E = t.forwardRef((e, f) => {
|
|
13
|
-
const
|
|
13
|
+
const a = t.useRef(null), n = t.useRef(null), s = t.useRef(!1), m = g(e.elemRef);
|
|
14
14
|
e.columnResize && e.columnResize.setIsRtl(m === "rtl"), t.useImperativeHandle(f, () => ({
|
|
15
15
|
setScrollLeft: (r) => {
|
|
16
|
-
|
|
16
|
+
a.current && a.current.scrollLeft !== r && (s.current = !0, a.current.scrollLeft = r);
|
|
17
17
|
},
|
|
18
18
|
setWidth: (r) => {
|
|
19
19
|
n.current && (n.current.style.width = r + "px");
|
|
@@ -25,24 +25,23 @@ const E = t.forwardRef((e, f) => {
|
|
|
25
25
|
s.current = !1;
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
|
-
if (!
|
|
28
|
+
if (!a.current)
|
|
29
29
|
return;
|
|
30
|
-
const i =
|
|
30
|
+
const i = a.current.scrollLeft, d = e.scrollableDataElement();
|
|
31
31
|
d && d.scrollLeft !== i && (d.scrollLeft = i);
|
|
32
|
-
}, o =
|
|
32
|
+
}, o = h(), l = o && o.uGrid ? o.uGrid : N, { size: b = "md" } = e;
|
|
33
33
|
return e.staticHeaders ? /* @__PURE__ */ t.createElement(
|
|
34
34
|
"div",
|
|
35
35
|
{
|
|
36
36
|
ref: e.elemRef,
|
|
37
|
-
className: c(
|
|
37
|
+
className: c(l.header({ draggable: e.draggable }), e.className),
|
|
38
38
|
role: "presentation"
|
|
39
39
|
},
|
|
40
40
|
/* @__PURE__ */ t.createElement(
|
|
41
41
|
"div",
|
|
42
42
|
{
|
|
43
|
-
ref:
|
|
44
|
-
className: c(
|
|
45
|
-
style: e.hasScrollbarWidth ? {} : { borderWidth: 0 },
|
|
43
|
+
ref: a,
|
|
44
|
+
className: c(l.headerWrap({})),
|
|
46
45
|
onScroll: R,
|
|
47
46
|
role: "presentation"
|
|
48
47
|
},
|
|
@@ -50,7 +49,7 @@ const E = t.forwardRef((e, f) => {
|
|
|
50
49
|
"table",
|
|
51
50
|
{
|
|
52
51
|
ref: n,
|
|
53
|
-
className: c(
|
|
52
|
+
className: c(l.headerTable({ size: b }), e.className),
|
|
54
53
|
role: "presentation"
|
|
55
54
|
},
|
|
56
55
|
/* @__PURE__ */ t.createElement(
|
|
@@ -65,7 +64,7 @@ const E = t.forwardRef((e, f) => {
|
|
|
65
64
|
/* @__PURE__ */ t.createElement(
|
|
66
65
|
"thead",
|
|
67
66
|
{
|
|
68
|
-
className: c(
|
|
67
|
+
className: c(l.tableThead({})),
|
|
69
68
|
role: "rowgroup",
|
|
70
69
|
...u
|
|
71
70
|
},
|
|
@@ -78,7 +77,7 @@ const E = t.forwardRef((e, f) => {
|
|
|
78
77
|
"thead",
|
|
79
78
|
{
|
|
80
79
|
role: "presentation",
|
|
81
|
-
className: c(
|
|
80
|
+
className: c(l.thead({ draggable: e.draggable }), e.className),
|
|
82
81
|
...u
|
|
83
82
|
},
|
|
84
83
|
e.headerRow,
|
package/package-metadata.mjs
CHANGED
|
@@ -10,7 +10,7 @@ const e = {
|
|
|
10
10
|
name: "@progress/kendo-react-grid",
|
|
11
11
|
productName: "KendoReact",
|
|
12
12
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
-
publishDate:
|
|
13
|
+
publishDate: 1733476609,
|
|
14
14
|
version: "",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-grid",
|
|
3
|
-
"version": "9.1.0
|
|
3
|
+
"version": "9.1.0",
|
|
4
4
|
"description": "React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -23,17 +23,17 @@
|
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@progress/kendo-data-query": "^1.0.0",
|
|
26
|
-
"@progress/kendo-drawing": "^1.21.
|
|
26
|
+
"@progress/kendo-drawing": "^1.21.2",
|
|
27
27
|
"@progress/kendo-licensing": "^1.3.4",
|
|
28
|
-
"@progress/kendo-react-animation": "9.1.0
|
|
29
|
-
"@progress/kendo-react-buttons": "9.1.0
|
|
30
|
-
"@progress/kendo-react-common": "9.1.0
|
|
31
|
-
"@progress/kendo-react-data-tools": "9.1.0
|
|
32
|
-
"@progress/kendo-react-dateinputs": "9.1.0
|
|
33
|
-
"@progress/kendo-react-dropdowns": "9.1.0
|
|
34
|
-
"@progress/kendo-react-inputs": "9.1.0
|
|
35
|
-
"@progress/kendo-react-intl": "9.1.0
|
|
36
|
-
"@progress/kendo-react-popup": "9.1.0
|
|
28
|
+
"@progress/kendo-react-animation": "9.1.0",
|
|
29
|
+
"@progress/kendo-react-buttons": "9.1.0",
|
|
30
|
+
"@progress/kendo-react-common": "9.1.0",
|
|
31
|
+
"@progress/kendo-react-data-tools": "9.1.0",
|
|
32
|
+
"@progress/kendo-react-dateinputs": "9.1.0",
|
|
33
|
+
"@progress/kendo-react-dropdowns": "9.1.0",
|
|
34
|
+
"@progress/kendo-react-inputs": "9.1.0",
|
|
35
|
+
"@progress/kendo-react-intl": "9.1.0",
|
|
36
|
+
"@progress/kendo-react-popup": "9.1.0",
|
|
37
37
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
38
38
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
39
39
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
package/utils/index.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 x=require("../GridColumn.js"),g=require("@progress/kendo-react-data-tools");function f(e,t){const a=(e||"").split(".");let o=t;return a.forEach(d=>{o=o?o[d]:void 0}),o}function u(e,t,a,o,d,l,s=0){let r=s;for(let n=0;n<t.length;n++){if(!d||t[n].value===void 0||t[n].items===void 0){e[e.length]={dataIndex:o.index,dataItem:t[n],rowType:"data",level:s,expanded:l===void 0||f(l,t[n])},o.index++;continue}r=Math.max(r,s+1);const i=l===void 0||f(l,t[n])===void 0||f(l,t[n]);e[e.length]={dataIndex:-1,dataItem:t[n],level:s,rowType:"groupHeader",expanded:i},i&&(r=Math.max(u(e,t[n].items,a,o,d,l,s+1),r)),(a==="always"||i&&a==="visible")&&(e[e.length]={dataIndex:-1,dataItem:t[n],rowType:"groupFooter",level:s,expanded:i})}return r}function p(e,t,a,o=0){const d=[];if(!e)return[];e&&e.length===void 0&&(e=[e]),e.filter(r=>r&&r.props?!r.props.hidden:!r.hidden).forEach((r,n)=>{r=r.props?r.props:r;const i=t[n]||null,h=p(r.children,i&&i.children||[],a,o+1);d.push(Object.assign({depth:o},x.gridDefaultProps,h.length?{cell:()=>null,filterCell:()=>null}:{},i?{width:i.width,orderIndex:i.orderIndex}:{},r,{id:r.id?r.id:g.tableKeyboardNavigationTools.generateNavigatableId(`${a.prevId++}`,a.idPrefix,"column"),declarationIndex:d.length,children:h,rowSpan:0,colSpan:0,isAccessible:!0,left:i&&Math.floor(i.left),right:i&&Math.floor(i.right)}))});const s=(r,n)=>r.orderIndex===n.orderIndex?r.declarationIndex-n.declarationIndex:(r.orderIndex||0)-(n.orderIndex||0);if(d.sort(s),o===0){const r=[],n=(i,h)=>i.forEach(c=>{c.parentIndex=h,n(c.children,r.push(c)-1)});return n(d,-1),r}return d}function v(e,t,a,o){let d=[];Array.isArray(e)?d=e:e&&(d=e.data);const l=[];if(d.length>0){let s=d[0];if(t)for(let n=0;n<t.length;n++)s=s.items&&s.items[0];Object.getOwnPropertyNames(s).forEach(n=>{n!==a&&l.push(Object.assign({id:g.tableKeyboardNavigationTools.generateNavigatableId(`${o.prevId++}`,o.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,rowSpan:0,index:0,left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0},x.gridDefaultProps,{field:n}))})}return l}const w=(e,t)=>{let a=e[t.parentIndex];for(;a;){if(a.footerCell)return!0;a=e[a.parentIndex]}return!1},y=e=>e.filter(t=>w(e,t)?!1:!!t.footerCell||!(t.children&&t.children.length>0)),b=e=>e.width!==void 0?Math.floor(parseFloat(e.width.toString()))+"px":void 0,S=(e,t)=>t&&t.filter(a=>a.field===e).length>0,I=e=>(e.sort((t,a)=>t.declarationIndex-a.declarationIndex),e.map(t=>{const{declarationIndex:a,parentIndex:o,depth:d,colSpan:l,rowSpan:s,index:r,kFirst:n,children:i,...h}=t;return i.length?{children:I(i),...h}:h})),
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../GridColumn.js"),g=require("@progress/kendo-react-data-tools");function f(e,t){const a=(e||"").split(".");let o=t;return a.forEach(d=>{o=o?o[d]:void 0}),o}function u(e,t,a,o,d,l,s=0){let r=s;for(let n=0;n<t.length;n++){if(!d||t[n].value===void 0||t[n].items===void 0){e[e.length]={dataIndex:o.index,dataItem:t[n],rowType:"data",level:s,expanded:l===void 0||f(l,t[n])},o.index++;continue}r=Math.max(r,s+1);const i=l===void 0||f(l,t[n])===void 0||f(l,t[n]);e[e.length]={dataIndex:-1,dataItem:t[n],level:s,rowType:"groupHeader",expanded:i},i&&(r=Math.max(u(e,t[n].items,a,o,d,l,s+1),r)),(a==="always"||i&&a==="visible")&&(e[e.length]={dataIndex:-1,dataItem:t[n],rowType:"groupFooter",level:s,expanded:i})}return r}function p(e,t,a,o=0){const d=[];if(!e)return[];e&&e.length===void 0&&(e=[e]),e.filter(r=>r&&r.props?!r.props.hidden:!r.hidden).forEach((r,n)=>{r=r.props?r.props:r;const i=t[n]||null,h=p(r.children,i&&i.children||[],a,o+1);d.push(Object.assign({depth:o},x.gridDefaultProps,h.length?{cell:()=>null,filterCell:()=>null}:{},i?{width:i.width,orderIndex:i.orderIndex}:{},r,{id:r.id?r.id:g.tableKeyboardNavigationTools.generateNavigatableId(`${a.prevId++}`,a.idPrefix,"column"),declarationIndex:d.length,children:h,rowSpan:0,colSpan:0,isAccessible:!0,left:r.lockedColumn?i&&Math.floor(i.left):null,right:r.lockedColumn?i&&Math.floor(i.right):null}))});const s=(r,n)=>r.orderIndex===n.orderIndex?r.declarationIndex-n.declarationIndex:(r.orderIndex||0)-(n.orderIndex||0);if(d.sort(s),o===0){const r=[],n=(i,h)=>i.forEach(c=>{c.parentIndex=h,n(c.children,r.push(c)-1)});return n(d,-1),r}return d}function v(e,t,a,o){let d=[];Array.isArray(e)?d=e:e&&(d=e.data);const l=[];if(d.length>0){let s=d[0];if(t)for(let n=0;n<t.length;n++)s=s.items&&s.items[0];Object.getOwnPropertyNames(s).forEach(n=>{n!==a&&l.push(Object.assign({id:g.tableKeyboardNavigationTools.generateNavigatableId(`${o.prevId++}`,o.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,rowSpan:0,index:0,left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0},x.gridDefaultProps,{field:n}))})}return l}const w=(e,t)=>{let a=e[t.parentIndex];for(;a;){if(a.footerCell)return!0;a=e[a.parentIndex]}return!1},y=e=>e.filter(t=>w(e,t)?!1:!!t.footerCell||!(t.children&&t.children.length>0)),b=e=>e.width!==void 0?Math.floor(parseFloat(e.width.toString()))+"px":void 0,S=(e,t)=>t&&t.filter(a=>a.field===e).length>0,I=e=>(e.sort((t,a)=>t.declarationIndex-a.declarationIndex),e.map(t=>{const{declarationIndex:a,parentIndex:o,depth:d,colSpan:l,rowSpan:s,index:r,kFirst:n,children:i,...h}=t;return i.length?{children:I(i),...h}:h})),C=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),m=17895697,M=(e,t)=>{if(!(!e&&!t))return t?e?{...e,...t,select:{...e.select||{},...t.select||{}},hierarchy:{...e.hierarchy||{},...t.hierarchy||{}},group:{...e.group||{},...t.group||{}},edit:{...e.edit||{},...t.edit||{}}}:t:e};exports.autoGenerateColumns=v;exports.firefox=C;exports.firefoxMaxHeight=m;exports.flatData=u;exports.footerColumns=y;exports.getColumnWidth=b;exports.getNestedValue=f;exports.isSorted=S;exports.readColumns=p;exports.resolveCells=M;exports.sanitizeColumns=I;
|
package/utils/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import { gridDefaultProps as x } from "../GridColumn.mjs";
|
|
10
10
|
import { tableKeyboardNavigationTools as g } from "@progress/kendo-react-data-tools";
|
|
11
|
-
function
|
|
11
|
+
function c(e, r) {
|
|
12
12
|
const i = (e || "").split(".");
|
|
13
13
|
let o = r;
|
|
14
14
|
return i.forEach((d) => {
|
|
@@ -24,12 +24,12 @@ function p(e, r, i, o, d, s, h = 0) {
|
|
|
24
24
|
dataItem: r[n],
|
|
25
25
|
rowType: "data",
|
|
26
26
|
level: h,
|
|
27
|
-
expanded: s === void 0 ||
|
|
27
|
+
expanded: s === void 0 || c(s, r[n])
|
|
28
28
|
}, o.index++;
|
|
29
29
|
continue;
|
|
30
30
|
}
|
|
31
31
|
t = Math.max(t, h + 1);
|
|
32
|
-
const a = s === void 0 ||
|
|
32
|
+
const a = s === void 0 || c(s, r[n]) === void 0 || c(s, r[n]);
|
|
33
33
|
e[e.length] = {
|
|
34
34
|
dataIndex: -1,
|
|
35
35
|
dataItem: r[n],
|
|
@@ -75,16 +75,16 @@ function I(e, r, i, o = 0) {
|
|
|
75
75
|
rowSpan: 0,
|
|
76
76
|
colSpan: 0,
|
|
77
77
|
isAccessible: !0,
|
|
78
|
-
left: a && Math.floor(a.left),
|
|
79
|
-
right: a && Math.floor(a.right)
|
|
78
|
+
left: t.lockedColumn ? a && Math.floor(a.left) : null,
|
|
79
|
+
right: t.lockedColumn ? a && Math.floor(a.right) : null
|
|
80
80
|
}
|
|
81
81
|
)
|
|
82
82
|
);
|
|
83
83
|
});
|
|
84
84
|
const h = (t, n) => t.orderIndex === n.orderIndex ? t.declarationIndex - n.declarationIndex : (t.orderIndex || 0) - (n.orderIndex || 0);
|
|
85
85
|
if (d.sort(h), o === 0) {
|
|
86
|
-
const t = [], n = (a, f) => a.forEach((
|
|
87
|
-
|
|
86
|
+
const t = [], n = (a, f) => a.forEach((l) => {
|
|
87
|
+
l.parentIndex = f, n(l.children, t.push(l) - 1);
|
|
88
88
|
});
|
|
89
89
|
return n(d, -1), t;
|
|
90
90
|
}
|
|
@@ -125,7 +125,7 @@ function b(e, r, i, o) {
|
|
|
125
125
|
}
|
|
126
126
|
return s;
|
|
127
127
|
}
|
|
128
|
-
const
|
|
128
|
+
const u = (e, r) => {
|
|
129
129
|
let i = e[r.parentIndex];
|
|
130
130
|
for (; i; ) {
|
|
131
131
|
if (i.footerCell)
|
|
@@ -133,10 +133,10 @@ const v = (e, r) => {
|
|
|
133
133
|
i = e[i.parentIndex];
|
|
134
134
|
}
|
|
135
135
|
return !1;
|
|
136
|
-
}, S = (e) => e.filter((r) =>
|
|
136
|
+
}, S = (e) => e.filter((r) => u(e, r) ? !1 : !!r.footerCell || !(r.children && r.children.length > 0)), m = (e) => e.width !== void 0 ? Math.floor(parseFloat(e.width.toString())) + "px" : void 0, F = (e, r) => r && r.filter((i) => i.field === e).length > 0, v = (e) => (e.sort((r, i) => r.declarationIndex - i.declarationIndex), e.map((r) => {
|
|
137
137
|
const { declarationIndex: i, parentIndex: o, depth: d, colSpan: s, rowSpan: h, index: t, kFirst: n, children: a, ...f } = r;
|
|
138
138
|
return a.length ? {
|
|
139
|
-
children:
|
|
139
|
+
children: v(a),
|
|
140
140
|
...f
|
|
141
141
|
} : f;
|
|
142
142
|
})), M = typeof window != "undefined" && /Firefox/.test(window.navigator.userAgent), A = 17895697, N = (e, r) => {
|
|
@@ -169,9 +169,9 @@ export {
|
|
|
169
169
|
p as flatData,
|
|
170
170
|
S as footerColumns,
|
|
171
171
|
m as getColumnWidth,
|
|
172
|
-
|
|
172
|
+
c as getNestedValue,
|
|
173
173
|
F as isSorted,
|
|
174
174
|
I as readColumns,
|
|
175
175
|
N as resolveCells,
|
|
176
|
-
|
|
176
|
+
v as sanitizeColumns
|
|
177
177
|
};
|