@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/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
  *
@@ -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: 1738828684,version:"9.4.0-develop.17",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
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;
@@ -10,8 +10,8 @@ const e = {
10
10
  productName: "KendoReact",
11
11
  productCode: "KENDOUIREACT",
12
12
  productCodes: ["KENDOUIREACT"],
13
- publishDate: 1738828684,
14
- version: "9.4.0-develop.17",
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.17",
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.17",
32
- "@progress/kendo-react-buttons": "9.4.0-develop.17",
33
- "@progress/kendo-react-common": "9.4.0-develop.17",
34
- "@progress/kendo-react-data-tools": "9.4.0-develop.17",
35
- "@progress/kendo-react-dateinputs": "9.4.0-develop.17",
36
- "@progress/kendo-react-indicators": "9.4.0-develop.17",
37
- "@progress/kendo-react-dropdowns": "9.4.0-develop.17",
38
- "@progress/kendo-react-inputs": "9.4.0-develop.17",
39
- "@progress/kendo-react-intl": "9.4.0-develop.17",
40
- "@progress/kendo-react-popup": "9.4.0-develop.17",
41
- "@progress/kendo-react-layout": "9.4.0-develop.17",
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": 1738828684,
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"),C=require("../constants/index.js"),k=require("../GridClientWrapper.js");function O(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const t=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,t.get?t:{enumerable:!0,get:()=>e[o]})}}return r.default=e,Object.freeze(r)}const d=O(v),T=e=>{var g;const r=d.useContext(k.GridContext),{reorderRowDropTargetRef:o,reorderRowDragTargetRef:t,activeDragRowDataItemRef:R}=r,{rowType:i,isAltRow:w,isInEdit:f,isSelected:b}=e,c=a.useUnstyled(),D=c&&c.uGrid?c.uGrid:a.uGrid,m=a.classNames(D.tr({selected:b,isHeader:i==="groupHeader",isFooter:i==="groupFooter",isMaster:i!=="groupHeader"&&i!=="groupFooter",isAltRow:w,isInEdit:f})),l=d.useRef(null),y=n=>{if(e.isRowReorderable&&R.current){const x=n.originalEvent.target;o.current=x.closest(".k-table-row")}},I=()=>{t.current&&e.isRowReorderable&&(t.current.style.userSelect="")};a.useDroppable(l,{onDragOver:y,onDrop:I});const s={onClick:n=>r.rowClick(n,e.dataItem),onDoubleClick:n=>r.rowDblClick(n,e.dataItem)},u=d.createElement("tr",{ref:l,id:e.id,...s,className:m,style:{height:e.rowHeight?e.rowHeight+"px":"",visibility:e.isHidden?"hidden":"",userSelect:(g=t==null?void 0:t.current)==null?void 0:g.style.userSelect},role:"row","aria-rowindex":e.ariaRowIndex,"absolute-row-index":e.absoluteRowIndex,key:e.absoluteRowIndex,[C.GRID_ROW_INDEX_ATTRIBUTE]:e.rowType==="data"?e.dataIndex:void 0},e.children);return e.render?e.render.call(void 0,u,{...e,...s}):u};exports.GridRow=T;
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 x, uGrid as b, classNames as h, useDroppable as v } from "@progress/kendo-react-common";
11
- import { GRID_ROW_INDEX_ATTRIBUTE as y } from "../constants/index.mjs";
12
- import { GridContext as C } from "../GridClientWrapper.mjs";
13
- const O = (e) => {
14
- var s;
15
- const a = n.useContext(C), {
16
- reorderRowDropTargetRef: u,
17
- reorderRowDragTargetRef: t,
18
- activeDragRowDataItemRef: R
19
- } = a, { rowType: o, isAltRow: w, isInEdit: g, isSelected: D } = e, i = x(), m = i && i.uGrid ? i.uGrid : b, f = h(
20
- m.tr({
21
- selected: D,
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: w,
26
- isInEdit: g
25
+ isAltRow: D,
26
+ isInEdit: f
27
27
  })
28
- ), d = n.useRef(null);
29
- v(d, {
30
- onDragOver: (r) => {
31
- if (e.isRowReorderable && R.current) {
32
- const I = r.originalEvent.target;
33
- u.current = I.closest(".k-table-row");
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
- t.current && e.isRowReorderable && (t.current.style.userSelect = "");
37
+ r.current && e.isRowReorderable && (r.current.style.userSelect = "");
38
38
  }
39
39
  });
40
- const l = {
41
- onClick: (r) => a.rowClick(r, e.dataItem),
42
- onDoubleClick: (r) => a.rowDblClick(r, e.dataItem)
43
- }, c = /* @__PURE__ */ n.createElement(
44
- "tr",
45
- {
46
- ref: d,
47
- id: e.id,
48
- ...l,
49
- className: f,
50
- style: {
51
- height: e.rowHeight ? e.rowHeight + "px" : "",
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
- e.children
62
- );
63
- return e.render ? e.render.call(void 0, c, { ...e, ...l }) : c;
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
- O as GridRow
66
+ N as GridRow
67
67
  };