@progress/kendo-react-grid 8.2.0-develop.8 → 8.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/Grid.js +1 -1
- package/Grid.mjs +229 -219
- package/cells/GridEditCell.js +1 -1
- package/cells/GridEditCell.mjs +27 -27
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/footer/Footer.js +1 -1
- package/footer/Footer.mjs +7 -7
- package/header/FilterRow.js +1 -1
- package/header/FilterRow.mjs +1 -1
- package/header/Header.js +1 -1
- package/header/Header.mjs +9 -7
- package/index.d.mts +29 -9
- package/index.d.ts +29 -9
- package/package-metadata.mjs +1 -1
- package/package.json +10 -10
- package/utils/index.js +1 -1
- package/utils/index.mjs +82 -82
package/footer/Footer.mjs
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import { getScrollbarWidth as s, classNames as r, kendoThemeMaps as o } from "@progress/kendo-react-common";
|
|
10
9
|
import * as t from "react";
|
|
11
|
-
|
|
10
|
+
import { classNames as s, kendoThemeMaps as r } from "@progress/kendo-react-common";
|
|
11
|
+
class i extends t.Component {
|
|
12
12
|
constructor() {
|
|
13
|
-
super(...arguments), this.footerWrap = null, this.table = null
|
|
13
|
+
super(...arguments), this.footerWrap = null, this.table = null;
|
|
14
14
|
}
|
|
15
15
|
componentDidMount() {
|
|
16
16
|
this.setState({});
|
|
@@ -43,7 +43,7 @@ class l extends t.Component {
|
|
|
43
43
|
this.footerWrap = e;
|
|
44
44
|
},
|
|
45
45
|
className: "k-grid-footer-wrap",
|
|
46
|
-
style: this.
|
|
46
|
+
style: this.props.hasScrollbarWidth ? {} : { borderWidth: 0 },
|
|
47
47
|
role: "presentation"
|
|
48
48
|
},
|
|
49
49
|
/* @__PURE__ */ t.createElement(
|
|
@@ -52,11 +52,11 @@ class l extends t.Component {
|
|
|
52
52
|
ref: (e) => {
|
|
53
53
|
this.table = e;
|
|
54
54
|
},
|
|
55
|
-
className:
|
|
55
|
+
className: s(
|
|
56
56
|
"k-table k-grid-footer-table",
|
|
57
57
|
{
|
|
58
58
|
"k-table-md": !this.props.size,
|
|
59
|
-
[`k-table-${
|
|
59
|
+
[`k-table-${r.sizeMap[this.props.size] || this.props.size}`]: this.props.size
|
|
60
60
|
},
|
|
61
61
|
this.props.className
|
|
62
62
|
),
|
|
@@ -72,5 +72,5 @@ class l extends t.Component {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
export {
|
|
75
|
-
|
|
75
|
+
i as Footer
|
|
76
76
|
};
|
package/header/FilterRow.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 L=require("react"),x=require("@progress/kendo-react-intl"),S=require("../cells/GridFilterCell.js"),d=require("../filterCommon.js"),k=require("@progress/kendo-react-data-tools"),C=require("../messages/index.js"),T=require("@progress/kendo-react-common"),O=require("../utils/index.js");function q(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const r in a)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(a,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>a[r]})}}return t.default=a,Object.freeze(t)}const n=q(L),y="k-table-row k-filter-row";class m extends n.Component{headerCellClassName(t,r){let i=`${r?"k-grid-header-sticky":""}`;return this.props.sort&&this.props.sort.filter(c=>c.field===t).length>0&&(i+=" k-sorted"),i}setFilter(t,r,i,c){if(!this.props.filterChange)return;const o=[];(t!==""&&t!==null||r!=="")&&o.push({field:i,operator:r,value:t}),this.props.filter&&this.props.filter.filters&&(this.props.filter.filters||[]).forEach(s=>{const l=s;l&&l.field!==i&&o.push(l)});const h=this.props.filter&&this.props.filter.logic?this.props.filter.logic:"and";this.props.filterChange(o.length>0?{logic:h,filters:o}:null,c)}render(){const t=x.provideLocalizationService(this),r=this.props.filter&&this.props.filter.filters||[],i=e=>{if(e===void 0)return;const s=r.filter(l=>l.field===e);return s.length?s[0]:void 0};let c=0,o=-1;const h=this.props.columns.filter(e=>e.children.length===0).map(e=>{const s=d.getFilterType(e.filter),l=i(e.field),b=e.filterable?t.toLanguageString(C.filterAriaLabel,C.messages[C.filterAriaLabel]):void 0;let g=l&&l.value;g===void 0&&(g=s==="text"?"":null);const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react"),x=require("@progress/kendo-react-intl"),S=require("../cells/GridFilterCell.js"),d=require("../filterCommon.js"),k=require("@progress/kendo-react-data-tools"),C=require("../messages/index.js"),T=require("@progress/kendo-react-common"),O=require("../utils/index.js");function q(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const r in a)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(a,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>a[r]})}}return t.default=a,Object.freeze(t)}const n=q(L),y="k-table-row k-filter-row";class m extends n.Component{headerCellClassName(t,r){let i=`${r?"k-grid-header-sticky":""}`;return this.props.sort&&this.props.sort.filter(c=>c.field===t).length>0&&(i+=" k-sorted"),i}setFilter(t,r,i,c){if(!this.props.filterChange)return;const o=[];(t!==""&&t!==null||r!=="")&&o.push({field:i,operator:r,value:t}),this.props.filter&&this.props.filter.filters&&(this.props.filter.filters||[]).forEach(s=>{const l=s;l&&l.field!==i&&o.push(l)});const h=this.props.filter&&this.props.filter.logic?this.props.filter.logic:"and";this.props.filterChange(o.length>0?{logic:h,filters:o}:null,c)}render(){const t=x.provideLocalizationService(this),r=this.props.filter&&this.props.filter.filters||[],i=e=>{if(e===void 0)return;const s=r.filter(l=>l.field===e);return s.length?s[0]:void 0};let c=0,o=-1;const h=this.props.columns.filter(e=>e.children.length===0).map(e=>{const s=d.getFilterType(e.filter),l=i(e.field),b=e.filterable?t.toLanguageString(C.filterAriaLabel,C.messages[C.filterAriaLabel]):void 0;let g=l&&l.value;g===void 0&&(g=s==="text"?"":null);const f=e.filterable&&{render:this.props.cellRender,field:e.field,title:e.filterTitle,value:g,operator:l&&l.operator,operators:d.operatorMap(this.props.filterOperators[s]||[],t),booleanValues:d.operatorMap(d.booleanFilterValues,t),filterType:s,ariaLabel:b,onChange:p=>{this.setFilter(p.value,p.operator,e.field,p.syntheticEvent)}},v=e.declarationIndex>=0?++o:--c,E={ariaLabel:b,ariaColumnIndex:e.ariaColumnIndex},I=e.left!==void 0?this.props.isRtl?{left:e.right,right:e.left}:{left:e.left,right:e.right}:{},F={columnId:k.tableKeyboardNavigationTools.getFilterColumnId(e.id),navigatable:e.navigatable||this.props.navigatable,style:I,className:T.classNames("k-table-th",this.headerCellClassName(e.field,e.locked)||void 0),role:"columnheader",...E},R=f&&(e.filterCell?n.createElement(e.filterCell,{...f}):n.createElement(S.GridFilterCell,{size:this.props.size,...f})),u=O.resolveCells(this.props.cells,e.cells);if(u&&u.filterCell){const p=u.filterCell;return n.createElement(p,{key:v,...f,thProps:F,index:o},R)}return n.createElement(k.HeaderThElement,{key:v,...F},R)});return n.createElement("tr",{className:y,"aria-rowindex":this.props.ariaRowIndex,role:"row"},h)}}x.registerForLocalization(m);exports.FILTER_ROW_CLASS=y;exports.FilterRow=m;
|
package/header/FilterRow.mjs
CHANGED
|
@@ -66,7 +66,7 @@ class S extends a.Component {
|
|
|
66
66
|
ariaColumnIndex: e.ariaColumnIndex
|
|
67
67
|
}, E = e.left !== void 0 ? this.props.isRtl ? { left: e.right, right: e.left } : { left: e.left, right: e.right } : {}, m = {
|
|
68
68
|
columnId: R.getFilterColumnId(e.id),
|
|
69
|
-
navigatable: e.navigatable,
|
|
69
|
+
navigatable: e.navigatable || this.props.navigatable,
|
|
70
70
|
style: E,
|
|
71
71
|
className: T("k-table-th", this.headerCellClassName(e.field, e.locked) || void 0),
|
|
72
72
|
role: "columnheader",
|
package/header/Header.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 i=require("react"),l=require("@progress/kendo-react-common"),o=require("@progress/kendo-react-data-tools");function
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),l=require("@progress/kendo-react-common"),o=require("@progress/kendo-react-data-tools");function c(s){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const t in s)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:()=>s[t]})}}return e.default=s,Object.freeze(e)}const r=c(i);class n extends r.Component{constructor(){super(...arguments),this.headerWrap=null,this.table=null,this.syncScroll=!1,this.scrollbarWidth=l.getScrollbarWidth(),this.onScroll=e=>{if(this.syncScroll){this.syncScroll=!1;return}if(!this.headerWrap)return;const t=this.headerWrap.scrollLeft,a=this.props.scrollableDataElement();a&&a.scrollLeft!==t&&(a.scrollLeft=t)}}get element(){return this.props.elemRef.current}componentDidMount(){const e=o.isRtl(this.element);this.props.columnResize&&this.props.columnResize.setIsRtl(e),this.forceUpdate()}setScrollLeft(e){this.headerWrap&&this.headerWrap.scrollLeft!==e&&(this.syncScroll=!0,this.headerWrap.scrollLeft=e)}setWidth(e){this.table&&(this.table.style.width=e+"px")}render(){return this.props.staticHeaders?r.createElement("div",{ref:this.props.elemRef,className:l.classNames("k-grid-header",this.props.className,{"k-grid-draggable-header":this.props.draggable}),role:"presentation"},r.createElement("div",{ref:e=>{this.headerWrap=e},className:"k-grid-header-wrap",style:this.props.hasScrollbarWidth?{}:{borderWidth:0},onScroll:this.onScroll,role:"presentation"},r.createElement("table",{ref:e=>{this.table=e},className:l.classNames("k-table k-grid-header-table",{"k-table-md":!this.props.size,[`k-table-${l.kendoThemeMaps.sizeMap[this.props.size]||this.props.size}`]:this.props.size},this.props.className),role:"presentation"},r.createElement("colgroup",{ref:e=>{this.props.columnResize.colGroupHeader=e}},this.props.cols),r.createElement("thead",{className:"k-table-thead",role:"rowgroup",...o.tableKeyboardNavigationHeaderAttributes},this.props.headerRow,this.props.filterRow)))):r.createElement("thead",{role:"presentation",className:l.classNames("k-table-thead",this.props.className,{"k-grid-draggable-header":this.props.draggable}),...o.tableKeyboardNavigationHeaderAttributes},this.props.headerRow,this.props.filterRow)}}exports.Header=n;
|
package/header/Header.mjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import * as t from "react";
|
|
10
10
|
import { getScrollbarWidth as o, classNames as s, kendoThemeMaps as i } from "@progress/kendo-react-common";
|
|
11
|
-
import { isRtl as
|
|
11
|
+
import { isRtl as p, tableKeyboardNavigationHeaderAttributes as l } from "@progress/kendo-react-data-tools";
|
|
12
12
|
class d extends t.Component {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments), this.headerWrap = null, this.table = null, this.syncScroll = !1, this.scrollbarWidth = o(), this.onScroll = (e) => {
|
|
@@ -18,15 +18,15 @@ class d extends t.Component {
|
|
|
18
18
|
}
|
|
19
19
|
if (!this.headerWrap)
|
|
20
20
|
return;
|
|
21
|
-
const
|
|
22
|
-
r && r.scrollLeft !==
|
|
21
|
+
const a = this.headerWrap.scrollLeft, r = this.props.scrollableDataElement();
|
|
22
|
+
r && r.scrollLeft !== a && (r.scrollLeft = a);
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
get element() {
|
|
26
26
|
return this.props.elemRef.current;
|
|
27
27
|
}
|
|
28
28
|
componentDidMount() {
|
|
29
|
-
const e =
|
|
29
|
+
const e = p(this.element);
|
|
30
30
|
this.props.columnResize && this.props.columnResize.setIsRtl(e), this.forceUpdate();
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
@@ -50,6 +50,7 @@ class d extends t.Component {
|
|
|
50
50
|
ref: this.props.elemRef,
|
|
51
51
|
className: s(
|
|
52
52
|
"k-grid-header",
|
|
53
|
+
this.props.className,
|
|
53
54
|
{ "k-grid-draggable-header": this.props.draggable }
|
|
54
55
|
),
|
|
55
56
|
role: "presentation"
|
|
@@ -61,7 +62,7 @@ class d extends t.Component {
|
|
|
61
62
|
this.headerWrap = e;
|
|
62
63
|
},
|
|
63
64
|
className: "k-grid-header-wrap",
|
|
64
|
-
style: this.
|
|
65
|
+
style: this.props.hasScrollbarWidth ? {} : { borderWidth: 0 },
|
|
65
66
|
onScroll: this.onScroll,
|
|
66
67
|
role: "presentation"
|
|
67
68
|
},
|
|
@@ -84,7 +85,7 @@ class d extends t.Component {
|
|
|
84
85
|
/* @__PURE__ */ t.createElement("colgroup", { ref: (e) => {
|
|
85
86
|
this.props.columnResize.colGroupHeader = e;
|
|
86
87
|
} }, this.props.cols),
|
|
87
|
-
/* @__PURE__ */ t.createElement("thead", { className: "k-table-thead", role: "rowgroup", ...
|
|
88
|
+
/* @__PURE__ */ t.createElement("thead", { className: "k-table-thead", role: "rowgroup", ...l }, this.props.headerRow, this.props.filterRow)
|
|
88
89
|
)
|
|
89
90
|
)
|
|
90
91
|
) : /* @__PURE__ */ t.createElement(
|
|
@@ -93,9 +94,10 @@ class d extends t.Component {
|
|
|
93
94
|
role: "presentation",
|
|
94
95
|
className: s(
|
|
95
96
|
"k-table-thead",
|
|
97
|
+
this.props.className,
|
|
96
98
|
{ "k-grid-draggable-header": this.props.draggable }
|
|
97
99
|
),
|
|
98
|
-
...
|
|
100
|
+
...l
|
|
99
101
|
},
|
|
100
102
|
this.props.headerRow,
|
|
101
103
|
this.props.filterRow
|
package/index.d.mts
CHANGED
|
@@ -25,6 +25,7 @@ import { HeaderCellBaseProps } from '@progress/kendo-react-data-tools';
|
|
|
25
25
|
import { HeaderThElementProps } from '@progress/kendo-react-data-tools';
|
|
26
26
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
27
27
|
import { KendoReactComponentBaseProps } from '@progress/kendo-react-common';
|
|
28
|
+
import { NavigatableSettings } from '@progress/kendo-react-data-tools';
|
|
28
29
|
import { PagerProps } from '@progress/kendo-react-data-tools';
|
|
29
30
|
import { PagerTargetEvent } from '@progress/kendo-react-data-tools';
|
|
30
31
|
import PropTypes from 'prop-types';
|
|
@@ -318,7 +319,9 @@ export declare class GridClassComponent extends React_2.Component<GridProps> {
|
|
|
318
319
|
onColumnResize: PropTypes.Requireable<(...args: any[]) => any>;
|
|
319
320
|
onColumnReorder: PropTypes.Requireable<(...args: any[]) => any>;
|
|
320
321
|
dataItemKey: PropTypes.Requireable<string>;
|
|
321
|
-
navigatable: PropTypes.Requireable<boolean
|
|
322
|
+
navigatable: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
|
|
323
|
+
mode: PropTypes.Requireable<string>;
|
|
324
|
+
}> | null | undefined>>;
|
|
322
325
|
size: PropTypes.Requireable<string>;
|
|
323
326
|
};
|
|
324
327
|
/** @hidden */
|
|
@@ -329,7 +332,11 @@ export declare class GridClassComponent extends React_2.Component<GridProps> {
|
|
|
329
332
|
private _columnsMutations;
|
|
330
333
|
private _resized;
|
|
331
334
|
private _focusFirst;
|
|
335
|
+
private _newEditableRow?;
|
|
336
|
+
private _singleEditRow?;
|
|
337
|
+
private _lastActiveElement?;
|
|
332
338
|
private _shouldUpdateLeftRight;
|
|
339
|
+
private _scrollbarWidth?;
|
|
333
340
|
private contextStateRef;
|
|
334
341
|
private navigationStateRef;
|
|
335
342
|
private _data;
|
|
@@ -395,6 +402,7 @@ export declare class GridClassComponent extends React_2.Component<GridProps> {
|
|
|
395
402
|
private isRtl;
|
|
396
403
|
private rowIndex;
|
|
397
404
|
private headTable;
|
|
405
|
+
private rowsInEdit;
|
|
398
406
|
private get _header();
|
|
399
407
|
private get _gridId();
|
|
400
408
|
private observer;
|
|
@@ -442,6 +450,7 @@ export declare class GridClassComponent extends React_2.Component<GridProps> {
|
|
|
442
450
|
private getVirtualScroll;
|
|
443
451
|
private isAllData;
|
|
444
452
|
private initializeVirtualization;
|
|
453
|
+
private getCachedScrollbarWidth;
|
|
445
454
|
private scrollHandler;
|
|
446
455
|
private onKeyDown;
|
|
447
456
|
private onFocus;
|
|
@@ -475,7 +484,7 @@ export declare class GridClassComponent extends React_2.Component<GridProps> {
|
|
|
475
484
|
private childrenToArray;
|
|
476
485
|
private readColumns;
|
|
477
486
|
private mapColumns;
|
|
478
|
-
private
|
|
487
|
+
private filterColumnsByMediaProp;
|
|
479
488
|
private initColumns;
|
|
480
489
|
private configureColumns;
|
|
481
490
|
private getHeaderRow;
|
|
@@ -484,6 +493,7 @@ export declare class GridClassComponent extends React_2.Component<GridProps> {
|
|
|
484
493
|
private getArguments;
|
|
485
494
|
private getLeafDataItems;
|
|
486
495
|
private getSlicedLeafDataItems;
|
|
496
|
+
private handleFocusInEditableRows;
|
|
487
497
|
}
|
|
488
498
|
|
|
489
499
|
/**
|
|
@@ -491,6 +501,12 @@ export declare class GridClassComponent extends React_2.Component<GridProps> {
|
|
|
491
501
|
*/
|
|
492
502
|
export declare const GridColumn: React_2.FunctionComponent<GridColumnProps>;
|
|
493
503
|
|
|
504
|
+
/**
|
|
505
|
+
* The type of elements that the children property of the Grid accepts.
|
|
506
|
+
*/
|
|
507
|
+
export declare interface GridColumnChildrenProps extends GridColumnProps, ReactElement<GridColumnProps> {
|
|
508
|
+
}
|
|
509
|
+
|
|
494
510
|
/**
|
|
495
511
|
* @hidden
|
|
496
512
|
*/
|
|
@@ -785,7 +801,7 @@ export declare class GridColumnMenuFilter extends React_2.Component<GridColumnMe
|
|
|
785
801
|
*/
|
|
786
802
|
declare interface GridColumnMenuFilterBaseProps extends GridColumnMenuBaseProps {
|
|
787
803
|
/**
|
|
788
|
-
* The current filter state of the Grid.It takes value of type [CompositeFilterDescriptor]({% api_kendo-data-query_compositefilterdescriptor %})
|
|
804
|
+
* The current filter state of the Grid.It takes value of type [CompositeFilterDescriptor]({% slug api_kendo-data-query_compositefilterdescriptor %})
|
|
789
805
|
*/
|
|
790
806
|
filter?: CompositeFilterDescriptor;
|
|
791
807
|
/**
|
|
@@ -1225,7 +1241,7 @@ export declare interface GridColumnProps extends Omit<ColumnBaseProps, 'cell'> {
|
|
|
1225
1241
|
/**
|
|
1226
1242
|
* A collection of child columns.
|
|
1227
1243
|
*/
|
|
1228
|
-
children?: GridColumnProps[] | ReactElement<GridColumnProps>[];
|
|
1244
|
+
children?: GridColumnProps[] | ReactElement<GridColumnProps>[] | GridColumnChildrenProps[];
|
|
1229
1245
|
/**
|
|
1230
1246
|
* Specifies a React element that will be cloned and rendered inside the column menu of the Grid ([see example]({% slug column_menu_grid %}#toc-basic-usage)).
|
|
1231
1247
|
*/
|
|
@@ -1478,7 +1494,7 @@ export declare interface GridCustomFooterCellProps extends GridFooterCellProps {
|
|
|
1478
1494
|
*/
|
|
1479
1495
|
export declare interface GridCustomHeaderCellProps extends GridHeaderCellProps {
|
|
1480
1496
|
/**
|
|
1481
|
-
* The props and attributes that are applied to the `th` element by default. The property should be used with the [HeaderThElement](slug:) component as demonstrated in [this example](slug:cells_grid#toc-group-header-group-footer-header-cell-footer-cell-filter-cell-and-data-cell).
|
|
1497
|
+
* The props and attributes that are applied to the `th` element by default. The property should be used with the [HeaderThElement](slug:api_data-tools_headerthelement) component as demonstrated in [this example](slug:cells_grid#toc-group-header-group-footer-header-cell-footer-cell-filter-cell-and-data-cell).
|
|
1482
1498
|
*/
|
|
1483
1499
|
thProps?: GridThAttributes | null;
|
|
1484
1500
|
/**
|
|
@@ -1496,7 +1512,7 @@ export declare interface GridCustomHeaderCellProps extends GridHeaderCellProps {
|
|
|
1496
1512
|
*/
|
|
1497
1513
|
export declare interface GridDataStateChangeEvent extends GridEvent {
|
|
1498
1514
|
/**
|
|
1499
|
-
* The [State]({% api_kendo-data-query_state %}) of the Grid based on the user action.
|
|
1515
|
+
* The [State]({% slug api_kendo-data-query_state %}) of the Grid based on the user action.
|
|
1500
1516
|
*/
|
|
1501
1517
|
dataState: State;
|
|
1502
1518
|
targetEvent?: PagerTargetEvent;
|
|
@@ -1683,7 +1699,7 @@ export declare interface GridFilterCellProps {
|
|
|
1683
1699
|
*/
|
|
1684
1700
|
export declare interface GridFilterChangeEvent extends GridEvent {
|
|
1685
1701
|
/**
|
|
1686
|
-
* The new [CompositeFilterDescriptor]({% api_kendo-data-query_compositefilterdescriptor %}) based on the user action.
|
|
1702
|
+
* The new [CompositeFilterDescriptor]({% slug api_kendo-data-query_compositefilterdescriptor %}) based on the user action.
|
|
1687
1703
|
*/
|
|
1688
1704
|
filter: CompositeFilterDescriptor;
|
|
1689
1705
|
}
|
|
@@ -2158,7 +2174,7 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
|
|
|
2158
2174
|
*/
|
|
2159
2175
|
filterable?: boolean;
|
|
2160
2176
|
/**
|
|
2161
|
-
* The [descriptor]({% api_kendo-data-query_compositefilterdescriptor %}) by which the data is filtered ([more information and examples]({% slug filtering_grid %})). This affects the values and buttons in the `FilterRow` of the Grid.
|
|
2177
|
+
* The [descriptor]({% slug api_kendo-data-query_compositefilterdescriptor %}) by which the data is filtered ([more information and examples]({% slug filtering_grid %})). This affects the values and buttons in the `FilterRow` of the Grid.
|
|
2162
2178
|
*/
|
|
2163
2179
|
filter?: CompositeFilterDescriptor;
|
|
2164
2180
|
/**
|
|
@@ -2334,6 +2350,10 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
|
|
|
2334
2350
|
* Fires when a header cell is about to be rendered. Overrides the default appearance of the header cell.
|
|
2335
2351
|
*/
|
|
2336
2352
|
headerCellRender?: (defaultRendering: React.ReactNode | null, props: GridHeaderCellProps) => React.ReactNode;
|
|
2353
|
+
/**
|
|
2354
|
+
* @hidden
|
|
2355
|
+
*/
|
|
2356
|
+
headerClassName?: string;
|
|
2337
2357
|
/**
|
|
2338
2358
|
* Fires when Grid is scrolled.
|
|
2339
2359
|
*/
|
|
@@ -2346,7 +2366,7 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
|
|
|
2346
2366
|
* If set to `true`, the user can use dedicated shortcuts to interact with the Grid.
|
|
2347
2367
|
* By default, navigation is disabled and the Grid content is accessible in the normal tab sequence.
|
|
2348
2368
|
*/
|
|
2349
|
-
navigatable?: boolean;
|
|
2369
|
+
navigatable?: boolean | NavigatableSettings;
|
|
2350
2370
|
/**
|
|
2351
2371
|
* Fires when Grid keyboard navigation position is changed.
|
|
2352
2372
|
*/
|
package/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ import { HeaderCellBaseProps } from '@progress/kendo-react-data-tools';
|
|
|
25
25
|
import { HeaderThElementProps } from '@progress/kendo-react-data-tools';
|
|
26
26
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
27
27
|
import { KendoReactComponentBaseProps } from '@progress/kendo-react-common';
|
|
28
|
+
import { NavigatableSettings } from '@progress/kendo-react-data-tools';
|
|
28
29
|
import { PagerProps } from '@progress/kendo-react-data-tools';
|
|
29
30
|
import { PagerTargetEvent } from '@progress/kendo-react-data-tools';
|
|
30
31
|
import PropTypes from 'prop-types';
|
|
@@ -318,7 +319,9 @@ export declare class GridClassComponent extends React_2.Component<GridProps> {
|
|
|
318
319
|
onColumnResize: PropTypes.Requireable<(...args: any[]) => any>;
|
|
319
320
|
onColumnReorder: PropTypes.Requireable<(...args: any[]) => any>;
|
|
320
321
|
dataItemKey: PropTypes.Requireable<string>;
|
|
321
|
-
navigatable: PropTypes.Requireable<boolean
|
|
322
|
+
navigatable: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
|
|
323
|
+
mode: PropTypes.Requireable<string>;
|
|
324
|
+
}> | null | undefined>>;
|
|
322
325
|
size: PropTypes.Requireable<string>;
|
|
323
326
|
};
|
|
324
327
|
/** @hidden */
|
|
@@ -329,7 +332,11 @@ export declare class GridClassComponent extends React_2.Component<GridProps> {
|
|
|
329
332
|
private _columnsMutations;
|
|
330
333
|
private _resized;
|
|
331
334
|
private _focusFirst;
|
|
335
|
+
private _newEditableRow?;
|
|
336
|
+
private _singleEditRow?;
|
|
337
|
+
private _lastActiveElement?;
|
|
332
338
|
private _shouldUpdateLeftRight;
|
|
339
|
+
private _scrollbarWidth?;
|
|
333
340
|
private contextStateRef;
|
|
334
341
|
private navigationStateRef;
|
|
335
342
|
private _data;
|
|
@@ -395,6 +402,7 @@ export declare class GridClassComponent extends React_2.Component<GridProps> {
|
|
|
395
402
|
private isRtl;
|
|
396
403
|
private rowIndex;
|
|
397
404
|
private headTable;
|
|
405
|
+
private rowsInEdit;
|
|
398
406
|
private get _header();
|
|
399
407
|
private get _gridId();
|
|
400
408
|
private observer;
|
|
@@ -442,6 +450,7 @@ export declare class GridClassComponent extends React_2.Component<GridProps> {
|
|
|
442
450
|
private getVirtualScroll;
|
|
443
451
|
private isAllData;
|
|
444
452
|
private initializeVirtualization;
|
|
453
|
+
private getCachedScrollbarWidth;
|
|
445
454
|
private scrollHandler;
|
|
446
455
|
private onKeyDown;
|
|
447
456
|
private onFocus;
|
|
@@ -475,7 +484,7 @@ export declare class GridClassComponent extends React_2.Component<GridProps> {
|
|
|
475
484
|
private childrenToArray;
|
|
476
485
|
private readColumns;
|
|
477
486
|
private mapColumns;
|
|
478
|
-
private
|
|
487
|
+
private filterColumnsByMediaProp;
|
|
479
488
|
private initColumns;
|
|
480
489
|
private configureColumns;
|
|
481
490
|
private getHeaderRow;
|
|
@@ -484,6 +493,7 @@ export declare class GridClassComponent extends React_2.Component<GridProps> {
|
|
|
484
493
|
private getArguments;
|
|
485
494
|
private getLeafDataItems;
|
|
486
495
|
private getSlicedLeafDataItems;
|
|
496
|
+
private handleFocusInEditableRows;
|
|
487
497
|
}
|
|
488
498
|
|
|
489
499
|
/**
|
|
@@ -491,6 +501,12 @@ export declare class GridClassComponent extends React_2.Component<GridProps> {
|
|
|
491
501
|
*/
|
|
492
502
|
export declare const GridColumn: React_2.FunctionComponent<GridColumnProps>;
|
|
493
503
|
|
|
504
|
+
/**
|
|
505
|
+
* The type of elements that the children property of the Grid accepts.
|
|
506
|
+
*/
|
|
507
|
+
export declare interface GridColumnChildrenProps extends GridColumnProps, ReactElement<GridColumnProps> {
|
|
508
|
+
}
|
|
509
|
+
|
|
494
510
|
/**
|
|
495
511
|
* @hidden
|
|
496
512
|
*/
|
|
@@ -785,7 +801,7 @@ export declare class GridColumnMenuFilter extends React_2.Component<GridColumnMe
|
|
|
785
801
|
*/
|
|
786
802
|
declare interface GridColumnMenuFilterBaseProps extends GridColumnMenuBaseProps {
|
|
787
803
|
/**
|
|
788
|
-
* The current filter state of the Grid.It takes value of type [CompositeFilterDescriptor]({% api_kendo-data-query_compositefilterdescriptor %})
|
|
804
|
+
* The current filter state of the Grid.It takes value of type [CompositeFilterDescriptor]({% slug api_kendo-data-query_compositefilterdescriptor %})
|
|
789
805
|
*/
|
|
790
806
|
filter?: CompositeFilterDescriptor;
|
|
791
807
|
/**
|
|
@@ -1225,7 +1241,7 @@ export declare interface GridColumnProps extends Omit<ColumnBaseProps, 'cell'> {
|
|
|
1225
1241
|
/**
|
|
1226
1242
|
* A collection of child columns.
|
|
1227
1243
|
*/
|
|
1228
|
-
children?: GridColumnProps[] | ReactElement<GridColumnProps>[];
|
|
1244
|
+
children?: GridColumnProps[] | ReactElement<GridColumnProps>[] | GridColumnChildrenProps[];
|
|
1229
1245
|
/**
|
|
1230
1246
|
* Specifies a React element that will be cloned and rendered inside the column menu of the Grid ([see example]({% slug column_menu_grid %}#toc-basic-usage)).
|
|
1231
1247
|
*/
|
|
@@ -1478,7 +1494,7 @@ export declare interface GridCustomFooterCellProps extends GridFooterCellProps {
|
|
|
1478
1494
|
*/
|
|
1479
1495
|
export declare interface GridCustomHeaderCellProps extends GridHeaderCellProps {
|
|
1480
1496
|
/**
|
|
1481
|
-
* The props and attributes that are applied to the `th` element by default. The property should be used with the [HeaderThElement](slug:) component as demonstrated in [this example](slug:cells_grid#toc-group-header-group-footer-header-cell-footer-cell-filter-cell-and-data-cell).
|
|
1497
|
+
* The props and attributes that are applied to the `th` element by default. The property should be used with the [HeaderThElement](slug:api_data-tools_headerthelement) component as demonstrated in [this example](slug:cells_grid#toc-group-header-group-footer-header-cell-footer-cell-filter-cell-and-data-cell).
|
|
1482
1498
|
*/
|
|
1483
1499
|
thProps?: GridThAttributes | null;
|
|
1484
1500
|
/**
|
|
@@ -1496,7 +1512,7 @@ export declare interface GridCustomHeaderCellProps extends GridHeaderCellProps {
|
|
|
1496
1512
|
*/
|
|
1497
1513
|
export declare interface GridDataStateChangeEvent extends GridEvent {
|
|
1498
1514
|
/**
|
|
1499
|
-
* The [State]({% api_kendo-data-query_state %}) of the Grid based on the user action.
|
|
1515
|
+
* The [State]({% slug api_kendo-data-query_state %}) of the Grid based on the user action.
|
|
1500
1516
|
*/
|
|
1501
1517
|
dataState: State;
|
|
1502
1518
|
targetEvent?: PagerTargetEvent;
|
|
@@ -1683,7 +1699,7 @@ export declare interface GridFilterCellProps {
|
|
|
1683
1699
|
*/
|
|
1684
1700
|
export declare interface GridFilterChangeEvent extends GridEvent {
|
|
1685
1701
|
/**
|
|
1686
|
-
* The new [CompositeFilterDescriptor]({% api_kendo-data-query_compositefilterdescriptor %}) based on the user action.
|
|
1702
|
+
* The new [CompositeFilterDescriptor]({% slug api_kendo-data-query_compositefilterdescriptor %}) based on the user action.
|
|
1687
1703
|
*/
|
|
1688
1704
|
filter: CompositeFilterDescriptor;
|
|
1689
1705
|
}
|
|
@@ -2158,7 +2174,7 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
|
|
|
2158
2174
|
*/
|
|
2159
2175
|
filterable?: boolean;
|
|
2160
2176
|
/**
|
|
2161
|
-
* The [descriptor]({% api_kendo-data-query_compositefilterdescriptor %}) by which the data is filtered ([more information and examples]({% slug filtering_grid %})). This affects the values and buttons in the `FilterRow` of the Grid.
|
|
2177
|
+
* The [descriptor]({% slug api_kendo-data-query_compositefilterdescriptor %}) by which the data is filtered ([more information and examples]({% slug filtering_grid %})). This affects the values and buttons in the `FilterRow` of the Grid.
|
|
2162
2178
|
*/
|
|
2163
2179
|
filter?: CompositeFilterDescriptor;
|
|
2164
2180
|
/**
|
|
@@ -2334,6 +2350,10 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
|
|
|
2334
2350
|
* Fires when a header cell is about to be rendered. Overrides the default appearance of the header cell.
|
|
2335
2351
|
*/
|
|
2336
2352
|
headerCellRender?: (defaultRendering: React.ReactNode | null, props: GridHeaderCellProps) => React.ReactNode;
|
|
2353
|
+
/**
|
|
2354
|
+
* @hidden
|
|
2355
|
+
*/
|
|
2356
|
+
headerClassName?: string;
|
|
2337
2357
|
/**
|
|
2338
2358
|
* Fires when Grid is scrolled.
|
|
2339
2359
|
*/
|
|
@@ -2346,7 +2366,7 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
|
|
|
2346
2366
|
* If set to `true`, the user can use dedicated shortcuts to interact with the Grid.
|
|
2347
2367
|
* By default, navigation is disabled and the Grid content is accessible in the normal tab sequence.
|
|
2348
2368
|
*/
|
|
2349
|
-
navigatable?: boolean;
|
|
2369
|
+
navigatable?: boolean | NavigatableSettings;
|
|
2350
2370
|
/**
|
|
2351
2371
|
* Fires when Grid keyboard navigation position is changed.
|
|
2352
2372
|
*/
|
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: 1722844128,
|
|
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": "8.2.0
|
|
3
|
+
"version": "8.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",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"@progress/kendo-data-query": "^1.0.0",
|
|
26
26
|
"@progress/kendo-drawing": "^1.20.1",
|
|
27
27
|
"@progress/kendo-licensing": "^1.3.4",
|
|
28
|
-
"@progress/kendo-react-animation": "8.2.0
|
|
29
|
-
"@progress/kendo-react-buttons": "8.2.0
|
|
30
|
-
"@progress/kendo-react-common": "8.2.0
|
|
31
|
-
"@progress/kendo-react-data-tools": "8.2.0
|
|
32
|
-
"@progress/kendo-react-dateinputs": "8.2.0
|
|
33
|
-
"@progress/kendo-react-dropdowns": "8.2.0
|
|
34
|
-
"@progress/kendo-react-inputs": "8.2.0
|
|
35
|
-
"@progress/kendo-react-intl": "8.2.0
|
|
36
|
-
"@progress/kendo-react-popup": "8.2.0
|
|
28
|
+
"@progress/kendo-react-animation": "8.2.0",
|
|
29
|
+
"@progress/kendo-react-buttons": "8.2.0",
|
|
30
|
+
"@progress/kendo-react-common": "8.2.0",
|
|
31
|
+
"@progress/kendo-react-data-tools": "8.2.0",
|
|
32
|
+
"@progress/kendo-react-dateinputs": "8.2.0",
|
|
33
|
+
"@progress/kendo-react-dropdowns": "8.2.0",
|
|
34
|
+
"@progress/kendo-react-inputs": "8.2.0",
|
|
35
|
+
"@progress/kendo-react-intl": "8.2.0",
|
|
36
|
+
"@progress/kendo-react-popup": "8.2.0",
|
|
37
37
|
"@progress/kendo-svg-icons": "^3.0.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"
|
package/utils/index.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../GridColumn.js"),g=require("@progress/kendo-react-data-tools");function f(e,r){const a=(e||"").split(".");let o=r;return a.forEach(d=>{o=o?o[d]:void 0}),o}function u(e,r,a,o,d,l,s=0){let t=s;for(let n=0;n<r.length;n++){if(!d||r[n].value===void 0||r[n].items===void 0){e[e.length]={dataIndex:o.index,dataItem:r[n],rowType:"data",level:s,expanded:l===void 0||f(l,r[n])},o.index++;continue}t=Math.max(t,s+1);const i=l===void 0||f(l,r[n])===void 0||f(l,r[n]);e[e.length]={dataIndex:-1,dataItem:r[n],level:s,rowType:"groupHeader",expanded:i},i&&(t=Math.max(u(e,r[n].items,a,o,d,l,s+1),t)),(a==="always"||i&&a==="visible")&&(e[e.length]={dataIndex:-1,dataItem:r[n],rowType:"groupFooter",level:s,expanded:i})}return t}function p(e,r,a,o=0){let d=[];if(!e)return[];e&&e.length===void 0&&(e=[e]),e.filter(t=>t&&t.props?!t.props.hidden:!t.hidden).forEach((t,n)=>{t=t.props?t.props:t;const i=r[n]||null,h=p(t.children,i&&i.children||[],a,o+1);d.push(Object.assign({depth:o},x.gridDefaultProps,h.length?{cell:()=>null,filterCell:()=>null}:{},i?{width:i.width,orderIndex:i.orderIndex}:{},t,{id:t.id?t.id:g.tableKeyboardNavigationTools.generateNavigatableId(`${a.prevId++}`,a.idPrefix,"column"),declarationIndex:d.length,children:h,rowSpan:0,colSpan:0,isAccessible:!0,left:i&&Math.floor(i.left),right:i&&Math.floor(i.right)}))});const s=(t,n)=>t.orderIndex===n.orderIndex?t.declarationIndex-n.declarationIndex:(t.orderIndex||0)-(n.orderIndex||0);if(d.sort(s),o===0){let t=[];const n=(i,h)=>i.forEach(c=>{c.parentIndex=h,n(c.children,t.push(c)-1)});return n(d,-1),t}return d}function v(e,r,a,o){let d=[];Array.isArray(e)?d=e:e&&(d=e.data);const l=[];if(d.length>0){let s=d[0];if(r)for(let n=0;n<r.length;n++)s=s.items&&s.items[0];Object.getOwnPropertyNames(s).forEach(n=>{n!==a&&l.push(Object.assign({id:g.tableKeyboardNavigationTools.generateNavigatableId(`${o.prevId++}`,o.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,rowSpan:0,index:0,left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0},x.gridDefaultProps,{field:n}))})}return l}const w=(e,r)=>{let a=e[r.parentIndex];for(;a;){if(a.footerCell)return!0;a=e[a.parentIndex]}return!1},y=e=>e.filter(r=>w(e,r)?!1:!!r.footerCell||!(r.children&&r.children.length>0)),b=e=>e.width!==void 0?Math.floor(parseFloat(e.width.toString()))+"px":void 0,I=e=>(e.sort((r,a)=>r.declarationIndex-a.declarationIndex),e.map(r=>{const{declarationIndex:a,parentIndex:o,depth:d,colSpan:l,rowSpan:s,index:t,kFirst:n,children:i,...h}=r;return i.length?{children:I(i),...h}:h})),m=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),S=17895697,C=(e,r)=>{if(!(!e&&!r))return r?e?{...e,...r,select:{...e.select||{},...r.select||{}},hierarchy:{...e.hierarchy||{},...r.hierarchy||{}},group:{...e.group||{},...r.group||{}},edit:{...e.edit||{},...r.edit||{}}}:r:e};exports.autoGenerateColumns=v;exports.firefox=m;exports.firefoxMaxHeight=S;exports.flatData=u;exports.footerColumns=y;exports.getColumnWidth=b;exports.getNestedValue=f;exports.readColumns=p;exports.resolveCells=C;exports.sanitizeColumns=I;
|