@progress/kendo-react-grid 7.3.0-develop.2 → 7.3.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.js +1 -1
- package/Grid.mjs +63 -58
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/CommonDragLogic.js +1 -1
- package/drag/CommonDragLogic.mjs +40 -38
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +43 -37
- package/index.d.mts +2 -0
- package/index.d.ts +2 -0
- package/package-metadata.mjs +1 -1
- package/package.json +10 -10
package/drag/CommonDragLogic.mjs
CHANGED
|
@@ -9,31 +9,29 @@
|
|
|
9
9
|
import * as h from "react";
|
|
10
10
|
import { getIndex as a } from "@progress/kendo-react-data-tools";
|
|
11
11
|
class g {
|
|
12
|
-
constructor(
|
|
12
|
+
constructor(e, i, n) {
|
|
13
13
|
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) => {
|
|
14
14
|
this.groupPanelDivElement = t && t.children ? t.children[0] : t;
|
|
15
|
-
}, this.pressHandler = (t,
|
|
16
|
-
const
|
|
17
|
-
if (this.startGroup = this.getGroupIndex(t),
|
|
18
|
-
const
|
|
19
|
-
(
|
|
15
|
+
}, this.pressHandler = (t, r) => {
|
|
16
|
+
const s = this.getColumnIndex(t, r);
|
|
17
|
+
if (this.startGroup = this.getGroupIndex(t), s >= 0) {
|
|
18
|
+
const u = this.columns[s];
|
|
19
|
+
(u.reorderable && this.reorderable || u.groupable && this.groupable) && (this.startColumn = s);
|
|
20
20
|
}
|
|
21
|
-
}, this.dragHandler = (t,
|
|
21
|
+
}, this.dragHandler = (t, r) => {
|
|
22
22
|
if (t.isTouch || t.originalEvent.preventDefault(), t.originalEvent.stopPropagation(), this.startColumn === -1 && this.startGroup === -1)
|
|
23
23
|
return;
|
|
24
|
-
this.currentColumn = this.getColumnIndex(t,
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
const l = this.currentColumn >= 0 ? e.children[this.columns[this.currentColumn].index] : this.isTargetGroupingContainer(t) ? t.originalEvent.target : this.groupPanelDivElement && this.groupPanelDivElement.children[this.currentGroup];
|
|
30
|
-
this.updateDragElementClue(t, e, l, n), this.updateDropElementClue(t, e, l, n);
|
|
24
|
+
this.currentColumn = this.getColumnIndex(t, r), this.currentGroup = this.isTargetGroupingContainer(t) ? this.getCurrentGroupsLength : this.getGroupIndex(t);
|
|
25
|
+
const s = !this.isValid();
|
|
26
|
+
s && (this.currentColumn = -1, this.currentGroup = -1);
|
|
27
|
+
const u = this.currentColumn >= 0 ? r.children[this.columns[this.currentColumn].index] : this.isTargetGroupingContainer(t) ? t.originalEvent.target : this.groupPanelDivElement && this.groupPanelDivElement.children[this.currentGroup];
|
|
28
|
+
this.updateDragElementClue(t, r, u, s), this.updateDropElementClue(t, r, u, s);
|
|
31
29
|
}, this.releaseHandler = (t) => {
|
|
32
|
-
const
|
|
30
|
+
const r = this.startColumn, s = this.currentColumn, u = this.startGroup, l = this.currentGroup;
|
|
33
31
|
t.originalEvent.preventDefault(), this.dropElementClue && this.dropElementClue.setState({ visible: !1 }), this.dragElementClue && this.dragElementClue.setState({ visible: !1 });
|
|
34
32
|
const o = this.isValid();
|
|
35
|
-
this.startColumn = this.startGroup = this.currentColumn = this.currentGroup = -1, o && (
|
|
36
|
-
}, this.columnReorder =
|
|
33
|
+
this.startColumn = this.startGroup = this.currentColumn = this.currentGroup = -1, o && (r >= 0 && s >= 0 ? this.columnReorder(r, s, t.originalEvent) : u >= 0 && l >= 0 ? this.groupReorder(u, l, t.originalEvent) : r >= 0 && l >= 0 && this.columnToGroup(r, l, t.originalEvent));
|
|
34
|
+
}, this.columnReorder = e, this.groupReorder = i, this.columnToGroup = n;
|
|
37
35
|
}
|
|
38
36
|
get dragClueRef() {
|
|
39
37
|
return this.refDragElementClue;
|
|
@@ -41,61 +39,65 @@ class g {
|
|
|
41
39
|
get dropClueRef() {
|
|
42
40
|
return this.refDropElementClue;
|
|
43
41
|
}
|
|
42
|
+
get getCurrentGroupsLength() {
|
|
43
|
+
const e = this.groupPanelDivElement && this.groupPanelDivElement.children;
|
|
44
|
+
return e && e.length || 0;
|
|
45
|
+
}
|
|
44
46
|
get dragElementClue() {
|
|
45
47
|
return this.refDragElementClue.current;
|
|
46
48
|
}
|
|
47
49
|
get dropElementClue() {
|
|
48
50
|
return this.refDropElementClue.current;
|
|
49
51
|
}
|
|
50
|
-
getColumnIndex(
|
|
52
|
+
getColumnIndex(e, i) {
|
|
51
53
|
if (!i || i.parentElement === this.groupPanelDivElement)
|
|
52
54
|
return -1;
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
+
const n = a(e, i);
|
|
56
|
+
if (n === -1)
|
|
55
57
|
return -1;
|
|
56
58
|
for (let t = 0; t < i.parentNode.children.length; t++)
|
|
57
59
|
if (i.parentNode.children[t] === i)
|
|
58
|
-
return this.columns.findIndex((
|
|
60
|
+
return this.columns.findIndex((r) => r.index === n && r.depth === t);
|
|
59
61
|
return -1;
|
|
60
62
|
}
|
|
61
|
-
isTargetGroupingContainer(
|
|
62
|
-
const i =
|
|
63
|
+
isTargetGroupingContainer(e) {
|
|
64
|
+
const i = e.originalEvent.target;
|
|
63
65
|
return i.className.indexOf ? i.className.indexOf("k-grouping-drop-container") !== -1 : !1;
|
|
64
66
|
}
|
|
65
|
-
getGroupIndex(
|
|
66
|
-
return a(
|
|
67
|
+
getGroupIndex(e) {
|
|
68
|
+
return a(e, this.groupPanelDivElement);
|
|
67
69
|
}
|
|
68
70
|
isValid() {
|
|
69
71
|
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;
|
|
70
72
|
}
|
|
71
|
-
updateDragElementClue(
|
|
73
|
+
updateDragElementClue(e, i, n, t) {
|
|
72
74
|
if (!this.dragElementClue)
|
|
73
75
|
return;
|
|
74
|
-
const
|
|
76
|
+
const r = this.startColumn >= 0 ? i.children[this.columns[this.startColumn].index].innerText : i.innerText;
|
|
75
77
|
this.dragElementClue.setState({
|
|
76
78
|
visible: !0,
|
|
77
|
-
top:
|
|
78
|
-
left:
|
|
79
|
-
innerText:
|
|
80
|
-
status: t || !
|
|
79
|
+
top: e.pageY + 10,
|
|
80
|
+
left: e.pageX,
|
|
81
|
+
innerText: r,
|
|
82
|
+
status: t || !n ? "k-i-cancel" : "k-i-plus"
|
|
81
83
|
});
|
|
82
84
|
}
|
|
83
|
-
updateDropElementClue(
|
|
85
|
+
updateDropElementClue(e, i, n, t) {
|
|
84
86
|
if (!this.dropElementClue)
|
|
85
87
|
return;
|
|
86
|
-
if (t || !
|
|
88
|
+
if (t || !n) {
|
|
87
89
|
this.dropElementClue.setState({ visible: !1 });
|
|
88
90
|
return;
|
|
89
91
|
}
|
|
90
|
-
const
|
|
91
|
-
let l =
|
|
92
|
-
!this.isTargetGroupingContainer(
|
|
93
|
-
const o =
|
|
92
|
+
const r = n.getBoundingClientRect(), u = (n.closest(".k-grouping-header") || n).getBoundingClientRect();
|
|
93
|
+
let l = r.left + e.pageX - e.clientX - 6;
|
|
94
|
+
!this.isTargetGroupingContainer(e) && (this.currentColumn > this.startColumn || this.currentGroup > this.startGroup && this.startGroup !== -1) && (l += r.width);
|
|
95
|
+
const o = u.top + e.pageY - e.clientY;
|
|
94
96
|
this.dropElementClue.setState({
|
|
95
97
|
visible: !0,
|
|
96
98
|
top: o,
|
|
97
99
|
left: l,
|
|
98
|
-
height: this.currentColumn >= 0 ? i.clientHeight :
|
|
100
|
+
height: this.currentColumn >= 0 ? i.clientHeight : u.height
|
|
99
101
|
});
|
|
100
102
|
}
|
|
101
103
|
}
|
package/header/HeaderRow.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
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),v=require("../interfaces/GridSortSettings.js"),E=require("../drag/ColumnDraggable.js"),M=require("./GridHeaderCell.js"),d=require("@progress/kendo-react-common"),b=require("@progress/kendo-react-data-tools"),y=require("@progress/kendo-react-intl"),m=require("../messages/index.js"),k=require("@progress/kendo-svg-icons"),K=require("../utils/index.js");function N(c){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const s in c)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(c,s);Object.defineProperty(r,s,o.get?o:{enumerable:!0,get:()=>c[s]})}}return r.default=c,Object.freeze(r)}const l=N(q),O={true:{asc:"desc",desc:"","":"asc"},false:{asc:"desc",desc:"asc","":"asc"}},G={none:"none",asc:"ascending",desc:"descending"};class R extends l.Component{constructor(r){super(r),this.serviceIndex=0,this.index=-1,this.cellKeyDown=(s,o)=>{if(s.isDefaultPrevented())return;const{keyCode:e,metaKey:i,ctrlKey:n}=s;if(this.props.sortable&&o.sortable&&s.keyCode===d.Keys.enter&&this.cellClick(s,o),i&&e===d.Keys.enter||n&&e===d.Keys.space){const a=this.props.columns.findIndex(h=>h.field===o.field);this.props.columnGroupChange&&this.props.columnGroupChange(a,s)}},this.cells=s=>s.map(o=>{const e=this.props.columns[o],i=this.props.sortable&&e.sortable,n=this.props.sort?this.props.sort.findIndex(t=>t.field===e.field):-1,p=n>=0&&this.props.sort[n].dir||"none",a=e.columnMenu===null?null:e.columnMenu||this.props.columnMenu,h=d.classNames({"k-first":e.kFirst,"k-filterable":!!a,"k-table-th":!0,"k-header":!0,"k-grid-header-sticky":e.locked,"k-sorted":this.props.sort&&this.props.sort.some(t=>t.field===e.field)},e.headerClassName);e.locked===!1&&(e.left=0);const S=e.left!==void 0?this.props.isRtl?{left:e.right,right:e.left}:{left:e.left,right:e.right}:{},D=y.provideLocalizationService(this).toLanguageString(m.sortAriaLabel,m.messages[m.sortAriaLabel]),H=e.isAccessible?{ariaSort:G[p],role:"columnheader",ariaColumnIndex:e.ariaColumnIndex,ariaSelected:!1,ariaDescription:i?D:""}:{role:"presentation"},u=e.declarationIndex>=0?++this.index:--this.serviceIndex,x=e.headerCell?e.headerCell:M.GridHeaderCell,z=l.createElement(x,{key:1,field:e.field,onClick:i&&(t=>this.cellClick(t,e))||void 0,selectionChange:this.props.selectionChange,title:e.title,selectionValue:e.headerSelectionValue,render:this.props.cellRender,children:this.sortIcon(n),columnMenuWrapperProps:{column:{field:e.field,title:e.title,locked:e.locked,filter:e.filter,id:e.id},sortable:i&&this.props.sortable,sort:this.props.sort,onSortChange:this.props.sortChange,filter:this.props.filter,filterable:this.props.filterable&&e.filterable,filterOperators:this.props.filterOperators,onFilterChange:this.props.filterChange,group:this.props.group,groupable:this.props.groupable,onGroupChange:this.props.groupChange,columnMenu:a}}),g={...H,key:u,colSpan:e.colSpan,rowSpan:e.rowSpan,className:h,style:S,columnId:e.id,navigatable:e.navigatable,onKeyDown:t=>this.cellKeyDown(t,e),role:"columnheader"},C=[z,this.props.columnResize&&this.props.columnResize.resizable&&e.resizable&&l.createElement(b.ColumnResizer,{key:2,resize:(t,I,w)=>this.props.columnResize&&this.props.columnResize.dragHandler(t,e,I,w),autofit:t=>this.props.columnResize&&this.props.columnResize.dblClickHandler(t,[e.id])})],f=K.resolveCells(this.props.cells,e.cells);if(f&&f.headerCell){const t=f.headerCell;return l.createElement(t,{key:u,thProps:g,index:o},C)}return l.createElement(b.HeaderThElement,{...g,key:u},C)}),this.cellClick=this.cellClick.bind(this)}cellClick(r,s){if(r.preventDefault(),!this.props.sortChange)return;const{allowUnsort:o,mode:e}=v.normalize(this.props.sortable||!1,s.sortable||!1),i=(this.props.sort||[]).filter(a=>a.field===s.field)[0],n=O[o][i&&i.dir||""],p=e==="single"?[]:(this.props.sort||[]).filter(a=>a.field!==s.field);n!==""&&s.field&&p.push({field:s.field,dir:n}),this.props.sortChange(p,r)}sortIcon(r){return this.props.sort?r>=0&&[l.createElement("span",{key:1,className:"k-sort-icon"},l.createElement(d.IconWrap,{name:"sort-"+this.props.sort[r].dir+"-small",icon:this.props.sort[r].dir==="asc"?k.sortAscSmallIcon:k.sortDescSmallIcon})),this.props.sort.length>1&&l.createElement("span",{key:2,className:"k-sort-icon"},l.createElement("span",{className:"k-sort-order"},r+1))]:null}render(){return this.serviceIndex=0,this.index=-1,this.props.columnsMap.map((r,s)=>this.props.pressHandler&&l.createElement(E.ColumnDraggable,{key:s,pressHandler:this.props.pressHandler,dragHandler:this.props.dragHandler,releaseHandler:this.props.releaseHandler,ariaRowIndex:s+1,dragClue:this.props.dragClue,headerRef:this.props.headerRef,containerRef:this.props.containerRef},this.cells(r))||l.createElement("tr",{key:s,className:"k-table-row",role:"row","aria-rowindex":s+1},this.cells(r)))}}y.registerForLocalization(R);exports.HeaderRow=R;
|
package/header/HeaderRow.mjs
CHANGED
|
@@ -9,27 +9,33 @@
|
|
|
9
9
|
import * as o from "react";
|
|
10
10
|
import { normalize as z } from "../interfaces/GridSortSettings.mjs";
|
|
11
11
|
import { ColumnDraggable as H } from "../drag/ColumnDraggable.mjs";
|
|
12
|
-
import { GridHeaderCell as
|
|
13
|
-
import { Keys as
|
|
14
|
-
import { ColumnResizer as E, HeaderThElement as
|
|
12
|
+
import { GridHeaderCell as I } from "./GridHeaderCell.mjs";
|
|
13
|
+
import { Keys as m, classNames as w, IconWrap as D } from "@progress/kendo-react-common";
|
|
14
|
+
import { ColumnResizer as E, HeaderThElement as v } from "@progress/kendo-react-data-tools";
|
|
15
15
|
import { provideLocalizationService as M, registerForLocalization as N } from "@progress/kendo-react-intl";
|
|
16
|
-
import { sortAriaLabel as
|
|
17
|
-
import { sortAscSmallIcon as
|
|
18
|
-
import { resolveCells as
|
|
19
|
-
const
|
|
16
|
+
import { sortAriaLabel as g, messages as K } from "../messages/index.mjs";
|
|
17
|
+
import { sortAscSmallIcon as L, sortDescSmallIcon as A } from "@progress/kendo-svg-icons";
|
|
18
|
+
import { resolveCells as G } from "../utils/index.mjs";
|
|
19
|
+
const F = {
|
|
20
20
|
true: { asc: "desc", desc: "", "": "asc" },
|
|
21
21
|
false: { asc: "desc", desc: "asc", "": "asc" }
|
|
22
|
-
},
|
|
22
|
+
}, P = {
|
|
23
23
|
none: "none",
|
|
24
24
|
asc: "ascending",
|
|
25
25
|
desc: "descending"
|
|
26
26
|
};
|
|
27
27
|
class O extends o.Component {
|
|
28
28
|
constructor(t) {
|
|
29
|
-
super(t), this.serviceIndex = 0, this.index = -1, this.cellKeyDown = (s,
|
|
30
|
-
s.isDefaultPrevented()
|
|
31
|
-
|
|
32
|
-
const
|
|
29
|
+
super(t), this.serviceIndex = 0, this.index = -1, this.cellKeyDown = (s, l) => {
|
|
30
|
+
if (s.isDefaultPrevented())
|
|
31
|
+
return;
|
|
32
|
+
const { keyCode: e, metaKey: i, ctrlKey: a } = s;
|
|
33
|
+
if (this.props.sortable && l.sortable && s.keyCode === m.enter && this.cellClick(s, l), i && e === m.enter || a && e === m.space) {
|
|
34
|
+
const n = this.props.columns.findIndex((c) => c.field === l.field);
|
|
35
|
+
this.props.columnGroupChange && this.props.columnGroupChange(n, s);
|
|
36
|
+
}
|
|
37
|
+
}, this.cells = (s) => s.map((l) => {
|
|
38
|
+
const e = this.props.columns[l], i = this.props.sortable && e.sortable, a = this.props.sort ? this.props.sort.findIndex((r) => r.field === e.field) : -1, p = a >= 0 && this.props.sort[a].dir || "none", n = e.columnMenu === null ? null : e.columnMenu || this.props.columnMenu, c = w({
|
|
33
39
|
"k-first": e.kFirst,
|
|
34
40
|
"k-filterable": !!n,
|
|
35
41
|
"k-table-th": !0,
|
|
@@ -38,20 +44,20 @@ class O extends o.Component {
|
|
|
38
44
|
"k-sorted": this.props.sort && this.props.sort.some((r) => r.field === e.field)
|
|
39
45
|
}, e.headerClassName);
|
|
40
46
|
e.locked === !1 && (e.left = 0);
|
|
41
|
-
const
|
|
42
|
-
ariaSort:
|
|
47
|
+
const C = e.left !== void 0 ? this.props.isRtl ? { left: e.right, right: e.left } : { left: e.left, right: e.right } : {}, k = M(this).toLanguageString(g, K[g]), b = e.isAccessible ? {
|
|
48
|
+
ariaSort: P[p],
|
|
43
49
|
role: "columnheader",
|
|
44
50
|
ariaColumnIndex: e.ariaColumnIndex,
|
|
45
51
|
ariaSelected: !1,
|
|
46
|
-
ariaDescription:
|
|
52
|
+
ariaDescription: i ? k : ""
|
|
47
53
|
} : {
|
|
48
54
|
role: "presentation"
|
|
49
|
-
},
|
|
50
|
-
|
|
55
|
+
}, d = e.declarationIndex >= 0 ? ++this.index : --this.serviceIndex, y = e.headerCell ? e.headerCell : I, R = /* @__PURE__ */ o.createElement(
|
|
56
|
+
y,
|
|
51
57
|
{
|
|
52
58
|
key: 1,
|
|
53
59
|
field: e.field,
|
|
54
|
-
onClick:
|
|
60
|
+
onClick: i && ((r) => this.cellClick(r, e)) || void 0,
|
|
55
61
|
selectionChange: this.props.selectionChange,
|
|
56
62
|
title: e.title,
|
|
57
63
|
selectionValue: e.headerSelectionValue,
|
|
@@ -65,7 +71,7 @@ class O extends o.Component {
|
|
|
65
71
|
filter: e.filter,
|
|
66
72
|
id: e.id
|
|
67
73
|
},
|
|
68
|
-
sortable:
|
|
74
|
+
sortable: i && this.props.sortable,
|
|
69
75
|
sort: this.props.sort,
|
|
70
76
|
onSortChange: this.props.sortChange,
|
|
71
77
|
filter: this.props.filter,
|
|
@@ -78,46 +84,46 @@ class O extends o.Component {
|
|
|
78
84
|
columnMenu: n
|
|
79
85
|
}
|
|
80
86
|
}
|
|
81
|
-
),
|
|
82
|
-
...
|
|
83
|
-
key:
|
|
87
|
+
), f = {
|
|
88
|
+
...b,
|
|
89
|
+
key: d,
|
|
84
90
|
colSpan: e.colSpan,
|
|
85
91
|
rowSpan: e.rowSpan,
|
|
86
|
-
className:
|
|
87
|
-
style:
|
|
92
|
+
className: c,
|
|
93
|
+
style: C,
|
|
88
94
|
columnId: e.id,
|
|
89
95
|
navigatable: e.navigatable,
|
|
90
|
-
onKeyDown:
|
|
96
|
+
onKeyDown: (r) => this.cellKeyDown(r, e),
|
|
91
97
|
role: "columnheader"
|
|
92
|
-
},
|
|
98
|
+
}, u = [
|
|
93
99
|
R,
|
|
94
100
|
this.props.columnResize && this.props.columnResize.resizable && e.resizable && /* @__PURE__ */ o.createElement(
|
|
95
101
|
E,
|
|
96
102
|
{
|
|
97
103
|
key: 2,
|
|
98
|
-
resize: (r,
|
|
104
|
+
resize: (r, S, x) => this.props.columnResize && this.props.columnResize.dragHandler(r, e, S, x),
|
|
99
105
|
autofit: (r) => this.props.columnResize && this.props.columnResize.dblClickHandler(r, [e.id])
|
|
100
106
|
}
|
|
101
107
|
)
|
|
102
|
-
],
|
|
103
|
-
if (
|
|
104
|
-
const r =
|
|
105
|
-
return /* @__PURE__ */ o.createElement(r, { key:
|
|
108
|
+
], h = G(this.props.cells, e.cells);
|
|
109
|
+
if (h && h.headerCell) {
|
|
110
|
+
const r = h.headerCell;
|
|
111
|
+
return /* @__PURE__ */ o.createElement(r, { key: d, thProps: f, index: l }, u);
|
|
106
112
|
}
|
|
107
113
|
return /* @__PURE__ */ o.createElement(
|
|
108
|
-
|
|
114
|
+
v,
|
|
109
115
|
{
|
|
110
|
-
...
|
|
111
|
-
key:
|
|
116
|
+
...f,
|
|
117
|
+
key: d
|
|
112
118
|
},
|
|
113
|
-
|
|
119
|
+
u
|
|
114
120
|
);
|
|
115
121
|
}), this.cellClick = this.cellClick.bind(this);
|
|
116
122
|
}
|
|
117
123
|
cellClick(t, s) {
|
|
118
124
|
if (t.preventDefault(), !this.props.sortChange)
|
|
119
125
|
return;
|
|
120
|
-
const { allowUnsort:
|
|
126
|
+
const { allowUnsort: l, mode: e } = z(this.props.sortable || !1, s.sortable || !1), i = (this.props.sort || []).filter((n) => n.field === s.field)[0], a = F[l][i && i.dir || ""], p = e === "single" ? [] : (this.props.sort || []).filter((n) => n.field !== s.field);
|
|
121
127
|
a !== "" && s.field && p.push({ field: s.field, dir: a }), this.props.sortChange(p, t);
|
|
122
128
|
}
|
|
123
129
|
sortIcon(t) {
|
|
@@ -126,7 +132,7 @@ class O extends o.Component {
|
|
|
126
132
|
D,
|
|
127
133
|
{
|
|
128
134
|
name: "sort-" + this.props.sort[t].dir + "-small",
|
|
129
|
-
icon: this.props.sort[t].dir === "asc" ?
|
|
135
|
+
icon: this.props.sort[t].dir === "asc" ? L : A
|
|
130
136
|
}
|
|
131
137
|
)),
|
|
132
138
|
this.props.sort.length > 1 && /* @__PURE__ */ o.createElement("span", { key: 2, className: "k-sort-icon" }, /* @__PURE__ */ o.createElement("span", { className: "k-sort-order" }, t + 1))
|
package/index.d.mts
CHANGED
|
@@ -460,6 +460,7 @@ export declare class GridClassComponent extends React_2.Component<GridProps> {
|
|
|
460
460
|
private columnReorder;
|
|
461
461
|
private groupReorder;
|
|
462
462
|
private columnToGroup;
|
|
463
|
+
private columnGroupChange;
|
|
463
464
|
private resetTableWidth;
|
|
464
465
|
private onClipboard;
|
|
465
466
|
private inActiveElement;
|
|
@@ -1391,6 +1392,7 @@ export declare class GridCommonDragLogic {
|
|
|
1391
1392
|
private groupPanelDivElement;
|
|
1392
1393
|
get dragClueRef(): React_2.RefObject<DragClue | null>;
|
|
1393
1394
|
get dropClueRef(): React_2.RefObject<DropClue | null>;
|
|
1395
|
+
get getCurrentGroupsLength(): number;
|
|
1394
1396
|
private get dragElementClue();
|
|
1395
1397
|
private get dropElementClue();
|
|
1396
1398
|
constructor(columnReorder: handler, groupReorder: handler, columnToGroup: handler);
|
package/index.d.ts
CHANGED
|
@@ -460,6 +460,7 @@ export declare class GridClassComponent extends React_2.Component<GridProps> {
|
|
|
460
460
|
private columnReorder;
|
|
461
461
|
private groupReorder;
|
|
462
462
|
private columnToGroup;
|
|
463
|
+
private columnGroupChange;
|
|
463
464
|
private resetTableWidth;
|
|
464
465
|
private onClipboard;
|
|
465
466
|
private inActiveElement;
|
|
@@ -1391,6 +1392,7 @@ export declare class GridCommonDragLogic {
|
|
|
1391
1392
|
private groupPanelDivElement;
|
|
1392
1393
|
get dragClueRef(): React_2.RefObject<DragClue | null>;
|
|
1393
1394
|
get dropClueRef(): React_2.RefObject<DropClue | null>;
|
|
1395
|
+
get getCurrentGroupsLength(): number;
|
|
1394
1396
|
private get dragElementClue();
|
|
1395
1397
|
private get dropElementClue();
|
|
1396
1398
|
constructor(columnReorder: handler, groupReorder: handler, columnToGroup: handler);
|
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: 1710249743,
|
|
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": "7.3.0-develop.
|
|
3
|
+
"version": "7.3.0-develop.4",
|
|
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",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"@progress/kendo-data-query": "^1.0.0",
|
|
26
26
|
"@progress/kendo-drawing": "^1.19.0",
|
|
27
27
|
"@progress/kendo-licensing": "^1.3.4",
|
|
28
|
-
"@progress/kendo-react-animation": "7.3.0-develop.
|
|
29
|
-
"@progress/kendo-react-buttons": "7.3.0-develop.
|
|
30
|
-
"@progress/kendo-react-common": "7.3.0-develop.
|
|
31
|
-
"@progress/kendo-react-data-tools": "7.3.0-develop.
|
|
32
|
-
"@progress/kendo-react-dateinputs": "7.3.0-develop.
|
|
33
|
-
"@progress/kendo-react-dropdowns": "7.3.0-develop.
|
|
34
|
-
"@progress/kendo-react-inputs": "7.3.0-develop.
|
|
35
|
-
"@progress/kendo-react-intl": "7.3.0-develop.
|
|
36
|
-
"@progress/kendo-react-popup": "7.3.0-develop.
|
|
28
|
+
"@progress/kendo-react-animation": "7.3.0-develop.4",
|
|
29
|
+
"@progress/kendo-react-buttons": "7.3.0-develop.4",
|
|
30
|
+
"@progress/kendo-react-common": "7.3.0-develop.4",
|
|
31
|
+
"@progress/kendo-react-data-tools": "7.3.0-develop.4",
|
|
32
|
+
"@progress/kendo-react-dateinputs": "7.3.0-develop.4",
|
|
33
|
+
"@progress/kendo-react-dropdowns": "7.3.0-develop.4",
|
|
34
|
+
"@progress/kendo-react-inputs": "7.3.0-develop.4",
|
|
35
|
+
"@progress/kendo-react-intl": "7.3.0-develop.4",
|
|
36
|
+
"@progress/kendo-react-popup": "7.3.0-develop.4",
|
|
37
37
|
"@progress/kendo-svg-icons": "^2.1.0",
|
|
38
38
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
39
39
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|