@progress/kendo-react-grid 15.2.0-develop.7 → 15.2.0-develop.8
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/GridClientWrapper.d.ts +1 -0
- package/GridClientWrapper.js +1 -1
- package/GridClientWrapper.mjs +478 -450
- package/GridColumn.d.ts +18 -1
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +509 -433
- package/cells/groupcell/GridGroupCell.js +1 -1
- package/cells/groupcell/GridGroupCell.mjs +60 -10
- package/cells/groupcell/GridGroupCellServer.js +1 -1
- package/cells/groupcell/GridGroupCellServer.mjs +31 -18
- package/cells/groupcell/utils.d.ts +19 -4
- package/cells/groupcell/utils.js +1 -1
- package/cells/groupcell/utils.mjs +255 -33
- package/cells/selectioncell/GridSelectionCellInput.d.ts +1 -0
- package/cells/selectioncell/GridSelectionCellInput.js +1 -1
- package/cells/selectioncell/GridSelectionCellInput.mjs +19 -14
- package/components/StickyGroupTable.d.ts +2 -0
- package/components/StickyGroupTable.js +1 -1
- package/components/StickyGroupTable.mjs +29 -27
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/GroupingIndicator.d.ts +1 -0
- package/drag/GroupingIndicator.js +1 -1
- package/drag/GroupingIndicator.mjs +33 -30
- package/getRowContents.d.ts +5 -0
- package/getRowContents.js +1 -1
- package/getRowContents.mjs +77 -67
- package/header/GridHeaderCell.js +1 -1
- package/header/GridHeaderCell.mjs +17 -8
- package/header/GroupPanel.d.ts +3 -0
- package/header/GroupPanel.js +1 -1
- package/header/GroupPanel.mjs +35 -33
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +48 -47
- package/index.d.mts +4 -2
- package/index.d.ts +4 -2
- package/interfaces/GridCellProps.d.ts +21 -0
- package/interfaces/GridCellsSettings.d.ts +60 -0
- package/interfaces/GridGroupColumnSettings.d.ts +170 -0
- package/interfaces/GridGroupableSettings.d.ts +66 -0
- package/interfaces/GridHeaderCellProps.d.ts +4 -0
- package/messages/index.d.ts +5 -0
- package/messages/index.js +2 -2
- package/messages/index.mjs +149 -147
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +17 -17
- package/rows/GridRowRenderer.d.ts +2 -0
- package/rows/GridRowRenderer.js +1 -1
- package/rows/GridRowRenderer.mjs +21 -19
- package/stacked/StackedModeRow.d.ts +2 -0
- package/stacked/StackedModeRow.js +1 -1
- package/stacked/StackedModeRow.mjs +97 -85
- package/utils/index.d.ts +7 -1
- package/utils/index.js +1 -1
- package/utils/index.mjs +67 -62
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),l=require("@progress/kendo-react-common"),q=require("../utils/GridContext.js"),v=require("../rows/GridRowRenderer.js"),z=require("../getRowContents.js");function M(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=M(j),x=({size:o,colGroups:n,dataRowContext:e,position:i,isStackedMode:g,groupLevelCount:k,stackedLayoutSettings:I,rowHeight:C,rows:G})=>{const u=l.useUnstyled(),f=u!=null&&u.uGrid?u.uGrid:l.uGrid,t=r.useContext(q.GridContext),c=i==="top",d=c?t.stickyHeaderRef:t.stickyFooterRef,p=(c?t.stickyHeaderItems:t.stickyFooterItems)||[],S=p.length>0,w=l.classNames(f.stickyContainer({bottom:!c})),N=l.classNames(f.table({size:o})),m=r.useRef(null),T=c?t.stickyHeaderTableRef:t.stickyFooterTableRef;r.useImperativeHandle(T,()=>({setWidth:s=>{m.current&&(m.current.style.width=s?s+"px":"")},setScrollLeft:s=>{d.current&&d.current.scrollLeft!==s&&(d.current.scrollLeft=s)}}));const E=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]),H=n?r.cloneElement(n,{colGroupRef:E}):null,O=()=>p.map((s,a)=>{const{item:y,flatIndex:b}=s,R=e.dataItemKey&&l.getter(e.dataItemKey)(y.dataItem)||"ai"+b,h=z.getRowContents(e,{},y,R,a,!1);return r.createElement(v.GridRowRenderer,{key:R,isStackedMode:!!g,item:y,rowId:R,dataIndex:-1,ariaRowIndex:a,absoluteRowIndex:b,isAltRow:!1,isHidden:!1,isRowReorderable:!1,rowHeight:C,rows:G,leafColumns:e.leafColumns,groupLevelCount:k||0,groupingMode:e.groupingMode,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:S?"":"none"}},r.createElement("table",{ref:m,className:N},H,r.createElement("tbody",{className:l.classNames(f.tbody({}))},O())))};exports.StickyGroupTable=x;
|
|
@@ -7,39 +7,40 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as s from "react";
|
|
10
|
-
import { useUnstyled as
|
|
11
|
-
import { GridContext as
|
|
12
|
-
import { GridRowRenderer as
|
|
13
|
-
import { getRowContents as
|
|
14
|
-
const
|
|
10
|
+
import { useUnstyled as z, uGrid as F, classNames as f, getter as K } from "@progress/kendo-react-common";
|
|
11
|
+
import { GridContext as v } from "../utils/GridContext.mjs";
|
|
12
|
+
import { GridRowRenderer as L } from "../rows/GridRowRenderer.mjs";
|
|
13
|
+
import { getRowContents as M } from "../getRowContents.mjs";
|
|
14
|
+
const q = ({
|
|
15
15
|
size: p,
|
|
16
16
|
colGroups: u,
|
|
17
|
-
dataRowContext:
|
|
17
|
+
dataRowContext: r,
|
|
18
18
|
position: k,
|
|
19
19
|
isStackedMode: I,
|
|
20
20
|
groupLevelCount: b,
|
|
21
|
-
stackedLayoutSettings:
|
|
22
|
-
rowHeight:
|
|
21
|
+
stackedLayoutSettings: g,
|
|
22
|
+
rowHeight: C,
|
|
23
|
+
rows: G
|
|
23
24
|
}) => {
|
|
24
|
-
const n =
|
|
25
|
-
s.useImperativeHandle(
|
|
25
|
+
const n = z(), a = n != null && n.uGrid ? n.uGrid : F, e = s.useContext(v), o = k === "top", c = o ? e.stickyHeaderRef : e.stickyFooterRef, y = (o ? e.stickyHeaderItems : e.stickyFooterItems) || [], E = y.length > 0, w = f(a.stickyContainer({ bottom: !o })), H = f(a.table({ size: p })), i = s.useRef(null), N = o ? e.stickyHeaderTableRef : e.stickyFooterTableRef;
|
|
26
|
+
s.useImperativeHandle(N, () => ({
|
|
26
27
|
setWidth: (t) => {
|
|
27
28
|
i.current && (i.current.style.width = t ? t + "px" : "");
|
|
28
29
|
},
|
|
29
30
|
setScrollLeft: (t) => {
|
|
30
|
-
|
|
31
|
+
c.current && c.current.scrollLeft !== t && (c.current.scrollLeft = t);
|
|
31
32
|
}
|
|
32
33
|
}));
|
|
33
|
-
const
|
|
34
|
+
const S = s.useCallback(
|
|
34
35
|
(t) => {
|
|
35
36
|
var l;
|
|
36
|
-
(l = e.columnResizeRef) != null && l.current && (
|
|
37
|
+
(l = e.columnResizeRef) != null && l.current && (o ? e.columnResizeRef.current.colGroupStickyHeader = t : e.columnResizeRef.current.colGroupStickyFooter = t);
|
|
37
38
|
},
|
|
38
|
-
[e.columnResizeRef,
|
|
39
|
-
),
|
|
40
|
-
const { item: d, flatIndex:
|
|
39
|
+
[e.columnResizeRef, o]
|
|
40
|
+
), h = u ? s.cloneElement(u, { colGroupRef: S }) : null, T = () => y.map((t, l) => {
|
|
41
|
+
const { item: d, flatIndex: R } = t, m = r.dataItemKey && K(r.dataItemKey)(d.dataItem) || "ai" + R, x = M(r, {}, d, m, l, !1);
|
|
41
42
|
return /* @__PURE__ */ s.createElement(
|
|
42
|
-
|
|
43
|
+
L,
|
|
43
44
|
{
|
|
44
45
|
key: m,
|
|
45
46
|
isStackedMode: !!I,
|
|
@@ -47,16 +48,17 @@ const j = ({
|
|
|
47
48
|
rowId: m,
|
|
48
49
|
dataIndex: -1,
|
|
49
50
|
ariaRowIndex: l,
|
|
50
|
-
absoluteRowIndex:
|
|
51
|
+
absoluteRowIndex: R,
|
|
51
52
|
isAltRow: !1,
|
|
52
53
|
isHidden: !1,
|
|
53
54
|
isRowReorderable: !1,
|
|
54
|
-
rowHeight:
|
|
55
|
-
rows:
|
|
56
|
-
leafColumns:
|
|
55
|
+
rowHeight: C,
|
|
56
|
+
rows: G,
|
|
57
|
+
leafColumns: r.leafColumns,
|
|
57
58
|
groupLevelCount: b || 0,
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
groupingMode: r.groupingMode,
|
|
60
|
+
stackedLayoutSettings: g,
|
|
61
|
+
cells: r.cells,
|
|
60
62
|
isSelected: !1,
|
|
61
63
|
isInEdit: !1,
|
|
62
64
|
preparedCells: x.row,
|
|
@@ -68,15 +70,15 @@ const j = ({
|
|
|
68
70
|
return /* @__PURE__ */ s.createElement(
|
|
69
71
|
"div",
|
|
70
72
|
{
|
|
71
|
-
ref:
|
|
73
|
+
ref: c,
|
|
72
74
|
className: w,
|
|
73
75
|
style: {
|
|
74
|
-
display:
|
|
76
|
+
display: E ? "" : "none"
|
|
75
77
|
}
|
|
76
78
|
},
|
|
77
|
-
/* @__PURE__ */ s.createElement("table", { ref: i, className:
|
|
79
|
+
/* @__PURE__ */ s.createElement("table", { ref: i, className: H }, h, /* @__PURE__ */ s.createElement("tbody", { className: f(a.tbody({})) }, T()))
|
|
78
80
|
);
|
|
79
81
|
};
|
|
80
82
|
export {
|
|
81
|
-
|
|
83
|
+
q as StickyGroupTable
|
|
82
84
|
};
|