@progress/kendo-react-grid 11.2.0-develop.2 → 11.2.0-develop.3
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/StatusBar.js +1 -1
- package/StatusBar.mjs +1 -1
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/CommonDragLogic.js +1 -1
- package/drag/CommonDragLogic.mjs +49 -42
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +16 -16
package/drag/CommonDragLogic.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 g=require("react"),h=require("@progress/kendo-react-data-tools");function p(
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),h=require("@progress/kendo-react-data-tools");function p(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>o[e]})}}return r.default=o,Object.freeze(r)}const c=p(g);class d{constructor(r,e,i){this.refDragElementClue=c.createRef(),this.refDropElementClue=c.createRef(),this.columns=[],this.reorderable=!1,this.groupable=!1,this.startColumn=-1,this.startGroup=-1,this.currentColumn=-1,this.currentGroup=-1,this.groupPanelDivElement=null,this.refGroupPanelDiv=t=>{this.groupPanelDivElement=t&&t.children?t.children[0]:t},this.pressHandler=(t,n)=>{const u=this.getColumnIndex(t,n);if(this.startGroup=this.getGroupIndex(t),u>=0){const s=this.columns[u];(s.reorderable&&this.reorderable||s.groupable&&this.groupable)&&(this.startColumn=u)}},this.dragHandler=(t,n)=>{var l,a;if(t.isTouch||t.originalEvent.preventDefault(),t.originalEvent.stopPropagation(),this.startColumn===-1&&this.startGroup===-1)return;this.currentColumn=this.getColumnIndex(t,n),this.currentGroup=this.isTargetGroupingContainer(t)?this.getCurrentGroupsLength:this.getGroupIndex(t);const u=!this.isValid();u&&(this.currentColumn=-1,this.currentGroup=-1);let s=null;this.currentColumn>=0?s=n.children[this.columns[this.currentColumn].index]:this.isTargetGroupingContainer(t)?s=this.getEventTarget(t):s=(a=(l=this.groupPanelDivElement)==null?void 0:l.children[this.currentGroup])!=null?a:null,this.updateDragElementClue(t,n,s,u),this.updateDropElementClue(t,n,s,u)},this.releaseHandler=t=>{const n=this.startColumn,u=this.currentColumn,s=this.startGroup,l=this.currentGroup;t.originalEvent.preventDefault(),this.dropElementClue&&this.dropElementClue.setState({visible:!1}),this.dragElementClue&&this.dragElementClue.setState({visible:!1});const a=this.isValid();this.startColumn=this.startGroup=this.currentColumn=this.currentGroup=-1,a&&(n>=0&&u>=0?this.columnReorder(n,u,t.originalEvent):s>=0&&l>=0?this.groupReorder(s,l,t.originalEvent):n>=0&&l>=0&&this.columnToGroup(n,l,t.originalEvent))},this.columnReorder=r,this.groupReorder=e,this.columnToGroup=i}get dragClueRef(){return this.refDragElementClue}get dropClueRef(){return this.refDropElementClue}get getCurrentGroupsLength(){const r=this.groupPanelDivElement&&this.groupPanelDivElement.children;return r&&r.length||0}get dragElementClue(){return this.refDragElementClue.current}get dropElementClue(){return this.refDropElementClue.current}getColumnIndex(r,e){if(!e||e.parentElement===this.groupPanelDivElement)return-1;const i=h.getIndex(r,e);if(i===-1)return-1;for(let t=0;t<e.parentNode.children.length;t++)if(e.parentNode.children[t]===e)return this.columns.findIndex(n=>n.index===i&&n.depth===t);return-1}getEventTarget(r){var t,n;const e=r.originalEvent,i=(t=e.target)==null?void 0:t.ownerDocument;return(n=i==null?void 0:i.elementFromPoint(e.clientX,e.clientY))!=null?n:null}isTargetGroupingContainer(r){var i,t;const e=this.getEventTarget(r);return(t=(i=e==null?void 0:e.classList)==null?void 0:i.contains("k-grouping-drop-container"))!=null?t:!1}getGroupIndex(r){return h.getIndex(r,this.groupPanelDivElement)}isValid(){return this.startGroup>=0?this.currentGroup>=0&&this.currentGroup!==this.startGroup:this.startColumn===-1?!1:this.currentGroup>=0?this.columns[this.startColumn].groupable===!0&&this.groupable===!0:this.reorderable===!0&&this.currentColumn>=0&&this.currentColumn!==this.startColumn&&this.columns[this.startColumn].reorderable===!0&&this.columns[this.currentColumn].parentIndex===this.columns[this.startColumn].parentIndex}updateDragElementClue(r,e,i,t){if(!this.dragElementClue)return;const n=this.startColumn>=0?e.children[this.columns[this.startColumn].index].innerText:e.innerText;this.dragElementClue.setState({visible:!0,top:r.pageY+10,left:r.pageX,innerText:n,status:t||!i?"k-i-cancel":"k-i-plus"})}updateDropElementClue(r,e,i,t){if(!this.dropElementClue)return;if(t||!i){this.dropElementClue.setState({visible:!1});return}const n=i.getBoundingClientRect(),s=(i.closest(".k-grouping-header")||i).getBoundingClientRect();let l=n.left+r.pageX-r.clientX-6;!this.isTargetGroupingContainer(r)&&(this.currentColumn>this.startColumn||this.currentGroup>this.startGroup&&this.startGroup!==-1)&&this.dir!=="rtl"&&(l+=n.width);const a=s.top+r.pageY-r.clientY;this.dropElementClue.setState({visible:!0,top:a,left:l,height:this.currentColumn>=0?e.clientHeight:s.height})}}exports.CommonDragLogic=d;
|
package/drag/CommonDragLogic.mjs
CHANGED
|
@@ -8,29 +8,30 @@
|
|
|
8
8
|
import * as h from "react";
|
|
9
9
|
import { getIndex as a } from "@progress/kendo-react-data-tools";
|
|
10
10
|
class g {
|
|
11
|
-
constructor(
|
|
11
|
+
constructor(r, n, i) {
|
|
12
12
|
this.refDragElementClue = h.createRef(), this.refDropElementClue = h.createRef(), this.columns = [], this.reorderable = !1, this.groupable = !1, this.startColumn = -1, this.startGroup = -1, this.currentColumn = -1, this.currentGroup = -1, this.groupPanelDivElement = null, this.refGroupPanelDiv = (t) => {
|
|
13
13
|
this.groupPanelDivElement = t && t.children ? t.children[0] : t;
|
|
14
|
-
}, this.pressHandler = (t,
|
|
15
|
-
const
|
|
16
|
-
if (this.startGroup = this.getGroupIndex(t),
|
|
17
|
-
const
|
|
18
|
-
(
|
|
14
|
+
}, this.pressHandler = (t, e) => {
|
|
15
|
+
const u = this.getColumnIndex(t, e);
|
|
16
|
+
if (this.startGroup = this.getGroupIndex(t), u >= 0) {
|
|
17
|
+
const s = this.columns[u];
|
|
18
|
+
(s.reorderable && this.reorderable || s.groupable && this.groupable) && (this.startColumn = u);
|
|
19
19
|
}
|
|
20
|
-
}, this.dragHandler = (t,
|
|
20
|
+
}, this.dragHandler = (t, e) => {
|
|
21
|
+
var l, o;
|
|
21
22
|
if (t.isTouch || t.originalEvent.preventDefault(), t.originalEvent.stopPropagation(), this.startColumn === -1 && this.startGroup === -1)
|
|
22
23
|
return;
|
|
23
|
-
this.currentColumn = this.getColumnIndex(t,
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
this.updateDragElementClue(t,
|
|
24
|
+
this.currentColumn = this.getColumnIndex(t, e), this.currentGroup = this.isTargetGroupingContainer(t) ? this.getCurrentGroupsLength : this.getGroupIndex(t);
|
|
25
|
+
const u = !this.isValid();
|
|
26
|
+
u && (this.currentColumn = -1, this.currentGroup = -1);
|
|
27
|
+
let s = null;
|
|
28
|
+
this.currentColumn >= 0 ? s = e.children[this.columns[this.currentColumn].index] : this.isTargetGroupingContainer(t) ? s = this.getEventTarget(t) : s = (o = (l = this.groupPanelDivElement) == null ? void 0 : l.children[this.currentGroup]) != null ? o : null, this.updateDragElementClue(t, e, s, u), this.updateDropElementClue(t, e, s, u);
|
|
28
29
|
}, this.releaseHandler = (t) => {
|
|
29
|
-
const
|
|
30
|
+
const e = this.startColumn, u = this.currentColumn, s = this.startGroup, l = this.currentGroup;
|
|
30
31
|
t.originalEvent.preventDefault(), this.dropElementClue && this.dropElementClue.setState({ visible: !1 }), this.dragElementClue && this.dragElementClue.setState({ visible: !1 });
|
|
31
32
|
const o = this.isValid();
|
|
32
|
-
this.startColumn = this.startGroup = this.currentColumn = this.currentGroup = -1, o && (
|
|
33
|
-
}, this.columnReorder =
|
|
33
|
+
this.startColumn = this.startGroup = this.currentColumn = this.currentGroup = -1, o && (e >= 0 && u >= 0 ? this.columnReorder(e, u, t.originalEvent) : s >= 0 && l >= 0 ? this.groupReorder(s, l, t.originalEvent) : e >= 0 && l >= 0 && this.columnToGroup(e, l, t.originalEvent));
|
|
34
|
+
}, this.columnReorder = r, this.groupReorder = n, this.columnToGroup = i;
|
|
34
35
|
}
|
|
35
36
|
get dragClueRef() {
|
|
36
37
|
return this.refDragElementClue;
|
|
@@ -39,8 +40,8 @@ class g {
|
|
|
39
40
|
return this.refDropElementClue;
|
|
40
41
|
}
|
|
41
42
|
get getCurrentGroupsLength() {
|
|
42
|
-
const
|
|
43
|
-
return
|
|
43
|
+
const r = this.groupPanelDivElement && this.groupPanelDivElement.children;
|
|
44
|
+
return r && r.length || 0;
|
|
44
45
|
}
|
|
45
46
|
get dragElementClue() {
|
|
46
47
|
return this.refDragElementClue.current;
|
|
@@ -48,55 +49,61 @@ class g {
|
|
|
48
49
|
get dropElementClue() {
|
|
49
50
|
return this.refDropElementClue.current;
|
|
50
51
|
}
|
|
51
|
-
getColumnIndex(
|
|
52
|
-
if (!
|
|
52
|
+
getColumnIndex(r, n) {
|
|
53
|
+
if (!n || n.parentElement === this.groupPanelDivElement)
|
|
53
54
|
return -1;
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
55
|
+
const i = a(r, n);
|
|
56
|
+
if (i === -1)
|
|
56
57
|
return -1;
|
|
57
|
-
for (let t = 0; t <
|
|
58
|
-
if (
|
|
59
|
-
return this.columns.findIndex((
|
|
58
|
+
for (let t = 0; t < n.parentNode.children.length; t++)
|
|
59
|
+
if (n.parentNode.children[t] === n)
|
|
60
|
+
return this.columns.findIndex((e) => e.index === i && e.depth === t);
|
|
60
61
|
return -1;
|
|
61
62
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
getEventTarget(r) {
|
|
64
|
+
var t, e;
|
|
65
|
+
const n = r.originalEvent, i = (t = n.target) == null ? void 0 : t.ownerDocument;
|
|
66
|
+
return (e = i == null ? void 0 : i.elementFromPoint(n.clientX, n.clientY)) != null ? e : null;
|
|
65
67
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
isTargetGroupingContainer(r) {
|
|
69
|
+
var i, t;
|
|
70
|
+
const n = this.getEventTarget(r);
|
|
71
|
+
return (t = (i = n == null ? void 0 : n.classList) == null ? void 0 : i.contains("k-grouping-drop-container")) != null ? t : !1;
|
|
72
|
+
}
|
|
73
|
+
getGroupIndex(r) {
|
|
74
|
+
return a(r, this.groupPanelDivElement);
|
|
68
75
|
}
|
|
69
76
|
isValid() {
|
|
70
77
|
return this.startGroup >= 0 ? this.currentGroup >= 0 && this.currentGroup !== this.startGroup : this.startColumn === -1 ? !1 : this.currentGroup >= 0 ? this.columns[this.startColumn].groupable === !0 && this.groupable === !0 : this.reorderable === !0 && this.currentColumn >= 0 && this.currentColumn !== this.startColumn && this.columns[this.startColumn].reorderable === !0 && this.columns[this.currentColumn].parentIndex === this.columns[this.startColumn].parentIndex;
|
|
71
78
|
}
|
|
72
|
-
updateDragElementClue(
|
|
79
|
+
updateDragElementClue(r, n, i, t) {
|
|
73
80
|
if (!this.dragElementClue)
|
|
74
81
|
return;
|
|
75
|
-
const
|
|
82
|
+
const e = this.startColumn >= 0 ? n.children[this.columns[this.startColumn].index].innerText : n.innerText;
|
|
76
83
|
this.dragElementClue.setState({
|
|
77
84
|
visible: !0,
|
|
78
|
-
top:
|
|
79
|
-
left:
|
|
80
|
-
innerText:
|
|
81
|
-
status: t || !
|
|
85
|
+
top: r.pageY + 10,
|
|
86
|
+
left: r.pageX,
|
|
87
|
+
innerText: e,
|
|
88
|
+
status: t || !i ? "k-i-cancel" : "k-i-plus"
|
|
82
89
|
});
|
|
83
90
|
}
|
|
84
|
-
updateDropElementClue(
|
|
91
|
+
updateDropElementClue(r, n, i, t) {
|
|
85
92
|
if (!this.dropElementClue)
|
|
86
93
|
return;
|
|
87
|
-
if (t || !
|
|
94
|
+
if (t || !i) {
|
|
88
95
|
this.dropElementClue.setState({ visible: !1 });
|
|
89
96
|
return;
|
|
90
97
|
}
|
|
91
|
-
const
|
|
92
|
-
let l =
|
|
93
|
-
!this.isTargetGroupingContainer(
|
|
94
|
-
const o =
|
|
98
|
+
const e = i.getBoundingClientRect(), s = (i.closest(".k-grouping-header") || i).getBoundingClientRect();
|
|
99
|
+
let l = e.left + r.pageX - r.clientX - 6;
|
|
100
|
+
!this.isTargetGroupingContainer(r) && (this.currentColumn > this.startColumn || this.currentGroup > this.startGroup && this.startGroup !== -1) && this.dir !== "rtl" && (l += e.width);
|
|
101
|
+
const o = s.top + r.pageY - r.clientY;
|
|
95
102
|
this.dropElementClue.setState({
|
|
96
103
|
visible: !0,
|
|
97
104
|
top: o,
|
|
98
105
|
left: l,
|
|
99
|
-
height: this.currentColumn >= 0 ?
|
|
106
|
+
height: this.currentColumn >= 0 ? n.clientHeight : s.height
|
|
100
107
|
});
|
|
101
108
|
}
|
|
102
109
|
}
|
package/index.d.mts
CHANGED
|
@@ -1395,6 +1395,7 @@ export declare class GridCommonDragLogic {
|
|
|
1395
1395
|
dragHandler: (event: any, element: HTMLTableRowElement | HTMLDivElement) => void;
|
|
1396
1396
|
releaseHandler: (event: any) => void;
|
|
1397
1397
|
private getColumnIndex;
|
|
1398
|
+
private getEventTarget;
|
|
1398
1399
|
private isTargetGroupingContainer;
|
|
1399
1400
|
private getGroupIndex;
|
|
1400
1401
|
private isValid;
|
package/index.d.ts
CHANGED
|
@@ -1395,6 +1395,7 @@ export declare class GridCommonDragLogic {
|
|
|
1395
1395
|
dragHandler: (event: any, element: HTMLTableRowElement | HTMLDivElement) => void;
|
|
1396
1396
|
releaseHandler: (event: any) => void;
|
|
1397
1397
|
private getColumnIndex;
|
|
1398
|
+
private getEventTarget;
|
|
1398
1399
|
private isTargetGroupingContainer;
|
|
1399
1400
|
private getGroupIndex;
|
|
1400
1401
|
private isValid;
|
package/package-metadata.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 e={name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1750165486,version:"11.2.0-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "11.2.0-develop.
|
|
13
|
+
publishDate: 1750165486,
|
|
14
|
+
version: "11.2.0-develop.3",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-grid",
|
|
3
|
-
"version": "11.2.0-develop.
|
|
3
|
+
"version": "11.2.0-develop.3",
|
|
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",
|
|
@@ -28,20 +28,20 @@
|
|
|
28
28
|
"@progress/kendo-data-query": "^1.0.0",
|
|
29
29
|
"@progress/kendo-drawing": "^1.21.2",
|
|
30
30
|
"@progress/kendo-licensing": "^1.6.0",
|
|
31
|
-
"@progress/kendo-react-animation": "11.2.0-develop.
|
|
32
|
-
"@progress/kendo-react-buttons": "11.2.0-develop.
|
|
33
|
-
"@progress/kendo-react-common": "11.2.0-develop.
|
|
34
|
-
"@progress/kendo-react-data-tools": "11.2.0-develop.
|
|
35
|
-
"@progress/kendo-react-dateinputs": "11.2.0-develop.
|
|
36
|
-
"@progress/kendo-react-indicators": "11.2.0-develop.
|
|
37
|
-
"@progress/kendo-react-form": "11.2.0-develop.
|
|
38
|
-
"@progress/kendo-react-labels": "11.2.0-develop.
|
|
39
|
-
"@progress/kendo-react-dialogs": "11.2.0-develop.
|
|
40
|
-
"@progress/kendo-react-dropdowns": "11.2.0-develop.
|
|
41
|
-
"@progress/kendo-react-inputs": "11.2.0-develop.
|
|
42
|
-
"@progress/kendo-react-intl": "11.2.0-develop.
|
|
43
|
-
"@progress/kendo-react-popup": "11.2.0-develop.
|
|
44
|
-
"@progress/kendo-react-layout": "11.2.0-develop.
|
|
31
|
+
"@progress/kendo-react-animation": "11.2.0-develop.3",
|
|
32
|
+
"@progress/kendo-react-buttons": "11.2.0-develop.3",
|
|
33
|
+
"@progress/kendo-react-common": "11.2.0-develop.3",
|
|
34
|
+
"@progress/kendo-react-data-tools": "11.2.0-develop.3",
|
|
35
|
+
"@progress/kendo-react-dateinputs": "11.2.0-develop.3",
|
|
36
|
+
"@progress/kendo-react-indicators": "11.2.0-develop.3",
|
|
37
|
+
"@progress/kendo-react-form": "11.2.0-develop.3",
|
|
38
|
+
"@progress/kendo-react-labels": "11.2.0-develop.3",
|
|
39
|
+
"@progress/kendo-react-dialogs": "11.2.0-develop.3",
|
|
40
|
+
"@progress/kendo-react-dropdowns": "11.2.0-develop.3",
|
|
41
|
+
"@progress/kendo-react-inputs": "11.2.0-develop.3",
|
|
42
|
+
"@progress/kendo-react-intl": "11.2.0-develop.3",
|
|
43
|
+
"@progress/kendo-react-popup": "11.2.0-develop.3",
|
|
44
|
+
"@progress/kendo-react-layout": "11.2.0-develop.3",
|
|
45
45
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
46
46
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
47
47
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"package": {
|
|
146
146
|
"productName": "KendoReact",
|
|
147
147
|
"productCode": "KENDOUIREACT",
|
|
148
|
-
"publishDate":
|
|
148
|
+
"publishDate": 1750165486,
|
|
149
149
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
150
150
|
}
|
|
151
151
|
},
|