@progress/kendo-react-grid 9.4.0-develop.17 → 9.4.0-develop.19
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/GridComponent.js +1 -1
- package/GridComponent.mjs +20 -19
- package/NOTICE.txt +40 -51
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/index.d.mts +31 -0
- package/index.d.ts +31 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +13 -13
- package/rows/GridRow.js +1 -1
- package/rows/GridRow.mjs +45 -45
package/index.d.mts
CHANGED
|
@@ -1408,6 +1408,20 @@ export declare interface GridCustomHeaderCellProps extends GridHeaderCellProps {
|
|
|
1408
1408
|
index?: number;
|
|
1409
1409
|
}
|
|
1410
1410
|
|
|
1411
|
+
/**
|
|
1412
|
+
* The properties of the default Grid Row.
|
|
1413
|
+
*/
|
|
1414
|
+
export declare interface GridCustomRowProps extends GridRowProps {
|
|
1415
|
+
/**
|
|
1416
|
+
* The props and attributes that are applied to the tr element by default.
|
|
1417
|
+
*/
|
|
1418
|
+
trProps?: React.HTMLAttributes<HTMLTableRowElement> | null;
|
|
1419
|
+
/**
|
|
1420
|
+
* The default children of the table row.
|
|
1421
|
+
*/
|
|
1422
|
+
children?: React.ReactNode | React.ReactNode[];
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1411
1425
|
/**
|
|
1412
1426
|
* Represents the object of the `onDataStateChange` Grid event.
|
|
1413
1427
|
*/
|
|
@@ -2103,6 +2117,10 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
|
|
|
2103
2117
|
* Sets a set of custom components that the Grid will render instead of the built-in cell.
|
|
2104
2118
|
*/
|
|
2105
2119
|
cells?: GridCellsSettings;
|
|
2120
|
+
/**
|
|
2121
|
+
* Sets a set of custom components that the Grid will render instead of the built-in row.
|
|
2122
|
+
*/
|
|
2123
|
+
rows?: GridRowsSettings;
|
|
2106
2124
|
/**
|
|
2107
2125
|
* Sets the data of the Grid ([see example]({% slug paging_grid %})). If you use paging, the `data` option has to contain only the items for the current page. It takes values of type null, any or [DataResult]({% slug api_kendo-data-query_dataresult%})
|
|
2108
2126
|
*/
|
|
@@ -2523,6 +2541,10 @@ export declare interface GridRowProps extends KendoReactComponentBaseProps {
|
|
|
2523
2541
|
* A function for overriding the default rendering of the row.
|
|
2524
2542
|
*/
|
|
2525
2543
|
render?: (row: React.ReactElement<HTMLTableRowElement>, props: GridRowProps) => React.ReactNode;
|
|
2544
|
+
/**
|
|
2545
|
+
* Sets a set of rows components that the Grid will render instead of the built-in row.
|
|
2546
|
+
*/
|
|
2547
|
+
rows?: GridRowsSettings;
|
|
2526
2548
|
/**
|
|
2527
2549
|
* The index to be applied to the `aria-rowindex` attribute.
|
|
2528
2550
|
*/
|
|
@@ -2621,6 +2643,15 @@ export declare type GridRowSpannableSettings = {
|
|
|
2621
2643
|
valueGetter?: (dataItem: any, field: string) => any;
|
|
2622
2644
|
};
|
|
2623
2645
|
|
|
2646
|
+
/**
|
|
2647
|
+
* The settings of the rows prop options.
|
|
2648
|
+
*/
|
|
2649
|
+
export declare interface GridRowsSettings {
|
|
2650
|
+
groupHeader?: ComponentType<GridCustomRowProps>;
|
|
2651
|
+
data?: ComponentType<GridCustomRowProps>;
|
|
2652
|
+
groupFooter?: ComponentType<GridCustomRowProps>;
|
|
2653
|
+
}
|
|
2654
|
+
|
|
2624
2655
|
/**
|
|
2625
2656
|
* The type of the GridRow component.
|
|
2626
2657
|
*
|
package/index.d.ts
CHANGED
|
@@ -1408,6 +1408,20 @@ export declare interface GridCustomHeaderCellProps extends GridHeaderCellProps {
|
|
|
1408
1408
|
index?: number;
|
|
1409
1409
|
}
|
|
1410
1410
|
|
|
1411
|
+
/**
|
|
1412
|
+
* The properties of the default Grid Row.
|
|
1413
|
+
*/
|
|
1414
|
+
export declare interface GridCustomRowProps extends GridRowProps {
|
|
1415
|
+
/**
|
|
1416
|
+
* The props and attributes that are applied to the tr element by default.
|
|
1417
|
+
*/
|
|
1418
|
+
trProps?: React.HTMLAttributes<HTMLTableRowElement> | null;
|
|
1419
|
+
/**
|
|
1420
|
+
* The default children of the table row.
|
|
1421
|
+
*/
|
|
1422
|
+
children?: React.ReactNode | React.ReactNode[];
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1411
1425
|
/**
|
|
1412
1426
|
* Represents the object of the `onDataStateChange` Grid event.
|
|
1413
1427
|
*/
|
|
@@ -2103,6 +2117,10 @@ export declare interface GridProps extends KendoReactComponentBaseProps {
|
|
|
2103
2117
|
* Sets a set of custom components that the Grid will render instead of the built-in cell.
|
|
2104
2118
|
*/
|
|
2105
2119
|
cells?: GridCellsSettings;
|
|
2120
|
+
/**
|
|
2121
|
+
* Sets a set of custom components that the Grid will render instead of the built-in row.
|
|
2122
|
+
*/
|
|
2123
|
+
rows?: GridRowsSettings;
|
|
2106
2124
|
/**
|
|
2107
2125
|
* Sets the data of the Grid ([see example]({% slug paging_grid %})). If you use paging, the `data` option has to contain only the items for the current page. It takes values of type null, any or [DataResult]({% slug api_kendo-data-query_dataresult%})
|
|
2108
2126
|
*/
|
|
@@ -2523,6 +2541,10 @@ export declare interface GridRowProps extends KendoReactComponentBaseProps {
|
|
|
2523
2541
|
* A function for overriding the default rendering of the row.
|
|
2524
2542
|
*/
|
|
2525
2543
|
render?: (row: React.ReactElement<HTMLTableRowElement>, props: GridRowProps) => React.ReactNode;
|
|
2544
|
+
/**
|
|
2545
|
+
* Sets a set of rows components that the Grid will render instead of the built-in row.
|
|
2546
|
+
*/
|
|
2547
|
+
rows?: GridRowsSettings;
|
|
2526
2548
|
/**
|
|
2527
2549
|
* The index to be applied to the `aria-rowindex` attribute.
|
|
2528
2550
|
*/
|
|
@@ -2621,6 +2643,15 @@ export declare type GridRowSpannableSettings = {
|
|
|
2621
2643
|
valueGetter?: (dataItem: any, field: string) => any;
|
|
2622
2644
|
};
|
|
2623
2645
|
|
|
2646
|
+
/**
|
|
2647
|
+
* The settings of the rows prop options.
|
|
2648
|
+
*/
|
|
2649
|
+
export declare interface GridRowsSettings {
|
|
2650
|
+
groupHeader?: ComponentType<GridCustomRowProps>;
|
|
2651
|
+
data?: ComponentType<GridCustomRowProps>;
|
|
2652
|
+
groupFooter?: ComponentType<GridCustomRowProps>;
|
|
2653
|
+
}
|
|
2654
|
+
|
|
2624
2655
|
/**
|
|
2625
2656
|
* The type of the GridRow component.
|
|
2626
2657
|
*
|
package/package-metadata.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-grid",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1738842030,version:"9.4.0-develop.19",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "KendoReact",
|
|
11
11
|
productCode: "KENDOUIREACT",
|
|
12
12
|
productCodes: ["KENDOUIREACT"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "9.4.0-develop.
|
|
13
|
+
publishDate: 1738842030,
|
|
14
|
+
version: "9.4.0-develop.19",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
16
|
};
|
|
17
17
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-grid",
|
|
3
|
-
"version": "9.4.0-develop.
|
|
3
|
+
"version": "9.4.0-develop.19",
|
|
4
4
|
"description": "React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
"@progress/kendo-data-query": "^1.0.0",
|
|
29
29
|
"@progress/kendo-drawing": "^1.21.2",
|
|
30
30
|
"@progress/kendo-licensing": "^1.3.4",
|
|
31
|
-
"@progress/kendo-react-animation": "9.4.0-develop.
|
|
32
|
-
"@progress/kendo-react-buttons": "9.4.0-develop.
|
|
33
|
-
"@progress/kendo-react-common": "9.4.0-develop.
|
|
34
|
-
"@progress/kendo-react-data-tools": "9.4.0-develop.
|
|
35
|
-
"@progress/kendo-react-dateinputs": "9.4.0-develop.
|
|
36
|
-
"@progress/kendo-react-indicators": "9.4.0-develop.
|
|
37
|
-
"@progress/kendo-react-dropdowns": "9.4.0-develop.
|
|
38
|
-
"@progress/kendo-react-inputs": "9.4.0-develop.
|
|
39
|
-
"@progress/kendo-react-intl": "9.4.0-develop.
|
|
40
|
-
"@progress/kendo-react-popup": "9.4.0-develop.
|
|
41
|
-
"@progress/kendo-react-layout": "9.4.0-develop.
|
|
31
|
+
"@progress/kendo-react-animation": "9.4.0-develop.19",
|
|
32
|
+
"@progress/kendo-react-buttons": "9.4.0-develop.19",
|
|
33
|
+
"@progress/kendo-react-common": "9.4.0-develop.19",
|
|
34
|
+
"@progress/kendo-react-data-tools": "9.4.0-develop.19",
|
|
35
|
+
"@progress/kendo-react-dateinputs": "9.4.0-develop.19",
|
|
36
|
+
"@progress/kendo-react-indicators": "9.4.0-develop.19",
|
|
37
|
+
"@progress/kendo-react-dropdowns": "9.4.0-develop.19",
|
|
38
|
+
"@progress/kendo-react-inputs": "9.4.0-develop.19",
|
|
39
|
+
"@progress/kendo-react-intl": "9.4.0-develop.19",
|
|
40
|
+
"@progress/kendo-react-popup": "9.4.0-develop.19",
|
|
41
|
+
"@progress/kendo-react-layout": "9.4.0-develop.19",
|
|
42
42
|
"@progress/kendo-svg-icons": "^4.0.0",
|
|
43
43
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
44
44
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"package": {
|
|
85
85
|
"productName": "KendoReact",
|
|
86
86
|
"productCode": "KENDOUIREACT",
|
|
87
|
-
"publishDate":
|
|
87
|
+
"publishDate": 1738842030,
|
|
88
88
|
"licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
89
89
|
}
|
|
90
90
|
},
|
package/rows/GridRow.js
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),a=require("@progress/kendo-react-common"),
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),a=require("@progress/kendo-react-common"),h=require("../constants/index.js"),O=require("../GridClientWrapper.js");function S(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,t.get?t:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const c=S(v),G=e=>{var f;const r=c.useContext(O.GridContext),{reorderRowDropTargetRef:n,reorderRowDragTargetRef:t,activeDragRowDataItemRef:b}=r,{rowType:i,isAltRow:m,isInEdit:y,isSelected:D}=e,d=a.useUnstyled(),I=d&&d.uGrid?d.uGrid:a.uGrid,x=a.classNames(I.tr({selected:D,isHeader:i==="groupHeader",isFooter:i==="groupFooter",isMaster:i!=="groupHeader"&&i!=="groupFooter",isAltRow:m,isInEdit:y})),s=c.useRef(null),C=o=>{if(e.isRowReorderable&&b.current){const k=o.originalEvent.target;n.current=k.closest(".k-table-row")}},T=()=>{t.current&&e.isRowReorderable&&(t.current.style.userSelect="")};a.useDroppable(s,{onDragOver:C,onDrop:T});const u={onClick:o=>r.rowClick(o,e.dataItem),onDoubleClick:o=>r.rowDblClick(o,e.dataItem)},w={ref:s,id:e.id,...u,className:x,style:{height:e.rowHeight?e.rowHeight+"px":"",visibility:e.isHidden?"hidden":"",userSelect:(f=t==null?void 0:t.current)==null?void 0:f.style.userSelect},role:"row","aria-rowindex":e.ariaRowIndex,"absolute-row-index":e.absoluteRowIndex,[h.GRID_ROW_INDEX_ATTRIBUTE]:e.rowType==="data"?e.dataIndex:void 0},R=e.rowType||"data",l=e.rows;if(l&&l[R]){const o=l[R];return c.createElement(o,{key:e.absoluteRowIndex,...e,trProps:w},e.children)}const g=c.createElement("tr",{key:e.absoluteRowIndex,...w},e.children);return e.render?e.render.call(void 0,g,{...e,...u}):g};exports.GridRow=G;
|
package/rows/GridRow.mjs
CHANGED
|
@@ -7,61 +7,61 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as n from "react";
|
|
10
|
-
import { useUnstyled as
|
|
11
|
-
import { GRID_ROW_INDEX_ATTRIBUTE as
|
|
12
|
-
import { GridContext as
|
|
13
|
-
const
|
|
14
|
-
var
|
|
15
|
-
const a = n.useContext(
|
|
16
|
-
reorderRowDropTargetRef:
|
|
17
|
-
reorderRowDragTargetRef:
|
|
18
|
-
activeDragRowDataItemRef:
|
|
19
|
-
} = a, { rowType: o, isAltRow:
|
|
20
|
-
|
|
21
|
-
selected:
|
|
10
|
+
import { useUnstyled as h, uGrid as v, classNames as C, useDroppable as T } from "@progress/kendo-react-common";
|
|
11
|
+
import { GRID_ROW_INDEX_ATTRIBUTE as k } from "../constants/index.mjs";
|
|
12
|
+
import { GridContext as E } from "../GridClientWrapper.mjs";
|
|
13
|
+
const N = (e) => {
|
|
14
|
+
var R;
|
|
15
|
+
const a = n.useContext(E), {
|
|
16
|
+
reorderRowDropTargetRef: g,
|
|
17
|
+
reorderRowDragTargetRef: r,
|
|
18
|
+
activeDragRowDataItemRef: m
|
|
19
|
+
} = a, { rowType: o, isAltRow: D, isInEdit: f, isSelected: I } = e, i = h(), x = i && i.uGrid ? i.uGrid : v, y = C(
|
|
20
|
+
x.tr({
|
|
21
|
+
selected: I,
|
|
22
22
|
isHeader: o === "groupHeader",
|
|
23
23
|
isFooter: o === "groupFooter",
|
|
24
24
|
isMaster: o !== "groupHeader" && o !== "groupFooter",
|
|
25
|
-
isAltRow:
|
|
26
|
-
isInEdit:
|
|
25
|
+
isAltRow: D,
|
|
26
|
+
isInEdit: f
|
|
27
27
|
})
|
|
28
|
-
),
|
|
29
|
-
|
|
30
|
-
onDragOver: (
|
|
31
|
-
if (e.isRowReorderable &&
|
|
32
|
-
const
|
|
33
|
-
|
|
28
|
+
), l = n.useRef(null);
|
|
29
|
+
T(l, {
|
|
30
|
+
onDragOver: (t) => {
|
|
31
|
+
if (e.isRowReorderable && m.current) {
|
|
32
|
+
const b = t.originalEvent.target;
|
|
33
|
+
g.current = b.closest(".k-table-row");
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
onDrop: () => {
|
|
37
|
-
|
|
37
|
+
r.current && e.isRowReorderable && (r.current.style.userSelect = "");
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
|
-
const
|
|
41
|
-
onClick: (
|
|
42
|
-
onDoubleClick: (
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
visibility: e.isHidden ? "hidden" : "",
|
|
53
|
-
userSelect: (s = t == null ? void 0 : t.current) == null ? void 0 : s.style.userSelect
|
|
54
|
-
},
|
|
55
|
-
role: "row",
|
|
56
|
-
"aria-rowindex": e.ariaRowIndex,
|
|
57
|
-
"absolute-row-index": e.absoluteRowIndex,
|
|
58
|
-
key: e.absoluteRowIndex,
|
|
59
|
-
[y]: e.rowType === "data" ? e.dataIndex : void 0
|
|
40
|
+
const c = {
|
|
41
|
+
onClick: (t) => a.rowClick(t, e.dataItem),
|
|
42
|
+
onDoubleClick: (t) => a.rowDblClick(t, e.dataItem)
|
|
43
|
+
}, s = {
|
|
44
|
+
ref: l,
|
|
45
|
+
id: e.id,
|
|
46
|
+
...c,
|
|
47
|
+
className: y,
|
|
48
|
+
style: {
|
|
49
|
+
height: e.rowHeight ? e.rowHeight + "px" : "",
|
|
50
|
+
visibility: e.isHidden ? "hidden" : "",
|
|
51
|
+
userSelect: (R = r == null ? void 0 : r.current) == null ? void 0 : R.style.userSelect
|
|
60
52
|
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
role: "row",
|
|
54
|
+
"aria-rowindex": e.ariaRowIndex,
|
|
55
|
+
"absolute-row-index": e.absoluteRowIndex,
|
|
56
|
+
[k]: e.rowType === "data" ? e.dataIndex : void 0
|
|
57
|
+
}, u = e.rowType || "data", d = e.rows;
|
|
58
|
+
if (d && d[u]) {
|
|
59
|
+
const t = d[u];
|
|
60
|
+
return /* @__PURE__ */ n.createElement(t, { key: e.absoluteRowIndex, ...e, trProps: s }, e.children);
|
|
61
|
+
}
|
|
62
|
+
const w = /* @__PURE__ */ n.createElement("tr", { key: e.absoluteRowIndex, ...s }, e.children);
|
|
63
|
+
return e.render ? e.render.call(void 0, w, { ...e, ...c }) : w;
|
|
64
64
|
};
|
|
65
65
|
export {
|
|
66
|
-
|
|
66
|
+
N as GridRow
|
|
67
67
|
};
|