@progress/kendo-react-grid 7.5.0-develop.2 → 7.5.0-develop.21
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 +412 -376
- package/GridColumn.js +1 -1
- package/GridColumn.mjs +2 -1
- package/VirtualScrollFixed.js +1 -1
- package/VirtualScrollFixed.mjs +18 -53
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +10 -9
- package/cells/GridGroupCell.js +1 -1
- package/cells/GridGroupCell.mjs +16 -15
- package/columnMenu/GridColumnMenuWrapper.js +1 -1
- package/columnMenu/GridColumnMenuWrapper.mjs +53 -53
- package/constants/index.js +1 -1
- package/constants/index.mjs +4 -3
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/GroupingIndicator.js +1 -1
- package/drag/GroupingIndicator.mjs +13 -9
- package/footer/FooterRow.js +1 -1
- package/footer/FooterRow.mjs +40 -35
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +57 -56
- package/index.d.mts +45 -59
- package/index.d.ts +45 -59
- package/package-metadata.mjs +1 -1
- package/package.json +12 -12
- package/paging/GridPagerSettings.js +1 -1
- package/paging/GridPagerSettings.mjs +14 -12
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as s from "react";
|
|
10
|
-
import { Draggable as
|
|
10
|
+
import { Keys as o, Draggable as i, IconWrap as n } from "@progress/kendo-react-common";
|
|
11
11
|
import { registerForLocalization as r } from "@progress/kendo-react-intl";
|
|
12
|
-
import { sortAscSmallIcon as
|
|
13
|
-
class
|
|
12
|
+
import { sortAscSmallIcon as a, sortDescSmallIcon as p, xCircleIcon as l } from "@progress/kendo-svg-icons";
|
|
13
|
+
class c extends s.Component {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments), this.draggable = null, this.onPress = (e) => {
|
|
16
16
|
const t = this.draggable && this.draggable.element;
|
|
@@ -25,6 +25,8 @@ class p extends s.Component {
|
|
|
25
25
|
const t = this.props.dir === "asc" ? "desc" : "asc";
|
|
26
26
|
this.props.onSortChange(e, t);
|
|
27
27
|
}
|
|
28
|
+
}, this.handleKeyDown = (e) => {
|
|
29
|
+
(e.keyCode === o.delete || e.keyCode === o.backspace) && (e.preventDefault(), e.stopPropagation(), this.props.onRemove && this.props.onRemove(e));
|
|
28
30
|
}, this.groupRemove = (e) => {
|
|
29
31
|
e.preventDefault(), e.stopPropagation(), this.props.onRemove && this.props.onRemove(e);
|
|
30
32
|
}, this.onContextMenu = (e) => {
|
|
@@ -39,7 +41,7 @@ class p extends s.Component {
|
|
|
39
41
|
render() {
|
|
40
42
|
const { dir: e } = this.props;
|
|
41
43
|
return /* @__PURE__ */ s.createElement(
|
|
42
|
-
|
|
44
|
+
i,
|
|
43
45
|
{
|
|
44
46
|
onPress: this.onPress,
|
|
45
47
|
onDrag: this.onDrag,
|
|
@@ -54,14 +56,16 @@ class p extends s.Component {
|
|
|
54
56
|
className: "k-chip k-chip-md k-chip-solid k-chip-solid-base k-rounded-md",
|
|
55
57
|
onClick: this.sortChange,
|
|
56
58
|
onContextMenu: this.onContextMenu,
|
|
59
|
+
onKeyDown: this.handleKeyDown,
|
|
60
|
+
tabIndex: 0,
|
|
57
61
|
role: "button",
|
|
58
62
|
style: { touchAction: "none" }
|
|
59
63
|
},
|
|
60
64
|
/* @__PURE__ */ s.createElement("span", null, /* @__PURE__ */ s.createElement(
|
|
61
|
-
|
|
65
|
+
n,
|
|
62
66
|
{
|
|
63
67
|
name: "sort-" + e + "-small",
|
|
64
|
-
icon: e === "asc" ?
|
|
68
|
+
icon: e === "asc" ? a : p,
|
|
65
69
|
size: "small"
|
|
66
70
|
}
|
|
67
71
|
)),
|
|
@@ -73,7 +77,7 @@ class p extends s.Component {
|
|
|
73
77
|
onClick: this.groupRemove
|
|
74
78
|
},
|
|
75
79
|
/* @__PURE__ */ s.createElement(
|
|
76
|
-
|
|
80
|
+
n,
|
|
77
81
|
{
|
|
78
82
|
name: "x-circle",
|
|
79
83
|
icon: l,
|
|
@@ -85,7 +89,7 @@ class p extends s.Component {
|
|
|
85
89
|
);
|
|
86
90
|
}
|
|
87
91
|
}
|
|
88
|
-
r(
|
|
92
|
+
r(c);
|
|
89
93
|
export {
|
|
90
|
-
|
|
94
|
+
c as GroupingIndicator
|
|
91
95
|
};
|
package/footer/FooterRow.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 g=require("react"),i=require("../utils/index.js"),b=require("@progress/kendo-react-common"),s=require("@progress/kendo-react-data-tools");function C(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const l=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>t[o]})}}return e.default=t,Object.freeze(e)}const r=C(g),y=t=>{const{column:e,index:o,isRtl:l,id:d,cells:u}=t,f=s.useTableKeyboardNavigation(d),n={colSpan:e.colSpan!==1?e.colSpan:void 0,style:e.left!==void 0?l?{left:e.right,right:e.left}:{left:e.left,right:e.right}:{},className:b.classNames("k-table-td",e.locked&&e.left!==void 0?"k-grid-footer-sticky":""),key:o,role:"gridcell","aria-colindex":e.ariaColumnIndex,...f},c={field:e.field,ariaColumnIndex:e.ariaColumnIndex,...n},a=i.resolveCells(u,e.cells);if(a&&a.footerCell){const m=a.footerCell;return r.createElement(m,{...c,tdProps:n,index:o})}return e.footerCell&&r.createElement(e.footerCell,{...c,key:o})||r.createElement("td",{...n})},k=t=>r.createElement("tr",{className:"k-table-row",role:"row","aria-rowindex":t.ariaRowIndex},i.footerColumns(t.columns).map((e,o)=>{const l=s.tableKeyboardNavigationTools.generateNavigatableId(`${o}-footercell`,t.idPrefix,"nodata");return r.createElement(y,{key:l,column:e,id:l,index:o,cells:t.cells,isRtl:t.isRtl})}));exports.FooterRow=k;
|
package/footer/FooterRow.mjs
CHANGED
|
@@ -6,41 +6,46 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import {
|
|
11
|
-
import { classNames as
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
return e.footerCell && /* @__PURE__ */ t.createElement(e.footerCell, { ...o, key: r }) || /* @__PURE__ */ t.createElement("td", { ...l });
|
|
35
|
-
};
|
|
9
|
+
import * as o from "react";
|
|
10
|
+
import { footerColumns as f, resolveCells as u } from "../utils/index.mjs";
|
|
11
|
+
import { classNames as C } from "@progress/kendo-react-common";
|
|
12
|
+
import { tableKeyboardNavigationTools as g, useTableKeyboardNavigation as b } from "@progress/kendo-react-data-tools";
|
|
13
|
+
const k = (t) => {
|
|
14
|
+
const { column: e, index: l, isRtl: r, id: c, cells: s } = t, d = b(c), a = {
|
|
15
|
+
colSpan: e.colSpan !== 1 ? e.colSpan : void 0,
|
|
16
|
+
style: e.left !== void 0 ? r ? { left: e.right, right: e.left } : { left: e.left, right: e.right } : {},
|
|
17
|
+
className: C(
|
|
18
|
+
"k-table-td",
|
|
19
|
+
e.locked && e.left !== void 0 ? "k-grid-footer-sticky" : ""
|
|
20
|
+
),
|
|
21
|
+
key: l,
|
|
22
|
+
role: "gridcell",
|
|
23
|
+
"aria-colindex": e.ariaColumnIndex,
|
|
24
|
+
...d
|
|
25
|
+
}, n = {
|
|
26
|
+
field: e.field,
|
|
27
|
+
ariaColumnIndex: e.ariaColumnIndex,
|
|
28
|
+
...a
|
|
29
|
+
}, i = u(s, e.cells);
|
|
30
|
+
if (i && i.footerCell) {
|
|
31
|
+
const m = i.footerCell;
|
|
32
|
+
return /* @__PURE__ */ o.createElement(m, { ...n, tdProps: a, index: l });
|
|
36
33
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
return e.footerCell && /* @__PURE__ */ o.createElement(e.footerCell, { ...n, key: l }) || /* @__PURE__ */ o.createElement("td", { ...a });
|
|
35
|
+
}, I = (t) => /* @__PURE__ */ o.createElement("tr", { className: "k-table-row", role: "row", "aria-rowindex": t.ariaRowIndex }, f(t.columns).map((e, l) => {
|
|
36
|
+
const r = g.generateNavigatableId(`${l}-footercell`, t.idPrefix, "nodata");
|
|
37
|
+
return /* @__PURE__ */ o.createElement(
|
|
38
|
+
k,
|
|
39
|
+
{
|
|
40
|
+
key: r,
|
|
41
|
+
column: e,
|
|
42
|
+
id: r,
|
|
43
|
+
index: l,
|
|
44
|
+
cells: t.cells,
|
|
45
|
+
isRtl: t.isRtl
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}));
|
|
44
49
|
export {
|
|
45
|
-
|
|
50
|
+
I as FooterRow
|
|
46
51
|
};
|
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 j=require("react"),L=require("../interfaces/GridSortSettings.js"),F=require("../drag/ColumnDraggable.js"),T=require("./GridHeaderCell.js"),f=require("@progress/kendo-react-common"),z=require("@progress/kendo-react-data-tools"),_=require("@progress/kendo-react-intl"),R=require("../messages/index.js"),I=require("@progress/kendo-svg-icons"),V=require("../utils/index.js");function W(e){const m=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const g=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(m,i,g.get?g:{enumerable:!0,get:()=>e[i]})}}return m.default=e,Object.freeze(m)}const r=W(j),$={true:{asc:"desc",desc:"","":"asc"},false:{asc:"desc",desc:"asc","":"asc"}},B={none:"none",asc:"ascending",desc:"descending"},U=e=>{const[m,i]=r.useState(),g=_.useLocalization(),b=r.useRef(null);let E=0,q=-1;const S=(l,n)=>{if(l.preventDefault(),!e.sortChange)return;const{allowUnsort:t,mode:s}=L.normalize(e.sortable||!1,n.sortable||!1),o=(e.sort||[]).filter(c=>c.field===n.field)[0],u=$[t][o&&o.dir||""],d=s==="single"?[]:(e.sort||[]).filter(c=>c.field!==n.field);u!==""&&n.field&&d.push({field:n.field,dir:u}),e.sortChange(d,l)},v=(l,n)=>{if(l.isDefaultPrevented())return;const{keyCode:t,metaKey:s,ctrlKey:o,altKey:u}=l,d=e.sortable&&n.sortable,c=l.target;if(d&&l.keyCode===f.Keys.enter&&c.className.indexOf("k-table-th")!==-1&&S(l,n),e.navigatable){if(e.groupable&&(s&&t===f.Keys.enter||o&&t===f.Keys.space)){l.preventDefault();const C=e.columns.findIndex(h=>h.field===n.field);e.columnGroupChange&&e.columnGroupChange(C,l)}u&&t===f.Keys.down&&(l.preventDefault(),i(n.field),b.current=c)}},x=()=>{i(void 0),b.current&&b.current.getAttribute("tabindex")!=="-1"&&b.current.focus()},K=l=>e.sort?l>=0&&[r.createElement("span",{key:1,className:"k-sort-icon"},r.createElement(f.IconWrap,{name:"sort-"+e.sort[l].dir+"-small",icon:e.sort[l].dir==="asc"?I.sortAscSmallIcon:I.sortDescSmallIcon})),e.sort.length>1&&r.createElement("span",{key:2,className:"k-sort-icon"},r.createElement("span",{className:"k-sort-order"},l+1))]:null,w=l=>l.map(n=>{const t=e.columns[n],s=e.sortable&&t.sortable,o=e.sort?e.sort.findIndex(a=>a.field===t.field):-1,u=o>=0&&e.sort[o].dir||"none",d=t.columnMenu===null?null:t.columnMenu||e.columnMenu,c=t.menuIcon||e.columnMenuIcon,C=f.classNames({"k-first":t.kFirst,"k-filterable":!!d,"k-table-th":!0,"k-header":!0,"k-grid-header-sticky":t.locked,"k-sorted":e.sort&&e.sort.some(a=>a.field===t.field)},t.headerClassName);t.locked===!1&&(t.left=0);const h=t.left!==void 0?e.isRtl?{left:t.right,right:t.left}:{left:t.left,right:t.right}:{},N=g.toLanguageString(R.sortAriaLabel,R.messages[R.sortAriaLabel]),O=t.isAccessible?{ariaSort:B[u],role:"columnheader",ariaColumnIndex:t.ariaColumnIndex,ariaSelected:!1,ariaDescription:s?N:""}:{role:"presentation"},k=t.declarationIndex>=0?++q:--E,A=t.headerCell?t.headerCell:T.GridHeaderCell,D=r.createElement(A,{key:1,field:t.field,onClick:s&&(a=>S(a,t))||void 0,selectionChange:e.selectionChange,title:t.title,selectionValue:t.headerSelectionValue,render:e.cellRender,children:K(o),columnMenuWrapperProps:{column:{field:t.field,title:t.title,locked:t.locked,filter:t.filter,id:t.id},sortable:s&&e.sortable,sort:e.sort,onSortChange:e.sortChange,filter:e.filter,filterable:e.filterable&&t.filterable,filterOperators:e.filterOperators,onFilterChange:e.filterChange,show:m===t.field?!0:void 0,onCloseMenu:x,navigatable:e.navigatable,group:e.group,groupable:e.groupable,onGroupChange:e.groupChange,columnMenu:d,columnMenuIcon:c}}),M={...O,key:k,colSpan:t.colSpan,rowSpan:t.rowSpan,className:C,style:h,columnId:t.id,navigatable:t.navigatable,onKeyDown:a=>v(a,t),role:"columnheader"},H=[D,e.columnResize&&e.columnResize.resizable&&t.resizable&&r.createElement(z.ColumnResizer,{key:2,resize:(a,G,P)=>e.columnResize&&e.columnResize.dragHandler(a,t,G,P),autofit:a=>e.columnResize&&e.columnResize.dblClickHandler(a,[t.id])})],y=V.resolveCells(e.cells,t.cells);if(y&&y.headerCell){const a=y.headerCell;return r.createElement(a,{...D.props,key:k,thProps:M,index:n},H)}return r.createElement(z.HeaderThElement,{...M,key:k},H)});return e.columnsMap.map((l,n)=>e.pressHandler&&r.createElement(F.ColumnDraggable,{key:n,pressHandler:e.pressHandler,dragHandler:e.dragHandler,releaseHandler:e.releaseHandler,ariaRowIndex:n+1,dragClue:e.dragClue,headerRef:e.headerRef,containerRef:e.containerRef},w(l))||r.createElement("tr",{key:n,className:"k-table-row",role:"row","aria-rowindex":n+1},w(l)))};exports.HeaderRow=U;
|
package/header/HeaderRow.mjs
CHANGED
|
@@ -7,77 +7,77 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as r from "react";
|
|
10
|
-
import { normalize as
|
|
11
|
-
import { ColumnDraggable as
|
|
12
|
-
import { GridHeaderCell as
|
|
13
|
-
import { classNames as
|
|
14
|
-
import { ColumnResizer as
|
|
15
|
-
import { useLocalization as
|
|
16
|
-
import { sortAriaLabel as
|
|
17
|
-
import { sortAscSmallIcon as
|
|
18
|
-
import { resolveCells as
|
|
19
|
-
const
|
|
10
|
+
import { normalize as L } from "../interfaces/GridSortSettings.mjs";
|
|
11
|
+
import { ColumnDraggable as O } from "../drag/ColumnDraggable.mjs";
|
|
12
|
+
import { GridHeaderCell as P } from "./GridHeaderCell.mjs";
|
|
13
|
+
import { classNames as V, Keys as f, IconWrap as W } from "@progress/kendo-react-common";
|
|
14
|
+
import { ColumnResizer as q, HeaderThElement as B } from "@progress/kendo-react-data-tools";
|
|
15
|
+
import { useLocalization as T } from "@progress/kendo-react-intl";
|
|
16
|
+
import { sortAriaLabel as M, messages as U } from "../messages/index.mjs";
|
|
17
|
+
import { sortAscSmallIcon as j, sortDescSmallIcon as J } from "@progress/kendo-svg-icons";
|
|
18
|
+
import { resolveCells as Q } from "../utils/index.mjs";
|
|
19
|
+
const X = {
|
|
20
20
|
true: { asc: "desc", desc: "", "": "asc" },
|
|
21
21
|
false: { asc: "desc", desc: "asc", "": "asc" }
|
|
22
|
-
},
|
|
22
|
+
}, Y = {
|
|
23
23
|
none: "none",
|
|
24
24
|
asc: "ascending",
|
|
25
25
|
desc: "descending"
|
|
26
|
-
},
|
|
27
|
-
const [
|
|
28
|
-
let
|
|
29
|
-
const k = (t,
|
|
26
|
+
}, re = (e) => {
|
|
27
|
+
const [z, b] = r.useState(), H = T(), u = r.useRef(null);
|
|
28
|
+
let D = 0, E = -1;
|
|
29
|
+
const k = (t, n) => {
|
|
30
30
|
if (t.preventDefault(), !e.sortChange)
|
|
31
31
|
return;
|
|
32
|
-
const { allowUnsort: l, mode: c } =
|
|
33
|
-
d !== "" &&
|
|
34
|
-
},
|
|
32
|
+
const { allowUnsort: l, mode: c } = L(e.sortable || !1, n.sortable || !1), o = (e.sort || []).filter((i) => i.field === n.field)[0], d = X[l][o && o.dir || ""], s = c === "single" ? [] : (e.sort || []).filter((i) => i.field !== n.field);
|
|
33
|
+
d !== "" && n.field && s.push({ field: n.field, dir: d }), e.sortChange(s, t);
|
|
34
|
+
}, I = (t, n) => {
|
|
35
35
|
if (t.isDefaultPrevented())
|
|
36
36
|
return;
|
|
37
|
-
const { keyCode: l, metaKey: c, ctrlKey: o, altKey: d } = t, s = e.sortable &&
|
|
38
|
-
if (s && t.keyCode ===
|
|
39
|
-
if (e.groupable && (c && l ===
|
|
37
|
+
const { keyCode: l, metaKey: c, ctrlKey: o, altKey: d } = t, s = e.sortable && n.sortable, i = t.target;
|
|
38
|
+
if (s && t.keyCode === f.enter && i.className.indexOf("k-table-th") !== -1 && k(t, n), e.navigatable) {
|
|
39
|
+
if (e.groupable && (c && l === f.enter || o && l === f.space)) {
|
|
40
40
|
t.preventDefault();
|
|
41
|
-
const m = e.columns.findIndex((g) => g.field ===
|
|
41
|
+
const m = e.columns.findIndex((g) => g.field === n.field);
|
|
42
42
|
e.columnGroupChange && e.columnGroupChange(m, t);
|
|
43
43
|
}
|
|
44
|
-
d && l ===
|
|
44
|
+
d && l === f.down && (t.preventDefault(), b(n.field), u.current = i);
|
|
45
45
|
}
|
|
46
|
-
},
|
|
47
|
-
b(void 0),
|
|
46
|
+
}, x = () => {
|
|
47
|
+
b(void 0), u.current && u.current.getAttribute("tabindex") !== "-1" && u.current.focus();
|
|
48
48
|
}, v = (t) => e.sort ? t >= 0 && [
|
|
49
49
|
/* @__PURE__ */ r.createElement("span", { key: 1, className: "k-sort-icon" }, /* @__PURE__ */ r.createElement(
|
|
50
|
-
|
|
50
|
+
W,
|
|
51
51
|
{
|
|
52
52
|
name: "sort-" + e.sort[t].dir + "-small",
|
|
53
|
-
icon: e.sort[t].dir === "asc" ?
|
|
53
|
+
icon: e.sort[t].dir === "asc" ? j : J
|
|
54
54
|
}
|
|
55
55
|
)),
|
|
56
56
|
e.sort.length > 1 && /* @__PURE__ */ r.createElement("span", { key: 2, className: "k-sort-icon" }, /* @__PURE__ */ r.createElement("span", { className: "k-sort-order" }, t + 1))
|
|
57
|
-
] : null, y = (t) => t.map((
|
|
58
|
-
const l = e.columns[
|
|
57
|
+
] : null, y = (t) => t.map((n) => {
|
|
58
|
+
const l = e.columns[n], c = e.sortable && l.sortable, o = e.sort ? e.sort.findIndex((a) => a.field === l.field) : -1, d = o >= 0 && e.sort[o].dir || "none", s = l.columnMenu === null ? null : l.columnMenu || e.columnMenu, i = l.menuIcon || e.columnMenuIcon, m = V({
|
|
59
59
|
"k-first": l.kFirst,
|
|
60
60
|
"k-filterable": !!s,
|
|
61
61
|
"k-table-th": !0,
|
|
62
62
|
"k-header": !0,
|
|
63
63
|
"k-grid-header-sticky": l.locked,
|
|
64
|
-
"k-sorted": e.sort && e.sort.some((
|
|
64
|
+
"k-sorted": e.sort && e.sort.some((a) => a.field === l.field)
|
|
65
65
|
}, l.headerClassName);
|
|
66
66
|
l.locked === !1 && (l.left = 0);
|
|
67
|
-
const
|
|
68
|
-
ariaSort:
|
|
67
|
+
const g = l.left !== void 0 ? e.isRtl ? { left: l.right, right: l.left } : { left: l.left, right: l.right } : {}, N = H.toLanguageString(M, U[M]), K = l.isAccessible ? {
|
|
68
|
+
ariaSort: Y[d],
|
|
69
69
|
role: "columnheader",
|
|
70
70
|
ariaColumnIndex: l.ariaColumnIndex,
|
|
71
71
|
ariaSelected: !1,
|
|
72
|
-
ariaDescription: c ?
|
|
72
|
+
ariaDescription: c ? N : ""
|
|
73
73
|
} : {
|
|
74
74
|
role: "presentation"
|
|
75
|
-
}, h = l.declarationIndex >= 0 ? ++
|
|
76
|
-
|
|
75
|
+
}, h = l.declarationIndex >= 0 ? ++E : --D, A = l.headerCell ? l.headerCell : P, R = /* @__PURE__ */ r.createElement(
|
|
76
|
+
A,
|
|
77
77
|
{
|
|
78
78
|
key: 1,
|
|
79
79
|
field: l.field,
|
|
80
|
-
onClick: c && ((
|
|
80
|
+
onClick: c && ((a) => k(a, l)) || void 0,
|
|
81
81
|
selectionChange: e.selectionChange,
|
|
82
82
|
title: l.title,
|
|
83
83
|
selectionValue: l.headerSelectionValue,
|
|
@@ -98,43 +98,44 @@ const Q = {
|
|
|
98
98
|
filterable: e.filterable && l.filterable,
|
|
99
99
|
filterOperators: e.filterOperators,
|
|
100
100
|
onFilterChange: e.filterChange,
|
|
101
|
-
show:
|
|
102
|
-
onCloseMenu:
|
|
101
|
+
show: z === l.field ? !0 : void 0,
|
|
102
|
+
onCloseMenu: x,
|
|
103
103
|
navigatable: e.navigatable,
|
|
104
104
|
group: e.group,
|
|
105
105
|
groupable: e.groupable,
|
|
106
106
|
onGroupChange: e.groupChange,
|
|
107
|
-
columnMenu: s
|
|
107
|
+
columnMenu: s,
|
|
108
|
+
columnMenuIcon: i
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
), S = {
|
|
111
|
-
...
|
|
112
|
+
...K,
|
|
112
113
|
key: h,
|
|
113
114
|
colSpan: l.colSpan,
|
|
114
115
|
rowSpan: l.rowSpan,
|
|
115
|
-
className:
|
|
116
|
-
style:
|
|
116
|
+
className: m,
|
|
117
|
+
style: g,
|
|
117
118
|
columnId: l.id,
|
|
118
119
|
navigatable: l.navigatable,
|
|
119
|
-
onKeyDown: (
|
|
120
|
+
onKeyDown: (a) => I(a, l),
|
|
120
121
|
role: "columnheader"
|
|
121
122
|
}, w = [
|
|
122
123
|
R,
|
|
123
124
|
e.columnResize && e.columnResize.resizable && l.resizable && /* @__PURE__ */ r.createElement(
|
|
124
|
-
|
|
125
|
+
q,
|
|
125
126
|
{
|
|
126
127
|
key: 2,
|
|
127
|
-
resize: (
|
|
128
|
-
autofit: (
|
|
128
|
+
resize: (a, F, G) => e.columnResize && e.columnResize.dragHandler(a, l, F, G),
|
|
129
|
+
autofit: (a) => e.columnResize && e.columnResize.dblClickHandler(a, [l.id])
|
|
129
130
|
}
|
|
130
131
|
)
|
|
131
|
-
], C =
|
|
132
|
+
], C = Q(e.cells, l.cells);
|
|
132
133
|
if (C && C.headerCell) {
|
|
133
|
-
const
|
|
134
|
-
return /* @__PURE__ */ r.createElement(
|
|
134
|
+
const a = C.headerCell;
|
|
135
|
+
return /* @__PURE__ */ r.createElement(a, { ...R.props, key: h, thProps: S, index: n }, w);
|
|
135
136
|
}
|
|
136
137
|
return /* @__PURE__ */ r.createElement(
|
|
137
|
-
|
|
138
|
+
B,
|
|
138
139
|
{
|
|
139
140
|
...S,
|
|
140
141
|
key: h
|
|
@@ -142,21 +143,21 @@ const Q = {
|
|
|
142
143
|
w
|
|
143
144
|
);
|
|
144
145
|
});
|
|
145
|
-
return e.columnsMap.map((t,
|
|
146
|
-
|
|
146
|
+
return e.columnsMap.map((t, n) => e.pressHandler && /* @__PURE__ */ r.createElement(
|
|
147
|
+
O,
|
|
147
148
|
{
|
|
148
|
-
key:
|
|
149
|
+
key: n,
|
|
149
150
|
pressHandler: e.pressHandler,
|
|
150
151
|
dragHandler: e.dragHandler,
|
|
151
152
|
releaseHandler: e.releaseHandler,
|
|
152
|
-
ariaRowIndex:
|
|
153
|
+
ariaRowIndex: n + 1,
|
|
153
154
|
dragClue: e.dragClue,
|
|
154
155
|
headerRef: e.headerRef,
|
|
155
156
|
containerRef: e.containerRef
|
|
156
157
|
},
|
|
157
158
|
y(t)
|
|
158
|
-
) || /* @__PURE__ */ r.createElement("tr", { key:
|
|
159
|
+
) || /* @__PURE__ */ r.createElement("tr", { key: n, className: "k-table-row", role: "row", "aria-rowindex": n + 1 }, y(t)));
|
|
159
160
|
};
|
|
160
161
|
export {
|
|
161
|
-
|
|
162
|
+
re as HeaderRow
|
|
162
163
|
};
|