@progress/kendo-react-grid 16.2.0-develop.9 → 16.2.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/EULA.pdf +0 -0
- package/EULA.rtf +2730 -0
- package/EULA.txt +292 -0
- package/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +234 -232
- package/VirtualScroll.js +1 -1
- package/VirtualScroll.mjs +9 -9
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +113 -85
- package/header/client/GridCustomHeaderColumnMenu.d.ts +22 -0
- package/header/client/GridCustomHeaderColumnMenu.js +9 -0
- package/header/client/GridCustomHeaderColumnMenu.mjs +28 -0
- package/interfaces/GridCellsSettings.d.ts +32 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +17 -22
- package/utils/wheelTouchScroll.d.ts +5 -4
- package/utils/wheelTouchScroll.js +1 -1
- package/utils/wheelTouchScroll.mjs +22 -22
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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("react"),K=require("./GridHeaderCell.js"),s=require("@progress/kendo-react-common"),Q=require("@progress/kendo-react-data-tools"),h=require("../messages/index.js"),y=require("@progress/kendo-svg-icons"),d=require("../utils/index.js"),v=require("./client/GridHeaderCellContainer.js"),U=require("./client/HeaderRowDraggable.js"),X=require("./client/GridHeaderRowContainer.js"),Y=require("./client/GridHeaderCellElementContainer.js"),Z=require("./client/HeaderCellResizer.js"),p=require("./client/GridCustomHeaderColumnMenu.js");function ee(e){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const t=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(u,a,t.get?t:{enumerable:!0,get:()=>e[a]})}}return u.default=e,Object.freeze(u)}const l=ee(J),ne={none:"none",asc:"ascending",desc:"descending"},le=e=>{const u=e.columnsState||[],a=e.unstyled,t=a&&a.uGrid?a.uGrid:s.uGrid;let O=0,D=-1;const T=o=>{if(!e.sort)return null;const r=s.classNames(t.sortIcon({}));return o>=0&&[l.createElement("span",{key:1,className:r},l.createElement(s.IconWrap,{name:"sort-"+e.sort[o].dir+"-small",icon:e.sort[o].dir==="asc"?y.sortAscSmallIcon:y.sortDescSmallIcon})),e.sort.length>1&&l.createElement("span",{key:2,className:r},l.createElement("span",{className:s.classNames(t.sortOrder({}))},o+1))]},x=o=>o.map(r=>{var R,P,q,w;const n=e.columns[r],m=u[r],C=(P=(R=n.locked)!=null?R:m==null?void 0:m.locked)!=null?P:!1,f=e.sortable&&n.sortable,b=e.sort?e.sort.findIndex(i=>i.field===n.field):-1,z=b>=0&&e.sort[b].dir||"none",g=n.disableColumnMenu?null:n.columnMenu||e.columnMenu,j=n.menuIcon||e.columnMenuIcon,A=s.classNames(s.classNames(t.headerTh({first:n.kFirst,filterable:!!g,locked:C,sorted:e.sort&&e.sort.some(i=>i.field===n.field),sortable:f})),n.headerClassName);C===!1&&(n.left=0);const L=e.localization.toLanguageString(h.sortAriaLabel,h.messages[h.sortAriaLabel]),V=n.isAccessible?{ariaSort:ne[z],role:"columnheader",ariaColumnIndex:n.ariaColumnIndex,ariaSelected:!1,ariaDescription:f?L:"",ariaHasPopup:g?"dialog":void 0}:{role:"presentation"},E=n.declarationIndex>=0?++D:--O,c={field:n.field,title:n.title,isGroupColumn:n.isGroupColumn,selectionValue:(q=n.headerSelectionValue)!=null?q:e.headerSelectionValue,children:T(b),selectionChange:null,columnMenuWrapperProps:{column:{field:(w=n.groupField)!=null?w:n.field,title:n.title,locked:C,filter:n.filter,id:n.id},sortable:f&&e.sortable,sort:e.sort,filter:e.filter,filterable:e.filterable&&n.filterable,filterOperators:e.filterOperators,navigatable:e.navigatable,group:e.group,groupable:e.groupable,columnMenu:g,columnMenuIcon:j}},H={...V,colSpan:n.headerColSpan,rowSpan:n.rowSpan,className:A,columnId:n.id,navigatable:n.navigatable,role:"columnheader"},M=d.clientColumn(n),G={column:M,sortable:e.sortable,sort:e.sort,columnMenuWrapperProps:c.columnMenuWrapperProps},I=n.defaultHeaderCell?n.defaultHeaderCell:K.GridHeaderCell,N=l.createElement(Z.HeaderCellResizer,{key:2,column:M}),k=[l.createElement(v.GridHeaderCellContainer,{key:1,...G,isClient:d.isClientReference(I)},l.createElement(I,{...c})),N],S=d.resolveCells(e.cells,n.cells);if(S&&S.headerCell){const i=S.headerCell,_=d.isClientReference(i),F=l.createElement("span",{className:s.classNames(t.columnTitle({}),n.isGroupColumn&&t.groupingRowText({}))},n.title||n.field||" "),$=c.children||null,B=c.columnMenuWrapperProps.columnMenu?l.createElement(p.GridCustomHeaderColumnMenu,{columnMenuWrapperProps:c.columnMenuWrapperProps,field:n.field}):null;return l.createElement(v.GridHeaderCellContainer,{key:E,...G,thProps:H,isCustom:!0,isClient:_},l.createElement(i,{...c,thProps:H,index:r,titleElement:F,sortIcon:$,columnMenu:B,resizer:N},k))}return l.createElement(Y.GridHeaderCellElementContainer,{key:E,column:M},l.createElement(Q.HeaderThElement,{...H},k))}),W=e.columns.map(d.clientColumn);return l.createElement(X.GridHeaderRowContainer,{sortable:e.sortable,sort:e.sort,navigatable:e.navigatable,groupable:e.groupable,columns:W},e.columnsMap.map((o,r)=>l.createElement(U.HeaderRowDraggable,{key:r,className:s.classNames(t.simpleTr({})),ariaRowIndex:r+1},x(o))))};exports.HeaderRow=le;
|
package/header/HeaderRow.mjs
CHANGED
|
@@ -6,133 +6,161 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as t from "react";
|
|
9
|
-
import { GridHeaderCell as
|
|
10
|
-
import { uGrid as
|
|
11
|
-
import { HeaderThElement as
|
|
12
|
-
import { sortAriaLabel as
|
|
13
|
-
import { sortAscSmallIcon as
|
|
14
|
-
import { clientColumn as
|
|
9
|
+
import { GridHeaderCell as K } from "./GridHeaderCell.mjs";
|
|
10
|
+
import { uGrid as Q, classNames as c, IconWrap as U } from "@progress/kendo-react-common";
|
|
11
|
+
import { HeaderThElement as X } from "@progress/kendo-react-data-tools";
|
|
12
|
+
import { sortAriaLabel as v, messages as Y } from "../messages/index.mjs";
|
|
13
|
+
import { sortAscSmallIcon as Z, sortDescSmallIcon as _ } from "@progress/kendo-svg-icons";
|
|
14
|
+
import { clientColumn as w, isClientReference as y, resolveCells as $ } from "../utils/index.mjs";
|
|
15
15
|
import { GridHeaderCellContainer as R } from "./client/GridHeaderCellContainer.mjs";
|
|
16
|
-
import { HeaderRowDraggable as
|
|
17
|
-
import { GridHeaderRowContainer as
|
|
18
|
-
import { GridHeaderCellElementContainer as
|
|
19
|
-
import { HeaderCellResizer as
|
|
20
|
-
|
|
16
|
+
import { HeaderRowDraggable as ee } from "./client/HeaderRowDraggable.mjs";
|
|
17
|
+
import { GridHeaderRowContainer as le } from "./client/GridHeaderRowContainer.mjs";
|
|
18
|
+
import { GridHeaderCellElementContainer as te } from "./client/GridHeaderCellElementContainer.mjs";
|
|
19
|
+
import { HeaderCellResizer as ne } from "./client/HeaderCellResizer.mjs";
|
|
20
|
+
import { GridCustomHeaderColumnMenu as oe } from "./client/GridCustomHeaderColumnMenu.mjs";
|
|
21
|
+
const re = {
|
|
21
22
|
none: "none",
|
|
22
23
|
asc: "ascending",
|
|
23
24
|
desc: "descending"
|
|
24
|
-
},
|
|
25
|
-
const
|
|
26
|
-
let x = 0,
|
|
27
|
-
const
|
|
28
|
-
if (!
|
|
25
|
+
}, Ee = (l) => {
|
|
26
|
+
const W = l.columnsState || [], i = l.unstyled, r = i && i.uGrid ? i.uGrid : Q;
|
|
27
|
+
let x = 0, T = -1;
|
|
28
|
+
const z = (o) => {
|
|
29
|
+
if (!l.sort)
|
|
29
30
|
return null;
|
|
30
|
-
const n = r
|
|
31
|
-
return
|
|
31
|
+
const n = c(r.sortIcon({}));
|
|
32
|
+
return o >= 0 && [
|
|
32
33
|
/* @__PURE__ */ t.createElement("span", { key: 1, className: n }, /* @__PURE__ */ t.createElement(
|
|
33
|
-
|
|
34
|
+
U,
|
|
34
35
|
{
|
|
35
|
-
name: "sort-" +
|
|
36
|
-
icon:
|
|
36
|
+
name: "sort-" + l.sort[o].dir + "-small",
|
|
37
|
+
icon: l.sort[o].dir === "asc" ? Z : _
|
|
37
38
|
}
|
|
38
39
|
)),
|
|
39
|
-
|
|
40
|
+
l.sort.length > 1 && /* @__PURE__ */ t.createElement("span", { key: 2, className: n }, /* @__PURE__ */ t.createElement("span", { className: c(r.sortOrder({})) }, o + 1))
|
|
40
41
|
];
|
|
41
|
-
},
|
|
42
|
-
var
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
first:
|
|
47
|
-
filterable: !!
|
|
48
|
-
locked:
|
|
49
|
-
sorted:
|
|
42
|
+
}, A = (o) => o.map((n) => {
|
|
43
|
+
var k, G, N, P;
|
|
44
|
+
const e = l.columns[n], m = W[n], u = (G = (k = e.locked) != null ? k : m == null ? void 0 : m.locked) != null ? G : !1, d = l.sortable && e.sortable, f = l.sort ? l.sort.findIndex((s) => s.field === e.field) : -1, L = f >= 0 && l.sort[f].dir || "none", C = e.disableColumnMenu ? null : e.columnMenu || l.columnMenu, O = e.menuIcon || l.columnMenuIcon, V = c(
|
|
45
|
+
c(
|
|
46
|
+
r.headerTh({
|
|
47
|
+
first: e.kFirst,
|
|
48
|
+
filterable: !!C,
|
|
49
|
+
locked: u,
|
|
50
|
+
sorted: l.sort && l.sort.some((s) => s.field === e.field),
|
|
50
51
|
sortable: d
|
|
51
52
|
})
|
|
52
53
|
),
|
|
53
|
-
|
|
54
|
+
e.headerClassName
|
|
54
55
|
);
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
ariaSort:
|
|
56
|
+
u === !1 && (e.left = 0);
|
|
57
|
+
const p = l.localization.toLanguageString(v, Y[v]), F = e.isAccessible ? {
|
|
58
|
+
ariaSort: re[L],
|
|
58
59
|
role: "columnheader",
|
|
59
|
-
ariaColumnIndex:
|
|
60
|
+
ariaColumnIndex: e.ariaColumnIndex,
|
|
60
61
|
ariaSelected: !1,
|
|
61
|
-
ariaDescription: d ?
|
|
62
|
-
ariaHasPopup:
|
|
62
|
+
ariaDescription: d ? p : "",
|
|
63
|
+
ariaHasPopup: C ? "dialog" : void 0
|
|
63
64
|
} : {
|
|
64
65
|
role: "presentation"
|
|
65
|
-
},
|
|
66
|
-
field:
|
|
67
|
-
title:
|
|
68
|
-
isGroupColumn:
|
|
69
|
-
selectionValue: (
|
|
70
|
-
children:
|
|
66
|
+
}, M = e.declarationIndex >= 0 ? ++T : --x, a = {
|
|
67
|
+
field: e.field,
|
|
68
|
+
title: e.title,
|
|
69
|
+
isGroupColumn: e.isGroupColumn,
|
|
70
|
+
selectionValue: (N = e.headerSelectionValue) != null ? N : l.headerSelectionValue,
|
|
71
|
+
children: z(f),
|
|
71
72
|
selectionChange: null,
|
|
72
73
|
columnMenuWrapperProps: {
|
|
73
74
|
column: {
|
|
74
|
-
field: (
|
|
75
|
-
title:
|
|
76
|
-
locked:
|
|
77
|
-
filter:
|
|
78
|
-
id:
|
|
75
|
+
field: (P = e.groupField) != null ? P : e.field,
|
|
76
|
+
title: e.title,
|
|
77
|
+
locked: u,
|
|
78
|
+
filter: e.filter,
|
|
79
|
+
id: e.id
|
|
79
80
|
},
|
|
80
|
-
sortable: d &&
|
|
81
|
-
sort:
|
|
82
|
-
filter:
|
|
83
|
-
filterable:
|
|
84
|
-
filterOperators:
|
|
85
|
-
navigatable:
|
|
86
|
-
group:
|
|
87
|
-
groupable:
|
|
88
|
-
columnMenu:
|
|
89
|
-
columnMenuIcon:
|
|
81
|
+
sortable: d && l.sortable,
|
|
82
|
+
sort: l.sort,
|
|
83
|
+
filter: l.filter,
|
|
84
|
+
filterable: l.filterable && e.filterable,
|
|
85
|
+
filterOperators: l.filterOperators,
|
|
86
|
+
navigatable: l.navigatable,
|
|
87
|
+
group: l.group,
|
|
88
|
+
groupable: l.groupable,
|
|
89
|
+
columnMenu: C,
|
|
90
|
+
columnMenuIcon: O
|
|
90
91
|
}
|
|
91
92
|
}, b = {
|
|
92
93
|
...F,
|
|
93
|
-
colSpan:
|
|
94
|
-
rowSpan:
|
|
94
|
+
colSpan: e.headerColSpan,
|
|
95
|
+
rowSpan: e.rowSpan,
|
|
95
96
|
className: V,
|
|
96
|
-
columnId:
|
|
97
|
-
navigatable:
|
|
97
|
+
columnId: e.id,
|
|
98
|
+
navigatable: e.navigatable,
|
|
98
99
|
role: "columnheader"
|
|
99
|
-
}, g =
|
|
100
|
+
}, g = w(e), E = {
|
|
100
101
|
column: g,
|
|
101
|
-
sortable:
|
|
102
|
-
sort:
|
|
103
|
-
columnMenuWrapperProps:
|
|
104
|
-
},
|
|
105
|
-
/* @__PURE__ */ t.createElement(R, { key: 1, ...
|
|
106
|
-
|
|
107
|
-
], h =
|
|
102
|
+
sortable: l.sortable,
|
|
103
|
+
sort: l.sort,
|
|
104
|
+
columnMenuWrapperProps: a.columnMenuWrapperProps
|
|
105
|
+
}, I = e.defaultHeaderCell ? e.defaultHeaderCell : K, S = /* @__PURE__ */ t.createElement(ne, { key: 2, column: g }), H = [
|
|
106
|
+
/* @__PURE__ */ t.createElement(R, { key: 1, ...E, isClient: y(I) }, /* @__PURE__ */ t.createElement(I, { ...a })),
|
|
107
|
+
S
|
|
108
|
+
], h = $(l.cells, e.cells);
|
|
108
109
|
if (h && h.headerCell) {
|
|
109
|
-
const
|
|
110
|
+
const s = h.headerCell, B = y(s), j = /* @__PURE__ */ t.createElement(
|
|
111
|
+
"span",
|
|
112
|
+
{
|
|
113
|
+
className: c(
|
|
114
|
+
r.columnTitle({}),
|
|
115
|
+
e.isGroupColumn && r.groupingRowText({})
|
|
116
|
+
)
|
|
117
|
+
},
|
|
118
|
+
e.title || e.field || " "
|
|
119
|
+
), q = a.children || null, J = a.columnMenuWrapperProps.columnMenu ? /* @__PURE__ */ t.createElement(
|
|
120
|
+
oe,
|
|
121
|
+
{
|
|
122
|
+
columnMenuWrapperProps: a.columnMenuWrapperProps,
|
|
123
|
+
field: e.field
|
|
124
|
+
}
|
|
125
|
+
) : null;
|
|
110
126
|
return /* @__PURE__ */ t.createElement(
|
|
111
127
|
R,
|
|
112
128
|
{
|
|
113
|
-
key:
|
|
114
|
-
...
|
|
129
|
+
key: M,
|
|
130
|
+
...E,
|
|
115
131
|
thProps: b,
|
|
116
132
|
isCustom: !0,
|
|
117
133
|
isClient: B
|
|
118
134
|
},
|
|
119
|
-
/* @__PURE__ */ t.createElement(
|
|
135
|
+
/* @__PURE__ */ t.createElement(
|
|
136
|
+
s,
|
|
137
|
+
{
|
|
138
|
+
...a,
|
|
139
|
+
thProps: b,
|
|
140
|
+
index: n,
|
|
141
|
+
titleElement: j,
|
|
142
|
+
sortIcon: q,
|
|
143
|
+
columnMenu: J,
|
|
144
|
+
resizer: S
|
|
145
|
+
},
|
|
146
|
+
H
|
|
147
|
+
)
|
|
120
148
|
);
|
|
121
149
|
}
|
|
122
|
-
return /* @__PURE__ */ t.createElement(
|
|
123
|
-
}),
|
|
150
|
+
return /* @__PURE__ */ t.createElement(te, { key: M, column: g }, /* @__PURE__ */ t.createElement(X, { ...b }, H));
|
|
151
|
+
}), D = l.columns.map(w);
|
|
124
152
|
return /* @__PURE__ */ t.createElement(
|
|
125
|
-
|
|
153
|
+
le,
|
|
126
154
|
{
|
|
127
|
-
sortable:
|
|
128
|
-
sort:
|
|
129
|
-
navigatable:
|
|
130
|
-
groupable:
|
|
131
|
-
columns:
|
|
155
|
+
sortable: l.sortable,
|
|
156
|
+
sort: l.sort,
|
|
157
|
+
navigatable: l.navigatable,
|
|
158
|
+
groupable: l.groupable,
|
|
159
|
+
columns: D
|
|
132
160
|
},
|
|
133
|
-
|
|
161
|
+
l.columnsMap.map((o, n) => /* @__PURE__ */ t.createElement(ee, { key: n, className: c(r.simpleTr({})), ariaRowIndex: n + 1 }, A(o)))
|
|
134
162
|
);
|
|
135
163
|
};
|
|
136
164
|
export {
|
|
137
|
-
|
|
165
|
+
Ee as HeaderRow
|
|
138
166
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { GridColumnMenuWrapperProps } from '../../columnMenu/GridColumnMenuWrapper.js';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*
|
|
13
|
+
* Internal client wrapper used by the custom `headerCell` `columnMenu` slot. Reads the
|
|
14
|
+
* enrichment (change handlers, show state, column state) from the Grid contexts and
|
|
15
|
+
* forwards it to `GridColumnMenuWrapper`, so the slot works both in a fully client-rendered
|
|
16
|
+
* Grid and inside a React Server Components tree — regardless of whether the custom header
|
|
17
|
+
* cell itself is a server or client component.
|
|
18
|
+
*/
|
|
19
|
+
export declare const GridCustomHeaderColumnMenu: (props: {
|
|
20
|
+
columnMenuWrapperProps: GridColumnMenuWrapperProps;
|
|
21
|
+
field?: string;
|
|
22
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 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 client";
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),a=require("../../columnMenu/GridColumnMenuWrapper.js"),i=require("../../utils/GridContext.js"),s=require("./GridHeaderRowContainer.js");function c(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const r=c(u),l=t=>{const n=r.useContext(i.GridContext),e=r.useContext(s.GridHeaderRowContext),o={...t.columnMenuWrapperProps,onSortChange:n.sortChange,onFilterChange:n.filterChange,onGroupChange:n.groupChange,onColumnsStateChange:n.onColumnsStateChange,show:(e==null?void 0:e.showColumnMenuField)===t.field?!0:void 0,onCloseMenu:e==null?void 0:e.handleCloseMenu,columnsState:n.columnsState};return r.createElement(a.GridColumnMenuWrapper,{...o})};exports.GridCustomHeaderColumnMenu=l;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 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 client";
|
|
9
|
+
import * as o from "react";
|
|
10
|
+
import { GridColumnMenuWrapper as u } from "../../columnMenu/GridColumnMenuWrapper.mjs";
|
|
11
|
+
import { GridContext as m } from "../../utils/GridContext.mjs";
|
|
12
|
+
import { GridHeaderRowContext as s } from "./GridHeaderRowContainer.mjs";
|
|
13
|
+
const i = (t) => {
|
|
14
|
+
const n = o.useContext(m), e = o.useContext(s), r = {
|
|
15
|
+
...t.columnMenuWrapperProps,
|
|
16
|
+
onSortChange: n.sortChange,
|
|
17
|
+
onFilterChange: n.filterChange,
|
|
18
|
+
onGroupChange: n.groupChange,
|
|
19
|
+
onColumnsStateChange: n.onColumnsStateChange,
|
|
20
|
+
show: (e == null ? void 0 : e.showColumnMenuField) === t.field ? !0 : void 0,
|
|
21
|
+
onCloseMenu: e == null ? void 0 : e.handleCloseMenu,
|
|
22
|
+
columnsState: n.columnsState
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ o.createElement(u, { ...r });
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
i as GridCustomHeaderColumnMenu
|
|
28
|
+
};
|
|
@@ -180,6 +180,38 @@ export interface GridCustomHeaderCellProps extends GridHeaderCellProps {
|
|
|
180
180
|
* The index of the column.
|
|
181
181
|
*/
|
|
182
182
|
index?: number;
|
|
183
|
+
/**
|
|
184
|
+
* The default column title element (`<span class="k-column-title">` with the column title text).
|
|
185
|
+
*
|
|
186
|
+
* Render this inside your custom header cell to reuse the built-in title styling and the
|
|
187
|
+
* grouping-row text class instead of rebuilding the title span yourself. Combine it with
|
|
188
|
+
* additional custom content (icons, badges, etc.) to keep the default appearance while
|
|
189
|
+
* extending it.
|
|
190
|
+
*/
|
|
191
|
+
titleElement?: React.ReactNode;
|
|
192
|
+
/**
|
|
193
|
+
* The default sort direction icon and sort-order badge for the column.
|
|
194
|
+
*
|
|
195
|
+
* `null` when the column is not currently sorted. Render this inside your custom header cell
|
|
196
|
+
* to keep the built-in sort indicator without reimplementing sort icon rendering. The
|
|
197
|
+
* click-to-sort behavior remains attached to the `onClick` prop.
|
|
198
|
+
*/
|
|
199
|
+
sortIcon?: React.ReactNode;
|
|
200
|
+
/**
|
|
201
|
+
* The default column menu / filter button wrapper for the column.
|
|
202
|
+
*
|
|
203
|
+
* `null` when the column has no column menu configured. Render this inside your custom
|
|
204
|
+
* header cell to preserve the built-in filter popup, column menu, and their keyboard and
|
|
205
|
+
* accessibility behavior.
|
|
206
|
+
*/
|
|
207
|
+
columnMenu?: React.ReactNode;
|
|
208
|
+
/**
|
|
209
|
+
* The default column resize handle.
|
|
210
|
+
*
|
|
211
|
+
* Render this inside your custom header cell (typically as the last child) to preserve the
|
|
212
|
+
* built-in column resizing behavior.
|
|
213
|
+
*/
|
|
214
|
+
resizer?: React.ReactNode;
|
|
183
215
|
}
|
|
184
216
|
/**
|
|
185
217
|
* The settings of the cells prop options.
|
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=Object.freeze({name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1791389006,version:"16.2.0",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
|
|
|
7
7
|
productName: 'KendoReact',
|
|
8
8
|
productCode: 'KENDOUIREACT',
|
|
9
9
|
productCodes: ['KENDOUIREACT'],
|
|
10
|
-
publishDate:
|
|
11
|
-
version: '16.2.0
|
|
10
|
+
publishDate: 1791389006,
|
|
11
|
+
version: '16.2.0',
|
|
12
12
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
|
|
13
13
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-grid",
|
|
3
|
-
"version": "16.2.0
|
|
3
|
+
"version": "16.2.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",
|
|
@@ -30,21 +30,21 @@
|
|
|
30
30
|
"@progress/kendo-drawing": "^1.25.5",
|
|
31
31
|
"@progress/kendo-file-saver": "^1.1.1",
|
|
32
32
|
"@progress/kendo-licensing": "^1.7.2",
|
|
33
|
-
"@progress/kendo-react-animation": "16.2.0
|
|
34
|
-
"@progress/kendo-react-buttons": "16.2.0
|
|
35
|
-
"@progress/kendo-react-common": "16.2.0
|
|
36
|
-
"@progress/kendo-react-data-tools": "16.2.0
|
|
37
|
-
"@progress/kendo-react-dateinputs": "16.2.0
|
|
38
|
-
"@progress/kendo-react-indicators": "16.2.0
|
|
39
|
-
"@progress/kendo-react-form": "16.2.0
|
|
40
|
-
"@progress/kendo-react-labels": "16.2.0
|
|
41
|
-
"@progress/kendo-react-dialogs": "16.2.0
|
|
42
|
-
"@progress/kendo-react-dropdowns": "16.2.0
|
|
43
|
-
"@progress/kendo-react-inputs": "16.2.0
|
|
44
|
-
"@progress/kendo-react-intl": "16.2.0
|
|
45
|
-
"@progress/kendo-react-popup": "16.2.0
|
|
46
|
-
"@progress/kendo-react-layout": "16.2.0
|
|
47
|
-
"@progress/kendo-react-conversational-ui": "16.2.0
|
|
33
|
+
"@progress/kendo-react-animation": "16.2.0",
|
|
34
|
+
"@progress/kendo-react-buttons": "16.2.0",
|
|
35
|
+
"@progress/kendo-react-common": "16.2.0",
|
|
36
|
+
"@progress/kendo-react-data-tools": "16.2.0",
|
|
37
|
+
"@progress/kendo-react-dateinputs": "16.2.0",
|
|
38
|
+
"@progress/kendo-react-indicators": "16.2.0",
|
|
39
|
+
"@progress/kendo-react-form": "16.2.0",
|
|
40
|
+
"@progress/kendo-react-labels": "16.2.0",
|
|
41
|
+
"@progress/kendo-react-dialogs": "16.2.0",
|
|
42
|
+
"@progress/kendo-react-dropdowns": "16.2.0",
|
|
43
|
+
"@progress/kendo-react-inputs": "16.2.0",
|
|
44
|
+
"@progress/kendo-react-intl": "16.2.0",
|
|
45
|
+
"@progress/kendo-react-popup": "16.2.0",
|
|
46
|
+
"@progress/kendo-react-layout": "16.2.0",
|
|
47
|
+
"@progress/kendo-react-conversational-ui": "16.2.0",
|
|
48
48
|
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
49
49
|
"react": "^18.0.0 || ^19.0.0",
|
|
50
50
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
"package": {
|
|
156
156
|
"productName": "KendoReact",
|
|
157
157
|
"productCode": "KENDOUIREACT",
|
|
158
|
-
"publishDate":
|
|
158
|
+
"publishDate": 1791389006,
|
|
159
159
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
160
160
|
}
|
|
161
161
|
},
|
|
@@ -165,10 +165,5 @@
|
|
|
165
165
|
"repository": {
|
|
166
166
|
"type": "git",
|
|
167
167
|
"url": "git+https://github.com/telerik/kendo-react.git"
|
|
168
|
-
},
|
|
169
|
-
"peerDependenciesMeta": {
|
|
170
|
-
"@progress/kendo-svg-icons": {
|
|
171
|
-
"optional": true
|
|
172
|
-
}
|
|
173
168
|
}
|
|
174
169
|
}
|
|
@@ -14,8 +14,9 @@ export interface WheelTouchScrollOptions {
|
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* @hidden
|
|
17
|
-
* Attaches native (non-React) wheel
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* Attaches native (non-React) wheel/touch listeners so the grid can apply `wheelMultiplier` and/or
|
|
18
|
+
* restore scrolling when the proxied overlay hides native overflow. Always scrolls `container`;
|
|
19
|
+
* pass `wheelListenerTarget` (the shared ancestor of `container` and the overlay) to also catch
|
|
20
|
+
* wheel events bubbling from the overlay. Returns a cleanup function.
|
|
20
21
|
*/
|
|
21
|
-
export declare function attachWheelTouchScroll(container: HTMLDivElement, options: WheelTouchScrollOptions): () => void;
|
|
22
|
+
export declare function attachWheelTouchScroll(container: HTMLDivElement, options: WheelTouchScrollOptions, wheelListenerTarget?: HTMLElement | null): () => void;
|
|
@@ -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 W=16,b=1,F=2,S=.95,d=.1;function N(e,M,_){const{wheelMultiplier:m,overlayRequiresCustomWheel:Y}=M;let f;const y=()=>{var t;if(f===void 0){const i=(t=e.ownerDocument.defaultView)==null?void 0:t.getComputedStyle(e).lineHeight;f=Number.parseFloat(i||"")||W}return f},L=t=>{if(t.ctrlKey||t.metaKey||!t.deltaY&&!t.deltaX)return;const i=e.scrollTop,r=e.scrollLeft;let l=t.deltaX,s=t.deltaY;if(t.shiftKey&&!l&&(l=s,s=0),t.deltaMode===b){const c=y();l*=c,s*=c}else t.deltaMode===F&&(l*=e.clientWidth,s*=e.clientHeight);e.scrollTop+=s*m,e.scrollLeft+=l*m,(e.scrollTop!==i||e.scrollLeft!==r)&&t.preventDefault()},T=_||e;T.addEventListener("wheel",L,{passive:!1});let h;if(Y){let t=0,i=0,r=0,l=0,s=0,c;const p=()=>{c!==void 0&&(cancelAnimationFrame(c),c=void 0)},E=()=>{e.scrollTop+=s,e.scrollLeft+=l,s*=S,l*=S,Math.abs(s)>d||Math.abs(l)>d?c=requestAnimationFrame(E):c=void 0},n=o=>{o.touches.length===1&&(p(),l=0,s=0,t=o.touches[0].clientX,i=o.touches[0].clientY,r=o.timeStamp)},v=o=>{if(o.touches.length!==1)return;const a=o.touches[0],g=t-a.clientX,H=i-a.clientY,I=Math.min(Math.max(o.timeStamp-r,1),100),A=e.scrollTop,X=e.scrollLeft;e.scrollTop+=H,e.scrollLeft+=g,s=H/I*(1e3/60),l=g/I*(1e3/60),t=a.clientX,i=a.clientY,r=o.timeStamp,(e.scrollTop!==A||e.scrollLeft!==X)&&o.preventDefault()},u=o=>{o.touches.length>0||(Math.abs(s)>d||Math.abs(l)>d)&&(c=requestAnimationFrame(E))};e.addEventListener("touchstart",n,{passive:!0}),e.addEventListener("touchmove",v,{passive:!1}),e.addEventListener("touchend",u,{passive:!0}),e.addEventListener("touchcancel",u,{passive:!0}),h=()=>{p(),e.removeEventListener("touchstart",n),e.removeEventListener("touchmove",v),e.removeEventListener("touchend",u),e.removeEventListener("touchcancel",u)}}return()=>{T.removeEventListener("wheel",L),h==null||h()}}exports.attachWheelTouchScroll=N;
|
|
@@ -5,53 +5,53 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
function
|
|
9
|
-
const { wheelMultiplier:
|
|
8
|
+
function Y(e, N, v) {
|
|
9
|
+
const { wheelMultiplier: a, overlayRequiresCustomWheel: A } = N;
|
|
10
10
|
let u;
|
|
11
|
-
const
|
|
11
|
+
const C = () => {
|
|
12
12
|
var t;
|
|
13
13
|
if (u === void 0) {
|
|
14
14
|
const i = (t = e.ownerDocument.defaultView) == null ? void 0 : t.getComputedStyle(e).lineHeight;
|
|
15
15
|
u = Number.parseFloat(i || "") || 16;
|
|
16
16
|
}
|
|
17
17
|
return u;
|
|
18
|
-
},
|
|
18
|
+
}, L = (t) => {
|
|
19
19
|
if (t.ctrlKey || t.metaKey || !t.deltaY && !t.deltaX)
|
|
20
20
|
return;
|
|
21
21
|
const i = e.scrollTop, h = e.scrollLeft;
|
|
22
22
|
let l = t.deltaX, s = t.deltaY;
|
|
23
23
|
if (t.shiftKey && !l && (l = s, s = 0), t.deltaMode === 1) {
|
|
24
|
-
const c =
|
|
24
|
+
const c = C();
|
|
25
25
|
l *= c, s *= c;
|
|
26
26
|
} else t.deltaMode === 2 && (l *= e.clientWidth, s *= e.clientHeight);
|
|
27
|
-
e.scrollTop += s *
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
let
|
|
31
|
-
if (
|
|
27
|
+
e.scrollTop += s * a, e.scrollLeft += l * a, (e.scrollTop !== i || e.scrollLeft !== h) && t.preventDefault();
|
|
28
|
+
}, I = v || e;
|
|
29
|
+
I.addEventListener("wheel", L, { passive: !1 });
|
|
30
|
+
let r;
|
|
31
|
+
if (A) {
|
|
32
32
|
let t = 0, i = 0, h = 0, l = 0, s = 0, c;
|
|
33
|
-
const
|
|
33
|
+
const d = () => {
|
|
34
34
|
c !== void 0 && (cancelAnimationFrame(c), c = void 0);
|
|
35
|
-
},
|
|
36
|
-
e.scrollTop += s, e.scrollLeft += l, s *= 0.95, l *= 0.95, Math.abs(s) > 0.1 || Math.abs(l) > 0.1 ? c = requestAnimationFrame(
|
|
37
|
-
}, _ = (o) => {
|
|
38
|
-
o.touches.length === 1 && (I(), l = 0, s = 0, t = o.touches[0].clientX, i = o.touches[0].clientY, h = o.timeStamp);
|
|
35
|
+
}, _ = () => {
|
|
36
|
+
e.scrollTop += s, e.scrollLeft += l, s *= 0.95, l *= 0.95, Math.abs(s) > 0.1 || Math.abs(l) > 0.1 ? c = requestAnimationFrame(_) : c = void 0;
|
|
39
37
|
}, f = (o) => {
|
|
38
|
+
o.touches.length === 1 && (d(), l = 0, s = 0, t = o.touches[0].clientX, i = o.touches[0].clientY, h = o.timeStamp);
|
|
39
|
+
}, m = (o) => {
|
|
40
40
|
if (o.touches.length !== 1)
|
|
41
41
|
return;
|
|
42
|
-
const
|
|
43
|
-
e.scrollTop +=
|
|
42
|
+
const E = o.touches[0], p = t - E.clientX, n = i - E.clientY, H = Math.min(Math.max(o.timeStamp - h, 1), 100), O = e.scrollTop, M = e.scrollLeft;
|
|
43
|
+
e.scrollTop += n, e.scrollLeft += p, s = n / H * (1e3 / 60), l = p / H * (1e3 / 60), t = E.clientX, i = E.clientY, h = o.timeStamp, (e.scrollTop !== O || e.scrollLeft !== M) && o.preventDefault();
|
|
44
44
|
}, T = (o) => {
|
|
45
|
-
o.touches.length > 0 || (Math.abs(s) > 0.1 || Math.abs(l) > 0.1) && (c = requestAnimationFrame(
|
|
45
|
+
o.touches.length > 0 || (Math.abs(s) > 0.1 || Math.abs(l) > 0.1) && (c = requestAnimationFrame(_));
|
|
46
46
|
};
|
|
47
|
-
e.addEventListener("touchstart",
|
|
48
|
-
|
|
47
|
+
e.addEventListener("touchstart", f, { passive: !0 }), e.addEventListener("touchmove", m, { passive: !1 }), e.addEventListener("touchend", T, { passive: !0 }), e.addEventListener("touchcancel", T, { passive: !0 }), r = () => {
|
|
48
|
+
d(), e.removeEventListener("touchstart", f), e.removeEventListener("touchmove", m), e.removeEventListener("touchend", T), e.removeEventListener("touchcancel", T);
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
return () => {
|
|
52
|
-
|
|
52
|
+
I.removeEventListener("wheel", L), r == null || r();
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
export {
|
|
56
|
-
|
|
56
|
+
Y as attachWheelTouchScroll
|
|
57
57
|
};
|