@progress/kendo-react-grid 14.2.2-develop.1 → 14.3.0-develop.1

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.
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { DataRowContext } from '../getRowContents.js';
9
+ import { GridStackedLayoutSettings } from '../interfaces/GridStackedLayoutSettings.js';
10
+ import * as React from 'react';
11
+ /**
12
+ * Represents the StickyGroupTable handle.
13
+ *
14
+ * @hidden
15
+ */
16
+ export interface StickyTableHandle {
17
+ /**
18
+ * Sets the width of the sticky table element.
19
+ */
20
+ setWidth: (width: number) => void;
21
+ /**
22
+ * Sets the horizontal scroll position of the sticky container.
23
+ */
24
+ setScrollLeft: (scrollLeft: number) => void;
25
+ }
26
+ /**
27
+ * @hidden
28
+ */
29
+ export interface StickyGroupTableProps {
30
+ size?: string;
31
+ colGroups?: React.ReactElement;
32
+ dataRowContext: DataRowContext;
33
+ position: 'top' | 'bottom';
34
+ isStackedMode?: boolean;
35
+ groupLevelCount?: number;
36
+ stackedLayoutSettings?: GridStackedLayoutSettings;
37
+ rowHeight?: number;
38
+ }
39
+ /**
40
+ * @hidden
41
+ */
42
+ export declare const StickyGroupTable: React.FC<StickyGroupTableProps>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react"),l=require("@progress/kendo-react-common"),h=require("../utils/GridContext.js"),j=require("../rows/GridRowRenderer.js"),q=require("../getRowContents.js");function x(o){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:()=>o[e]})}}return n.default=o,Object.freeze(n)}const r=x(O),z=({size:o,colGroups:n,dataRowContext:e,position:i,isStackedMode:k,groupLevelCount:g,stackedLayoutSettings:I,rowHeight:C})=>{const u=l.useUnstyled(),f=u!=null&&u.uGrid?u.uGrid:l.uGrid,t=r.useContext(h.GridContext),c=i==="top",d=c?t.stickyHeaderRef:t.stickyFooterRef,b=(c?t.stickyHeaderItems:t.stickyFooterItems)||[],G=b.length>0,w=l.classNames(f.stickyContainer({bottom:!c})),S=l.classNames(f.table({size:o})),m=r.useRef(null),N=c?t.stickyHeaderTableRef:t.stickyFooterTableRef;r.useImperativeHandle(N,()=>({setWidth:s=>{m.current&&(m.current.style.width=s?s+"px":"")},setScrollLeft:s=>{d.current&&d.current.scrollLeft!==s&&(d.current.scrollLeft=s)}}));const T=r.useCallback(s=>{var a;(a=t.columnResizeRef)!=null&&a.current&&(c?t.columnResizeRef.current.colGroupStickyHeader=s:t.columnResizeRef.current.colGroupStickyFooter=s)},[t.columnResizeRef,c]),E=n?r.cloneElement(n,{colGroupRef:T}):null,v=()=>b.map((s,a)=>{const{item:y,flatIndex:p}=s,R=e.dataItemKey&&l.getter(e.dataItemKey)(y.dataItem)||"ai"+p,H=q.getRowContents(e,y,R,a,!1);return r.createElement(j.GridRowRenderer,{key:R,isStackedMode:!!k,item:y,rowId:R,dataIndex:-1,ariaRowIndex:a,absoluteRowIndex:p,isAltRow:!1,isHidden:!1,isRowReorderable:!1,rowHeight:C,rows:void 0,leafColumns:e.leafColumns,groupLevelCount:g||0,stackedLayoutSettings:I,cells:e.cells,isSelected:!1,isInEdit:!1,preparedCells:H.row,showDetailToggle:!1,isDetailExpanded:!1})});return r.createElement("div",{ref:d,className:w,style:{display:G?"":"none"}},r.createElement("table",{ref:m,className:S},E,r.createElement("tbody",{className:l.classNames(f.tbody({}))},v())))};exports.StickyGroupTable=z;
@@ -0,0 +1,82 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use client";
9
+ import * as s from "react";
10
+ import { useUnstyled as T, uGrid as v, classNames as f, getter as z } from "@progress/kendo-react-common";
11
+ import { GridContext as F } from "../utils/GridContext.mjs";
12
+ import { GridRowRenderer as K } from "../rows/GridRowRenderer.mjs";
13
+ import { getRowContents as L } from "../getRowContents.mjs";
14
+ const j = ({
15
+ size: p,
16
+ colGroups: u,
17
+ dataRowContext: o,
18
+ position: k,
19
+ isStackedMode: I,
20
+ groupLevelCount: b,
21
+ stackedLayoutSettings: C,
22
+ rowHeight: g
23
+ }) => {
24
+ const n = T(), c = n != null && n.uGrid ? n.uGrid : v, e = s.useContext(F), r = k === "top", a = r ? e.stickyHeaderRef : e.stickyFooterRef, R = (r ? e.stickyHeaderItems : e.stickyFooterItems) || [], G = R.length > 0, w = f(c.stickyContainer({ bottom: !r })), E = f(c.table({ size: p })), i = s.useRef(null), H = r ? e.stickyHeaderTableRef : e.stickyFooterTableRef;
25
+ s.useImperativeHandle(H, () => ({
26
+ setWidth: (t) => {
27
+ i.current && (i.current.style.width = t ? t + "px" : "");
28
+ },
29
+ setScrollLeft: (t) => {
30
+ a.current && a.current.scrollLeft !== t && (a.current.scrollLeft = t);
31
+ }
32
+ }));
33
+ const N = s.useCallback(
34
+ (t) => {
35
+ var l;
36
+ (l = e.columnResizeRef) != null && l.current && (r ? e.columnResizeRef.current.colGroupStickyHeader = t : e.columnResizeRef.current.colGroupStickyFooter = t);
37
+ },
38
+ [e.columnResizeRef, r]
39
+ ), S = u ? s.cloneElement(u, { colGroupRef: N }) : null, h = () => R.map((t, l) => {
40
+ const { item: d, flatIndex: y } = t, m = o.dataItemKey && z(o.dataItemKey)(d.dataItem) || "ai" + y, x = L(o, d, m, l, !1);
41
+ return /* @__PURE__ */ s.createElement(
42
+ K,
43
+ {
44
+ key: m,
45
+ isStackedMode: !!I,
46
+ item: d,
47
+ rowId: m,
48
+ dataIndex: -1,
49
+ ariaRowIndex: l,
50
+ absoluteRowIndex: y,
51
+ isAltRow: !1,
52
+ isHidden: !1,
53
+ isRowReorderable: !1,
54
+ rowHeight: g,
55
+ rows: void 0,
56
+ leafColumns: o.leafColumns,
57
+ groupLevelCount: b || 0,
58
+ stackedLayoutSettings: C,
59
+ cells: o.cells,
60
+ isSelected: !1,
61
+ isInEdit: !1,
62
+ preparedCells: x.row,
63
+ showDetailToggle: !1,
64
+ isDetailExpanded: !1
65
+ }
66
+ );
67
+ });
68
+ return /* @__PURE__ */ s.createElement(
69
+ "div",
70
+ {
71
+ ref: a,
72
+ className: w,
73
+ style: {
74
+ display: G ? "" : "none"
75
+ }
76
+ },
77
+ /* @__PURE__ */ s.createElement("table", { ref: i, className: E }, S, /* @__PURE__ */ s.createElement("tbody", { className: f(c.tbody({})) }, h()))
78
+ );
79
+ };
80
+ export {
81
+ j as StickyGroupTable
82
+ };
@@ -6,4 +6,4 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),i=require("../../utils/GridContext.js");function u(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const o=u(c),l=e=>{const t=o.useContext(i.GridContext);return o.createElement("colgroup",{ref:r=>{t.columnResizeRef.current.colGroupMain=r,t.columnResizeRef.current.initWidths()}},e.children)};exports.GridColGroup=l;
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),i=require("../../utils/GridContext.js");function u(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const o=u(c),l=t=>{const r=o.useContext(i.GridContext),e=t.colGroupRef;return o.createElement("colgroup",{ref:n=>{e?typeof e=="function"?e(n):e.current=n:(r.columnResizeRef.current.colGroupMain=n,r.columnResizeRef.current.initWidths())}},t.children)};exports.GridColGroup=l;
@@ -6,20 +6,20 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as r from "react";
10
- import { GridContext as n } from "../../utils/GridContext.mjs";
11
- const c = (t) => {
12
- const e = r.useContext(n);
13
- return /* @__PURE__ */ r.createElement(
9
+ import * as n from "react";
10
+ import { GridContext as i } from "../../utils/GridContext.mjs";
11
+ const u = (r) => {
12
+ const o = n.useContext(i), e = r.colGroupRef;
13
+ return /* @__PURE__ */ n.createElement(
14
14
  "colgroup",
15
15
  {
16
- ref: (o) => {
17
- e.columnResizeRef.current.colGroupMain = o, e.columnResizeRef.current.initWidths();
16
+ ref: (t) => {
17
+ e ? typeof e == "function" ? e(t) : e.current = t : (o.columnResizeRef.current.colGroupMain = t, o.columnResizeRef.current.initWidths());
18
18
  }
19
19
  },
20
- t.children
20
+ r.children
21
21
  );
22
22
  };
23
23
  export {
24
- c as GridColGroup
24
+ u as GridColGroup
25
25
  };