@progress/kendo-react-grid 14.2.2-develop.1 → 14.3.0-develop.2
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.js +1 -1
- package/GridClientWrapper.mjs +625 -555
- package/GridComponent.js +1 -1
- package/GridComponent.mjs +419 -433
- package/components/StickyGroupTable.d.ts +42 -0
- package/components/StickyGroupTable.js +9 -0
- package/components/StickyGroupTable.mjs +82 -0
- package/components/colGroup/GridColGroup.js +1 -1
- package/components/colGroup/GridColGroup.mjs +9 -9
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/ColumnResize.d.ts +8 -0
- package/drag/ColumnResize.js +1 -1
- package/drag/ColumnResize.mjs +125 -108
- package/getRowContents.d.ts +58 -0
- package/getRowContents.js +8 -0
- package/getRowContents.mjs +100 -0
- package/{toolbar-tools/smartbox/SegmentedControl.d.ts → header/GridHeaderGroupSpacerCell.d.ts} +2 -2
- package/header/GridHeaderGroupSpacerCell.js +9 -0
- package/header/GridHeaderGroupSpacerCell.mjs +23 -0
- package/hooks/useStickyGroups.d.ts +71 -0
- package/hooks/useStickyGroups.js +9 -0
- package/hooks/useStickyGroups.mjs +350 -0
- package/index.js +1 -1
- package/index.mjs +8 -10
- package/interfaces/GridGroupableSettings.d.ts +23 -0
- package/messages/index.d.ts +5 -0
- package/messages/index.js +2 -2
- package/messages/index.mjs +28 -26
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +1 -1
- package/package.json +17 -17
- package/stacked/StackedModeComponents.d.ts +1 -0
- package/stacked/StackedModeComponents.js +1 -1
- package/stacked/StackedModeComponents.mjs +14 -14
- package/toolbar-tools/smartbox/SmartBox.js +1 -1
- package/toolbar-tools/smartbox/SmartBox.mjs +102 -94
- package/toolbar-tools/smartbox/hooks/useSmartBoxSegmentedControl.d.ts +12 -3
- package/toolbar-tools/smartbox/hooks/useSmartBoxSegmentedControl.js +1 -1
- package/toolbar-tools/smartbox/hooks/useSmartBoxSegmentedControl.mjs +42 -41
- package/toolbar-tools/smartbox/index.d.ts +0 -1
- package/toolbar-tools/smartbox/interfaces/index.d.ts +0 -1
- package/toolbar-tools/smartbox/SegmentedControl.js +0 -8
- package/toolbar-tools/smartbox/SegmentedControl.mjs +0 -109
- package/toolbar-tools/smartbox/interfaces/SegmentedControlTypes.d.ts +0 -66
|
@@ -0,0 +1,71 @@
|
|
|
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 { RowHeightService } from '@progress/kendo-react-common';
|
|
9
|
+
import { GroupState } from '@progress/kendo-react-data-tools';
|
|
10
|
+
import { DataItemWrapper } from '../utils/index.js';
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
* Represents the range of a group within the flat data array.
|
|
15
|
+
*/
|
|
16
|
+
export interface GroupRange {
|
|
17
|
+
headerIndex: number;
|
|
18
|
+
footerIndex: number | null;
|
|
19
|
+
firstChildIndex: number;
|
|
20
|
+
lastChildIndex: number;
|
|
21
|
+
level: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @hidden
|
|
25
|
+
* Builds a map of group ranges from the flat data array.
|
|
26
|
+
* Each group header maps to its footer and child range.
|
|
27
|
+
*/
|
|
28
|
+
export declare function buildGroupRangeMap(flatDataArray: DataItemWrapper[]): Map<number, GroupRange>;
|
|
29
|
+
/**
|
|
30
|
+
* @hidden
|
|
31
|
+
* Pairs a DataItemWrapper with its flat-data index.
|
|
32
|
+
*/
|
|
33
|
+
export interface StickyGroupItem {
|
|
34
|
+
item: DataItemWrapper;
|
|
35
|
+
flatIndex: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @hidden
|
|
39
|
+
*/
|
|
40
|
+
export declare function computeStickyItems(flatDataArray: DataItemWrapper[], groupRanges: Map<number, GroupRange>, firstVisibleIndex: number, lastVisibleIndex: number, rawFirstVisibleIndex?: number): StickyGroupItem[];
|
|
41
|
+
/**
|
|
42
|
+
* @hidden
|
|
43
|
+
* Computes which group footers should be sticky at the bottom of the viewport.
|
|
44
|
+
* A footer is sticky when it is scrolled below the viewport but its group's
|
|
45
|
+
* header (or first child) is still visible above.
|
|
46
|
+
*/
|
|
47
|
+
export declare function computeStickyFooterItems(flatDataArray: DataItemWrapper[], groupRanges: Map<number, GroupRange>, firstVisibleIndex: number, lastVisibleIndex: number): StickyGroupItem[];
|
|
48
|
+
/**
|
|
49
|
+
* @hidden
|
|
50
|
+
* Hook that computes which group header/footer should be sticky
|
|
51
|
+
* based on the scroll position and the flat data array.
|
|
52
|
+
* Uses refs + direct DOM manipulation to avoid render-cycle flicker.
|
|
53
|
+
*/
|
|
54
|
+
export declare function useStickyGroups(options: {
|
|
55
|
+
enabled: boolean;
|
|
56
|
+
enabledFooters?: boolean;
|
|
57
|
+
flatData: DataItemWrapper[];
|
|
58
|
+
containerRef: React.RefObject<HTMLDivElement | null>;
|
|
59
|
+
tableBodyRef: React.RefObject<HTMLTableSectionElement | null>;
|
|
60
|
+
rowHeight?: number;
|
|
61
|
+
isGrouped: boolean;
|
|
62
|
+
virtualSkipRef?: React.RefObject<number>;
|
|
63
|
+
rowHeightServiceRef?: React.RefObject<RowHeightService | undefined>;
|
|
64
|
+
}): {
|
|
65
|
+
stickyHeaderItems: StickyGroupItem[];
|
|
66
|
+
stickyHeaderRef: React.RefObject<HTMLDivElement | null>;
|
|
67
|
+
stickyFooterItems: StickyGroupItem[];
|
|
68
|
+
stickyFooterRef: React.RefObject<HTMLDivElement | null>;
|
|
69
|
+
scrollToStickyGroup: (group: GroupState) => void;
|
|
70
|
+
update: () => void;
|
|
71
|
+
};
|
|
@@ -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 Ce=require("react");function Fe(f){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(f){for(const r in f)if(r!=="default"){const h=Object.getOwnPropertyDescriptor(f,r);Object.defineProperty(a,r,h.get?h:{enumerable:!0,get:()=>f[r]})}}return a.default=f,Object.freeze(a)}const x=Fe(Ce);function ve(f){const a=[],r=[];for(let e=0;e<f.length;e++){const u=f[e];if(u.rowType==="groupHeader"){for(let n=r.length-1;n>=0;n--)if(r[n].level>=u.level){const s=r[n];a.push({headerIndex:s.headerIndex,footerIndex:null,firstChildIndex:s.headerIndex+1,lastChildIndex:e-1,level:s.level}),r.splice(n,1)}r.push({headerIndex:e,level:u.level})}else if(u.rowType==="groupFooter"){for(let n=r.length-1;n>=0;n--)if(r[n].level===u.level){const s=r[n];a.push({headerIndex:s.headerIndex,footerIndex:e,firstChildIndex:s.headerIndex+1,lastChildIndex:e-1,level:u.level}),r.splice(n,1);break}}}for(const e of r)a.push({headerIndex:e.headerIndex,footerIndex:null,firstChildIndex:e.headerIndex+1,lastChildIndex:f.length-1,level:e.level});const h=new Map;for(const e of a)h.set(e.headerIndex,e);return h}function Re(f,a,r,h,e){var y;const u=[],n=e!=null?e:r,s=[];for(const d of a.values())if(d.headerIndex<r){const p=(y=d.footerIndex)!=null?y:d.lastChildIndex;p>d.headerIndex&&p>=n&&s.push(d)}const t=new Map;for(const d of s){const p=t.get(d.level);(!p||d.headerIndex>p.headerIndex)&&t.set(d.level,d)}const c=Array.from(t.keys()).sort((d,p)=>d-p);for(const d of c){const p=t.get(d);u.push({item:f[p.headerIndex],flatIndex:p.headerIndex})}return u}function ke(f,a,r,h){const e=[],u=[];for(const t of a.values())t.footerIndex!==null&&t.footerIndex>h&&t.headerIndex<=h&&u.push(t);const n=new Map;for(const t of u){const c=n.get(t.level);(!c||t.footerIndex<c.footerIndex)&&n.set(t.level,t)}const s=Array.from(n.keys()).sort((t,c)=>c-t);for(const t of s){const c=n.get(t);e.push({item:f[c.footerIndex],flatIndex:c.footerIndex})}return e}function W(f,a){if(f.length!==a.length)return!0;for(let r=0;r<f.length;r++)if(f[r].flatIndex!==a[r].flatIndex)return!0;return!1}function be(f,a){const r=f.querySelectorAll("tbody > tr");let h=0,e=!1;for(let u=0;u<r.length&&u<a.length;u++){const n=r[u],s=n.offsetHeight||n.getBoundingClientRect().height,t=a[u];if(t<0){e=!0;const c=-t,y=Math.max(s-c,0);h+=y,y<=0?(n.style.display="none",n.style.transform="",n.style.clipPath=""):(n.style.display="",n.style.transform=`translateY(${t}px)`,n.style.clipPath=`inset(${c}px 0 0 0)`)}else h+=s,n.style.display="",n.style.transform="",n.style.clipPath=""}f.style.height=e?h+"px":""}function He(f,a){const r=f.querySelectorAll("tbody > tr");let h=0,e=!1,u=0;const n=[];for(let s=0;s<r.length&&s<a.length;s++){const t=r[s],c=t.offsetHeight||t.getBoundingClientRect().height;n.push(c);const y=a[s];if(y>0){e=!0;const d=Math.max(c-y,0);h+=d,u+=c-d}else h+=c}for(let s=0;s<r.length&&s<a.length;s++){const t=r[s],c=a[s],y=n[s];c>0?Math.max(y-c,0)<=0?(t.style.display="",t.style.transform="",t.style.clipPath="inset(0 0 100% 0)"):(t.style.display="",t.style.transform="",t.style.clipPath=`inset(0 0 ${c}px 0)`):(t.style.display="",t.style.transform=e?`translateY(${-u}px)`:"",t.style.clipPath="")}f.style.height=e?h+"px":""}function Me(f){const{enabled:a,enabledFooters:r,flatData:h,containerRef:e,tableBodyRef:u,isGrouped:n,virtualSkipRef:s,rowHeight:t,rowHeightServiceRef:c}=f,y=a&&n,d=!!r&&n,p=x.useRef([]),X=x.useRef([]),v=x.useRef(null),[re,le]=x.useState([]),J=x.useRef([]),Z=x.useRef([]),R=x.useRef(null),[ce,ie]=x.useState([]),ee=x.useRef(!1),te=x.useRef(!1);x.useLayoutEffect(()=>{ee.current&&v.current&&X.current.length>0&&(be(v.current,X.current),ee.current=!1),v.current&&e.current&&(v.current.scrollLeft=e.current.scrollLeft)},[re]),x.useLayoutEffect(()=>{te.current&&R.current&&Z.current.length>0&&(He(R.current,Z.current),te.current=!1),R.current&&e.current&&(R.current.scrollLeft=e.current.scrollLeft)},[ce]);const fe=x.useRef(()=>{});fe.current=()=>{var me,xe;if(!y&&!d)return;const H=h,P=ve(H);if(P.size===0)return;const A=new Map;if(d)for(const o of P.values())o.footerIndex!==null&&A.set(o.footerIndex,o);const C=e.current,j=u.current;if(!C||!j)return;const k=C.scrollTop,q=C.clientHeight,$=j.children;if($.length===0)return;const F=c==null?void 0:c.current,K=t||36,g=(s==null?void 0:s.current)||0,O=C.getBoundingClientRect(),B=j.getBoundingClientRect().top-O.top+k,w=$.length,E=new Array(w),Q=new Array(w);for(let o=0;o<w;o++){const l=$[o];E[o]=B+l.offsetTop,Q[o]=l.offsetHeight}const ne=o=>{const l=o-g;return l>=0&&l<w?Q[l]:F&&o>=0&&o<H.length?F.height(o):K},ae=o=>{const l=o-g;if(l>=0&&l<w)return E[l];if(F&&o>=0&&o<H.length)return F.offset(o)},Te=o=>{let l=0,i=w;for(;l<i;){const m=l+i>>1;E[m]<o?l=m+1:i=m}return l},ue=o=>{const l=Te(o);return l<w?g+l:g},de=o=>{let l=0,i=w-1;for(;l<=i;){const m=l+i>>1;E[m]+Q[m]<=o?l=m+1:i=m-1}return i>=0?g+i:H.length-1},he=Math.min(ue(k),H.length-1);let _=he;const ge=o=>{const l=o.querySelectorAll("tbody > tr");for(let i=0;i<l.length;i++){const m=l[i];m.style.transform="",m.style.clipPath="",m.style.display=""}o.style.height=""};if(y&&v.current){let o=0,l=[],i=[];const m=T=>{var b;const M=[];let I=0;for(const S of T){const L=ne(S);let G=0;const V=P.get(S);if(V){const U=(b=V.footerIndex)!=null?b:V.lastChildIndex+1,Y=ae(U);if(Y!==void 0){const N=I+L,Ie=Y-k;Ie<N&&(G=Ie-N)}}M.push(G),I+=Math.max(L+G,0)}return{totalHeight:I,offsets:M}},z=new Set;for(;;){_=Math.min(ue(k+Math.max(o,0)),H.length-1);const T=z.has(_);z.add(_);const M=Math.min(de(k+q),H.length-1),I=Re(H,P,_,M,he),b=m(I.map(L=>L.flatIndex)),S=!W(I,i)&&Math.abs(b.totalHeight-o)<1;if(i=I,o=b.totalHeight,l=b.offsets,S||T)break}const oe=i.length>0,se=p.current,D=W(i,se);oe?D?(p.current=i,X.current=l,ee.current=!0):(v.current.style.display="",be(v.current,l)):(v.current.style.display="none",ge(v.current)),D&&(le(i),p.current=i)}if(d&&R.current){let o=0,l=[],i=[];const m=T=>{const M=[];let I=0;for(let b=T.length-1;b>=0;b--){const S=T[b],L=ne(S);let G=0;const V=A.get(S);if(V){const U=ae(V.headerIndex);if(U!==void 0){const Y=U+ne(V.headerIndex),N=k+q-I-L;Y>N&&(G=Y-N)}}M[b]=G,I+=Math.max(L-G,0)}return{totalHeight:I,offsets:M}},z=new Set;for(;;){const T=Math.min(de(k+q-o),H.length-1),M=z.has(T);z.add(T);const I=ke(H,P,_,T),b=m(I.map(L=>L.flatIndex)),S=!W(I,i)&&Math.abs(b.totalHeight-o)<1;if(i=I,o=b.totalHeight,l=b.offsets,S||M)break}const oe=i.length>0,se=J.current,D=W(i,se);oe?D?(J.current=i,Z.current=l,te.current=!0):(R.current.style.display="",He(R.current,l)):(R.current.style.display="none",ge(R.current)),D&&(ie(i),J.current=i)}const ye=((me=v.current)==null?void 0:me.offsetHeight)||0,pe=((xe=R.current)==null?void 0:xe.offsetHeight)||0;C.style.scrollPaddingTop=ye>0?ye+"px":"",C.style.scrollPaddingBottom=pe>0?pe+"px":""};const Pe=x.useCallback(()=>fe.current(),[]),we=x.useCallback(H=>{var K;if(!y)return;const P=p.current.find(g=>{var O,B;return((O=g.item.group)==null?void 0:O.field)===H.field&&((B=g.item.group)==null?void 0:B.value)===H.value});if(!P)return;const A=e.current;if(!A)return;let C=0;const j=t||36,k=(K=v.current)==null?void 0:K.querySelectorAll("tbody > tr"),q=p.current;for(let g=0;g<q.length;g++)if(q[g].item.level<P.item.level){const O=k&&g<k.length&&k[g].offsetHeight||j;C+=O}const $=c==null?void 0:c.current;let F;if($)F=$.offset(P.flatIndex);else{const g=u.current,O=(s==null?void 0:s.current)||0,B=P.flatIndex-O;if(g&&B>=0&&B<g.children.length){const w=g.children[B],E=A.getBoundingClientRect();F=g.getBoundingClientRect().top-E.top+A.scrollTop+w.offsetTop}}F!==void 0&&(A.scrollTop=F-C)},[y,e,t,c,u,s]);return x.useEffect(()=>{y||(p.current=[],le([])),d||(J.current=[],ie([])),!y&&!d&&e.current&&(e.current.style.scrollPaddingTop="",e.current.style.scrollPaddingBottom="")},[y,d,e]),{stickyHeaderItems:re,stickyHeaderRef:v,stickyFooterItems:ce,stickyFooterRef:R,scrollToStickyGroup:we,update:Pe}}exports.buildGroupRangeMap=ve;exports.computeStickyFooterItems=ke;exports.computeStickyItems=Re;exports.useStickyGroups=Me;
|
|
@@ -0,0 +1,350 @@
|
|
|
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 x from "react";
|
|
10
|
+
function ke(d) {
|
|
11
|
+
const u = [], l = [];
|
|
12
|
+
for (let e = 0; e < d.length; e++) {
|
|
13
|
+
const f = d[e];
|
|
14
|
+
if (f.rowType === "groupHeader") {
|
|
15
|
+
for (let n = l.length - 1; n >= 0; n--)
|
|
16
|
+
if (l[n].level >= f.level) {
|
|
17
|
+
const s = l[n];
|
|
18
|
+
u.push({
|
|
19
|
+
headerIndex: s.headerIndex,
|
|
20
|
+
footerIndex: null,
|
|
21
|
+
firstChildIndex: s.headerIndex + 1,
|
|
22
|
+
lastChildIndex: e - 1,
|
|
23
|
+
level: s.level
|
|
24
|
+
}), l.splice(n, 1);
|
|
25
|
+
}
|
|
26
|
+
l.push({ headerIndex: e, level: f.level });
|
|
27
|
+
} else if (f.rowType === "groupFooter") {
|
|
28
|
+
for (let n = l.length - 1; n >= 0; n--)
|
|
29
|
+
if (l[n].level === f.level) {
|
|
30
|
+
const s = l[n];
|
|
31
|
+
u.push({
|
|
32
|
+
headerIndex: s.headerIndex,
|
|
33
|
+
footerIndex: e,
|
|
34
|
+
firstChildIndex: s.headerIndex + 1,
|
|
35
|
+
lastChildIndex: e - 1,
|
|
36
|
+
level: f.level
|
|
37
|
+
}), l.splice(n, 1);
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
for (const e of l)
|
|
43
|
+
u.push({
|
|
44
|
+
headerIndex: e.headerIndex,
|
|
45
|
+
footerIndex: null,
|
|
46
|
+
firstChildIndex: e.headerIndex + 1,
|
|
47
|
+
lastChildIndex: d.length - 1,
|
|
48
|
+
level: e.level
|
|
49
|
+
});
|
|
50
|
+
const p = /* @__PURE__ */ new Map();
|
|
51
|
+
for (const e of u)
|
|
52
|
+
p.set(e.headerIndex, e);
|
|
53
|
+
return p;
|
|
54
|
+
}
|
|
55
|
+
function Pe(d, u, l, p, e) {
|
|
56
|
+
var g;
|
|
57
|
+
const f = [], n = e != null ? e : l, s = [];
|
|
58
|
+
for (const a of u.values())
|
|
59
|
+
if (a.headerIndex < l) {
|
|
60
|
+
const y = (g = a.footerIndex) != null ? g : a.lastChildIndex;
|
|
61
|
+
y > a.headerIndex && y >= n && s.push(a);
|
|
62
|
+
}
|
|
63
|
+
const t = /* @__PURE__ */ new Map();
|
|
64
|
+
for (const a of s) {
|
|
65
|
+
const y = t.get(a.level);
|
|
66
|
+
(!y || a.headerIndex > y.headerIndex) && t.set(a.level, a);
|
|
67
|
+
}
|
|
68
|
+
const c = Array.from(t.keys()).sort((a, y) => a - y);
|
|
69
|
+
for (const a of c) {
|
|
70
|
+
const y = t.get(a);
|
|
71
|
+
f.push({ item: d[y.headerIndex], flatIndex: y.headerIndex });
|
|
72
|
+
}
|
|
73
|
+
return f;
|
|
74
|
+
}
|
|
75
|
+
function Ce(d, u, l, p) {
|
|
76
|
+
const e = [], f = [];
|
|
77
|
+
for (const t of u.values())
|
|
78
|
+
t.footerIndex !== null && t.footerIndex > p && t.headerIndex <= p && f.push(t);
|
|
79
|
+
const n = /* @__PURE__ */ new Map();
|
|
80
|
+
for (const t of f) {
|
|
81
|
+
const c = n.get(t.level);
|
|
82
|
+
(!c || t.footerIndex < c.footerIndex) && n.set(t.level, t);
|
|
83
|
+
}
|
|
84
|
+
const s = Array.from(n.keys()).sort((t, c) => c - t);
|
|
85
|
+
for (const t of s) {
|
|
86
|
+
const c = n.get(t);
|
|
87
|
+
e.push({ item: d[c.footerIndex], flatIndex: c.footerIndex });
|
|
88
|
+
}
|
|
89
|
+
return e;
|
|
90
|
+
}
|
|
91
|
+
function X(d, u) {
|
|
92
|
+
if (d.length !== u.length)
|
|
93
|
+
return !0;
|
|
94
|
+
for (let l = 0; l < d.length; l++)
|
|
95
|
+
if (d[l].flatIndex !== u[l].flatIndex)
|
|
96
|
+
return !0;
|
|
97
|
+
return !1;
|
|
98
|
+
}
|
|
99
|
+
function He(d, u) {
|
|
100
|
+
const l = d.querySelectorAll("tbody > tr");
|
|
101
|
+
let p = 0, e = !1;
|
|
102
|
+
for (let f = 0; f < l.length && f < u.length; f++) {
|
|
103
|
+
const n = l[f], s = n.offsetHeight || n.getBoundingClientRect().height, t = u[f];
|
|
104
|
+
if (t < 0) {
|
|
105
|
+
e = !0;
|
|
106
|
+
const c = -t, g = Math.max(s - c, 0);
|
|
107
|
+
p += g, g <= 0 ? (n.style.display = "none", n.style.transform = "", n.style.clipPath = "") : (n.style.display = "", n.style.transform = `translateY(${t}px)`, n.style.clipPath = `inset(${c}px 0 0 0)`);
|
|
108
|
+
} else
|
|
109
|
+
p += s, n.style.display = "", n.style.transform = "", n.style.clipPath = "";
|
|
110
|
+
}
|
|
111
|
+
d.style.height = e ? p + "px" : "";
|
|
112
|
+
}
|
|
113
|
+
function be(d, u) {
|
|
114
|
+
const l = d.querySelectorAll("tbody > tr");
|
|
115
|
+
let p = 0, e = !1, f = 0;
|
|
116
|
+
const n = [];
|
|
117
|
+
for (let s = 0; s < l.length && s < u.length; s++) {
|
|
118
|
+
const t = l[s], c = t.offsetHeight || t.getBoundingClientRect().height;
|
|
119
|
+
n.push(c);
|
|
120
|
+
const g = u[s];
|
|
121
|
+
if (g > 0) {
|
|
122
|
+
e = !0;
|
|
123
|
+
const a = Math.max(c - g, 0);
|
|
124
|
+
p += a, f += c - a;
|
|
125
|
+
} else
|
|
126
|
+
p += c;
|
|
127
|
+
}
|
|
128
|
+
for (let s = 0; s < l.length && s < u.length; s++) {
|
|
129
|
+
const t = l[s], c = u[s], g = n[s];
|
|
130
|
+
c > 0 ? Math.max(g - c, 0) <= 0 ? (t.style.display = "", t.style.transform = "", t.style.clipPath = "inset(0 0 100% 0)") : (t.style.display = "", t.style.transform = "", t.style.clipPath = `inset(0 0 ${c}px 0)`) : (t.style.display = "", t.style.transform = e ? `translateY(${-f}px)` : "", t.style.clipPath = "");
|
|
131
|
+
}
|
|
132
|
+
d.style.height = e ? p + "px" : "";
|
|
133
|
+
}
|
|
134
|
+
function Fe(d) {
|
|
135
|
+
const {
|
|
136
|
+
enabled: u,
|
|
137
|
+
enabledFooters: l,
|
|
138
|
+
flatData: p,
|
|
139
|
+
containerRef: e,
|
|
140
|
+
tableBodyRef: f,
|
|
141
|
+
isGrouped: n,
|
|
142
|
+
virtualSkipRef: s,
|
|
143
|
+
rowHeight: t,
|
|
144
|
+
rowHeightServiceRef: c
|
|
145
|
+
} = d, g = u && n, a = !!l && n, y = x.useRef([]), Z = x.useRef([]), v = x.useRef(null), [re, le] = x.useState([]), N = x.useRef([]), _ = x.useRef([]), R = x.useRef(null), [ce, ie] = x.useState([]), ee = x.useRef(!1), te = x.useRef(!1);
|
|
146
|
+
x.useLayoutEffect(() => {
|
|
147
|
+
ee.current && v.current && Z.current.length > 0 && (He(v.current, Z.current), ee.current = !1), v.current && e.current && (v.current.scrollLeft = e.current.scrollLeft);
|
|
148
|
+
}, [re]), x.useLayoutEffect(() => {
|
|
149
|
+
te.current && R.current && _.current.length > 0 && (be(R.current, _.current), te.current = !1), R.current && e.current && (R.current.scrollLeft = e.current.scrollLeft);
|
|
150
|
+
}, [ce]);
|
|
151
|
+
const fe = x.useRef(() => {
|
|
152
|
+
});
|
|
153
|
+
fe.current = () => {
|
|
154
|
+
var me, xe;
|
|
155
|
+
if (!g && !a)
|
|
156
|
+
return;
|
|
157
|
+
const b = p, k = ke(b);
|
|
158
|
+
if (k.size === 0)
|
|
159
|
+
return;
|
|
160
|
+
const O = /* @__PURE__ */ new Map();
|
|
161
|
+
if (a)
|
|
162
|
+
for (const o of k.values())
|
|
163
|
+
o.footerIndex !== null && O.set(o.footerIndex, o);
|
|
164
|
+
const F = e.current, q = f.current;
|
|
165
|
+
if (!F || !q)
|
|
166
|
+
return;
|
|
167
|
+
const w = F.scrollTop, $ = F.clientHeight, E = q.children;
|
|
168
|
+
if (E.length === 0)
|
|
169
|
+
return;
|
|
170
|
+
const T = c == null ? void 0 : c.current, Q = t || 36, h = (s == null ? void 0 : s.current) || 0, B = F.getBoundingClientRect(), A = q.getBoundingClientRect().top - B.top + w, P = E.length, Y = new Array(P), U = new Array(P);
|
|
171
|
+
for (let o = 0; o < P; o++) {
|
|
172
|
+
const r = E[o];
|
|
173
|
+
Y[o] = A + r.offsetTop, U[o] = r.offsetHeight;
|
|
174
|
+
}
|
|
175
|
+
const ne = (o) => {
|
|
176
|
+
const r = o - h;
|
|
177
|
+
return r >= 0 && r < P ? U[r] : T && o >= 0 && o < b.length ? T.height(o) : Q;
|
|
178
|
+
}, ae = (o) => {
|
|
179
|
+
const r = o - h;
|
|
180
|
+
if (r >= 0 && r < P)
|
|
181
|
+
return Y[r];
|
|
182
|
+
if (T && o >= 0 && o < b.length)
|
|
183
|
+
return T.offset(o);
|
|
184
|
+
}, we = (o) => {
|
|
185
|
+
let r = 0, i = P;
|
|
186
|
+
for (; r < i; ) {
|
|
187
|
+
const m = r + i >> 1;
|
|
188
|
+
Y[m] < o ? r = m + 1 : i = m;
|
|
189
|
+
}
|
|
190
|
+
return r;
|
|
191
|
+
}, ue = (o) => {
|
|
192
|
+
const r = we(o);
|
|
193
|
+
return r < P ? h + r : h;
|
|
194
|
+
}, de = (o) => {
|
|
195
|
+
let r = 0, i = P - 1;
|
|
196
|
+
for (; r <= i; ) {
|
|
197
|
+
const m = r + i >> 1;
|
|
198
|
+
Y[m] + U[m] <= o ? r = m + 1 : i = m - 1;
|
|
199
|
+
}
|
|
200
|
+
return i >= 0 ? h + i : b.length - 1;
|
|
201
|
+
}, he = Math.min(ue(w), b.length - 1);
|
|
202
|
+
let z = he;
|
|
203
|
+
const ge = (o) => {
|
|
204
|
+
const r = o.querySelectorAll("tbody > tr");
|
|
205
|
+
for (let i = 0; i < r.length; i++) {
|
|
206
|
+
const m = r[i];
|
|
207
|
+
m.style.transform = "", m.style.clipPath = "", m.style.display = "";
|
|
208
|
+
}
|
|
209
|
+
o.style.height = "";
|
|
210
|
+
};
|
|
211
|
+
if (g && v.current) {
|
|
212
|
+
let o = 0, r = [], i = [];
|
|
213
|
+
const m = (C) => {
|
|
214
|
+
var H;
|
|
215
|
+
const M = [];
|
|
216
|
+
let I = 0;
|
|
217
|
+
for (const L of C) {
|
|
218
|
+
const S = ne(L);
|
|
219
|
+
let V = 0;
|
|
220
|
+
const G = k.get(L);
|
|
221
|
+
if (G) {
|
|
222
|
+
const W = (H = G.footerIndex) != null ? H : G.lastChildIndex + 1, J = ae(W);
|
|
223
|
+
if (J !== void 0) {
|
|
224
|
+
const K = I + S, Ie = J - w;
|
|
225
|
+
Ie < K && (V = Ie - K);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
M.push(V), I += Math.max(S + V, 0);
|
|
229
|
+
}
|
|
230
|
+
return { totalHeight: I, offsets: M };
|
|
231
|
+
}, j = /* @__PURE__ */ new Set();
|
|
232
|
+
for (; ; ) {
|
|
233
|
+
z = Math.min(
|
|
234
|
+
ue(w + Math.max(o, 0)),
|
|
235
|
+
b.length - 1
|
|
236
|
+
);
|
|
237
|
+
const C = j.has(z);
|
|
238
|
+
j.add(z);
|
|
239
|
+
const M = Math.min(
|
|
240
|
+
de(w + $),
|
|
241
|
+
b.length - 1
|
|
242
|
+
), I = Pe(
|
|
243
|
+
b,
|
|
244
|
+
k,
|
|
245
|
+
z,
|
|
246
|
+
M,
|
|
247
|
+
he
|
|
248
|
+
), H = m(I.map((S) => S.flatIndex)), L = !X(I, i) && Math.abs(H.totalHeight - o) < 1;
|
|
249
|
+
if (i = I, o = H.totalHeight, r = H.offsets, L || C)
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
const oe = i.length > 0, se = y.current, D = X(i, se);
|
|
253
|
+
oe ? D ? (y.current = i, Z.current = r, ee.current = !0) : (v.current.style.display = "", He(v.current, r)) : (v.current.style.display = "none", ge(v.current)), D && (le(i), y.current = i);
|
|
254
|
+
}
|
|
255
|
+
if (a && R.current) {
|
|
256
|
+
let o = 0, r = [], i = [];
|
|
257
|
+
const m = (C) => {
|
|
258
|
+
const M = [];
|
|
259
|
+
let I = 0;
|
|
260
|
+
for (let H = C.length - 1; H >= 0; H--) {
|
|
261
|
+
const L = C[H], S = ne(L);
|
|
262
|
+
let V = 0;
|
|
263
|
+
const G = O.get(L);
|
|
264
|
+
if (G) {
|
|
265
|
+
const W = ae(G.headerIndex);
|
|
266
|
+
if (W !== void 0) {
|
|
267
|
+
const J = W + ne(G.headerIndex), K = w + $ - I - S;
|
|
268
|
+
J > K && (V = J - K);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
M[H] = V, I += Math.max(S - V, 0);
|
|
272
|
+
}
|
|
273
|
+
return { totalHeight: I, offsets: M };
|
|
274
|
+
}, j = /* @__PURE__ */ new Set();
|
|
275
|
+
for (; ; ) {
|
|
276
|
+
const C = Math.min(
|
|
277
|
+
de(w + $ - o),
|
|
278
|
+
b.length - 1
|
|
279
|
+
), M = j.has(C);
|
|
280
|
+
j.add(C);
|
|
281
|
+
const I = Ce(
|
|
282
|
+
b,
|
|
283
|
+
k,
|
|
284
|
+
z,
|
|
285
|
+
C
|
|
286
|
+
), H = m(I.map((S) => S.flatIndex)), L = !X(I, i) && Math.abs(H.totalHeight - o) < 1;
|
|
287
|
+
if (i = I, o = H.totalHeight, r = H.offsets, L || M)
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
const oe = i.length > 0, se = N.current, D = X(i, se);
|
|
291
|
+
oe ? D ? (N.current = i, _.current = r, te.current = !0) : (R.current.style.display = "", be(R.current, r)) : (R.current.style.display = "none", ge(R.current)), D && (ie(i), N.current = i);
|
|
292
|
+
}
|
|
293
|
+
const ye = ((me = v.current) == null ? void 0 : me.offsetHeight) || 0, pe = ((xe = R.current) == null ? void 0 : xe.offsetHeight) || 0;
|
|
294
|
+
F.style.scrollPaddingTop = ye > 0 ? ye + "px" : "", F.style.scrollPaddingBottom = pe > 0 ? pe + "px" : "";
|
|
295
|
+
};
|
|
296
|
+
const ve = x.useCallback(() => fe.current(), []), Re = x.useCallback(
|
|
297
|
+
(b) => {
|
|
298
|
+
var Q;
|
|
299
|
+
if (!g)
|
|
300
|
+
return;
|
|
301
|
+
const k = y.current.find(
|
|
302
|
+
(h) => {
|
|
303
|
+
var B, A;
|
|
304
|
+
return ((B = h.item.group) == null ? void 0 : B.field) === b.field && ((A = h.item.group) == null ? void 0 : A.value) === b.value;
|
|
305
|
+
}
|
|
306
|
+
);
|
|
307
|
+
if (!k)
|
|
308
|
+
return;
|
|
309
|
+
const O = e.current;
|
|
310
|
+
if (!O)
|
|
311
|
+
return;
|
|
312
|
+
let F = 0;
|
|
313
|
+
const q = t || 36, w = (Q = v.current) == null ? void 0 : Q.querySelectorAll("tbody > tr"), $ = y.current;
|
|
314
|
+
for (let h = 0; h < $.length; h++)
|
|
315
|
+
if ($[h].item.level < k.item.level) {
|
|
316
|
+
const B = w && h < w.length && w[h].offsetHeight || q;
|
|
317
|
+
F += B;
|
|
318
|
+
}
|
|
319
|
+
const E = c == null ? void 0 : c.current;
|
|
320
|
+
let T;
|
|
321
|
+
if (E)
|
|
322
|
+
T = E.offset(k.flatIndex);
|
|
323
|
+
else {
|
|
324
|
+
const h = f.current, B = (s == null ? void 0 : s.current) || 0, A = k.flatIndex - B;
|
|
325
|
+
if (h && A >= 0 && A < h.children.length) {
|
|
326
|
+
const P = h.children[A], Y = O.getBoundingClientRect();
|
|
327
|
+
T = h.getBoundingClientRect().top - Y.top + O.scrollTop + P.offsetTop;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
T !== void 0 && (O.scrollTop = T - F);
|
|
331
|
+
},
|
|
332
|
+
[g, e, t, c, f, s]
|
|
333
|
+
);
|
|
334
|
+
return x.useEffect(() => {
|
|
335
|
+
g || (y.current = [], le([])), a || (N.current = [], ie([])), !g && !a && e.current && (e.current.style.scrollPaddingTop = "", e.current.style.scrollPaddingBottom = "");
|
|
336
|
+
}, [g, a, e]), {
|
|
337
|
+
stickyHeaderItems: re,
|
|
338
|
+
stickyHeaderRef: v,
|
|
339
|
+
stickyFooterItems: ce,
|
|
340
|
+
stickyFooterRef: R,
|
|
341
|
+
scrollToStickyGroup: Re,
|
|
342
|
+
update: ve
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
export {
|
|
346
|
+
ke as buildGroupRangeMap,
|
|
347
|
+
Ce as computeStickyFooterItems,
|
|
348
|
+
Pe as computeStickyItems,
|
|
349
|
+
Fe as useStickyGroups
|
|
350
|
+
};
|
package/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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./Grid.js"),G=require("./GridColumn.js"),s=require("./columnMenu/GridColumnMenuWrapper.js"),C=require("./columnMenu/GridColumnMenuGroup.js"),l=require("./columnMenu/GridColumnMenuSort.js"),o=require("./columnMenu/GridColumnMenuFilter.js"),m=require("./columnMenu/GridColumnMenuFilterUI.js"),c=require("./columnMenu/GridColumnMenuFilterCell.js"),p=require("./columnMenu/GridColumnMenuCheckboxFilter.js"),M=require("./columnMenu/GridColumnMenuColumnsList.js"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./Grid.js"),G=require("./GridColumn.js"),s=require("./columnMenu/GridColumnMenuWrapper.js"),C=require("./columnMenu/GridColumnMenuGroup.js"),l=require("./columnMenu/GridColumnMenuSort.js"),o=require("./columnMenu/GridColumnMenuFilter.js"),m=require("./columnMenu/GridColumnMenuFilterUI.js"),c=require("./columnMenu/GridColumnMenuFilterCell.js"),p=require("./columnMenu/GridColumnMenuCheckboxFilter.js"),M=require("./columnMenu/GridColumnMenuColumnsList.js"),I=require("./columnMenu/GridColumnMenuColumnsChooser.js"),q=require("./cells/datacell/GridCell.js"),g=require("./cells/editcell/GridEditCell.js"),T=require("./cells/groupcell/GridGroupCell.js"),S=require("./cells/hierarchycell/GridHierarchyCell.js"),b=require("./cells/GridFilterCell.js"),F=require("./header/GridHeaderCell.js"),x=require("./cells/selectioncell/GridSelectionCell.js"),E=require("./rows/GridDetailRow.js"),R=require("./rows/GridRow.js"),h=require("./GridToolbar.js"),A=require("./toolbar-tools/GridToolbarSpacer.js"),P=require("./toolbar-tools/GridToolbarSeparator.js"),D=require("./toolbar-tools/GridToolbarCheckboxFilter.js"),B=require("./toolbar-tools/GridToolbarColumnsChooser.js"),_=require("./toolbar-tools/GridToolbarFilter.js"),N=require("./toolbar-tools/GridToolbarSort.js"),f=require("./toolbar-tools/GridToolbarGroup.js"),L=require("./toolbar-tools/GridToolbarAIAssistant.js"),O=require("./toolbar-tools/ai-tool/GridAIPrompt.js"),y=require("./components/noRecords/GridNoRecords.js"),v=require("./columnMenu/GridColumnMenuItem.js"),w=require("./columnMenu/GridColumnMenuItemContent.js"),k=require("./columnMenu/GridColumnMenuItemGroup.js"),t=require("./constants/index.js"),i=require("@progress/kendo-react-data-tools"),U=require("./drag/CommonDragLogic.js"),e=require("./filterCommon.js"),H=require("./utils/handleAIResponse.js"),W=require("./hooks/useGridAIRequest.js"),j=require("./interfaces/GridAICommands.js"),r=require("./messages/index.js"),n=require("./StatusBar.js"),u=require("./contextMenu/GridContextMenu.js"),d=require("./contextMenu/enums.js"),V=require("./GridSearchBox.js"),X=require("./GridPdfExportButton.js"),K=require("./GridCsvExportButton.js"),$=require("./toolbar-tools/smartbox/SmartBox.js");exports.Grid=a.Grid;exports.GridColumn=G.GridColumn;exports.GridColumnMenuWrapper=s.GridColumnMenuWrapper;exports.GridColumnMenuGroup=C.GridColumnMenuGroup;exports.GridColumnMenuSort=l.GridColumnMenuSort;exports.isColumnMenuSortActive=l.isColumnMenuSortActive;exports.GridColumnMenuFilter=o.GridColumnMenuFilter;exports.filterGroupByField=o.filterGroupByField;exports.isColumnMenuFilterActive=o.isColumnMenuFilterActive;exports.rootFilterOrDefault=o.rootFilterOrDefault;exports.GridColumnMenuFilterUI=m.GridColumnMenuFilterUI;exports.GridColumnMenuFilterCell=c.GridColumnMenuFilterCell;exports.GridColumnMenuCheckboxFilter=p.GridColumnMenuCheckboxFilter;exports.GridColumnMenuColumnsList=M.GridColumnMenuColumnsList;exports.GridColumnMenuColumnsChooser=I.GridColumnMenuColumnsChooser;exports.GridCell=q.GridCell;exports.GridEditCell=g.GridEditCell;exports.GridGroupCell=T.GridGroupCell;exports.GridHierarchyCell=S.GridHierarchyCell;exports.GridFilterCell=b.GridFilterCell;exports.GridHeaderCell=F.GridHeaderCell;exports.GridSelectionCell=x.GridSelectionCell;exports.GridDetailRow=E.GridDetailRow;exports.GridRow=R.GridRow;exports.GridToolbar=h.GridToolbar;exports.GridToolbarSpacer=A.GridToolbarSpacer;exports.GridToolbarSeparator=P.GridToolbarSeparator;exports.GridToolbarCheckboxFilter=D.GridToolbarCheckboxFilter;exports.GridToolbarColumnsChooser=B.GridToolbarColumnsChooser;exports.GridToolbarFilter=_.GridToolbarFilter;exports.GridToolbarSort=N.GridToolbarSort;exports.GridToolbarGroup=f.GridToolbarGroup;exports.GridToolbarAIAssistant=L.GridToolbarAIAssistant;exports.GridAIPrompt=O.GridAIPrompt;exports.GridNoRecords=y.GridNoRecords;exports.GridColumnMenuItem=v.GridColumnMenuItem;exports.GridColumnMenuItemContent=w.GridColumnMenuItemContent;exports.GridColumnMenuItemGroup=k.GridColumnMenuItemGroup;exports.GRID_COL_INDEX_ATTRIBUTE=t.GRID_COL_INDEX_ATTRIBUTE;exports.GRID_PREVENT_SELECTION_ELEMENT=t.GRID_PREVENT_SELECTION_ELEMENT;exports.GRID_ROW_INDEX_ATTRIBUTE=t.GRID_ROW_INDEX_ATTRIBUTE;Object.defineProperty(exports,"getSelectedState",{enumerable:!0,get:()=>i.getSelectedState});Object.defineProperty(exports,"getSelectedStateFromKeyDown",{enumerable:!0,get:()=>i.getSelectedStateFromKeyDown});Object.defineProperty(exports,"setSelectedState",{enumerable:!0,get:()=>i.setSelectedState});exports.GridCommonDragLogic=U.CommonDragLogic;exports.booleanFilterValues=e.booleanFilterValues;exports.cellBoolDropdownChange=e.cellBoolDropdownChange;exports.cellInputChange=e.cellInputChange;exports.cellOperatorChange=e.cellOperatorChange;exports.combineSmartFilters=e.combineSmartFilters;exports.operators=e.operators;exports.parseFilterDates=e.parseFilterDates;exports.handleAIResponse=H.handleAIResponse;exports.useGridAIRequest=W.useGridAIRequest;exports.GridAICommands=j.GridAICommands;exports.gridMessages=r.messages;exports.pagerFirstPage=r.pagerFirstPage;exports.pagerInfo=r.pagerInfo;exports.pagerItemPerPage=r.pagerItemPerPage;exports.pagerLastPage=r.pagerLastPage;exports.pagerNextPage=r.pagerNextPage;exports.pagerPreviousPage=r.pagerPreviousPage;exports.StatusBar=n.StatusBar;exports.getStatusData=n.getStatusData;exports.leafColumns=n.leafColumns;exports.GridContextMenu=u.GridContextMenu;exports.contextMenuItemsMap=u.contextMenuItemsMap;exports.GridContextMenuAnchorPart=d.GridContextMenuAnchorPart;exports.GridContextMenuItemNames=d.GridContextMenuItemNames;exports.GridSearchBox=V.GridSearchBox;exports.GridPdfExportButton=X.GridPdfExportButton;exports.GridCsvExportButton=K.GridCsvExportButton;exports.SmartBox=$.SmartBox;
|
package/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { Grid as e } from "./Grid.mjs";
|
|
9
9
|
import { GridColumn as m } from "./GridColumn.mjs";
|
|
10
10
|
import { GridColumnMenuWrapper as p } from "./columnMenu/GridColumnMenuWrapper.mjs";
|
|
11
|
-
import { GridColumnMenuGroup as
|
|
11
|
+
import { GridColumnMenuGroup as a } from "./columnMenu/GridColumnMenuGroup.mjs";
|
|
12
12
|
import { GridColumnMenuSort as x, isColumnMenuSortActive as d } from "./columnMenu/GridColumnMenuSort.mjs";
|
|
13
13
|
import { GridColumnMenuFilter as u, filterGroupByField as G, isColumnMenuFilterActive as C, rootFilterOrDefault as s } from "./columnMenu/GridColumnMenuFilter.mjs";
|
|
14
14
|
import { GridColumnMenuFilterUI as I } from "./columnMenu/GridColumnMenuFilterUI.mjs";
|
|
@@ -33,7 +33,7 @@ import { GridToolbarColumnsChooser as rr } from "./toolbar-tools/GridToolbarColu
|
|
|
33
33
|
import { GridToolbarFilter as er } from "./toolbar-tools/GridToolbarFilter.mjs";
|
|
34
34
|
import { GridToolbarSort as mr } from "./toolbar-tools/GridToolbarSort.mjs";
|
|
35
35
|
import { GridToolbarGroup as pr } from "./toolbar-tools/GridToolbarGroup.mjs";
|
|
36
|
-
import { GridToolbarAIAssistant as
|
|
36
|
+
import { GridToolbarAIAssistant as ar } from "./toolbar-tools/GridToolbarAIAssistant.mjs";
|
|
37
37
|
import { GridAIPrompt as xr } from "./toolbar-tools/ai-tool/GridAIPrompt.mjs";
|
|
38
38
|
import { GridNoRecords as fr } from "./components/noRecords/GridNoRecords.mjs";
|
|
39
39
|
import { GridColumnMenuItem as Gr } from "./columnMenu/GridColumnMenuItem.mjs";
|
|
@@ -50,11 +50,10 @@ import { messages as Xr, pagerFirstPage as qr, pagerInfo as Kr, pagerItemPerPage
|
|
|
50
50
|
import { StatusBar as Zr, getStatusData as $r, leafColumns as ro } from "./StatusBar.mjs";
|
|
51
51
|
import { GridContextMenu as eo, contextMenuItemsMap as to } from "./contextMenu/GridContextMenu.mjs";
|
|
52
52
|
import { GridContextMenuAnchorPart as lo, GridContextMenuItemNames as po } from "./contextMenu/enums.mjs";
|
|
53
|
-
import { GridSearchBox as
|
|
53
|
+
import { GridSearchBox as ao } from "./GridSearchBox.mjs";
|
|
54
54
|
import { GridPdfExportButton as xo } from "./GridPdfExportButton.mjs";
|
|
55
55
|
import { GridCsvExportButton as uo } from "./GridCsvExportButton.mjs";
|
|
56
|
-
import {
|
|
57
|
-
import { SmartBox as go } from "./toolbar-tools/smartbox/SmartBox.mjs";
|
|
56
|
+
import { SmartBox as Co } from "./toolbar-tools/smartbox/SmartBox.mjs";
|
|
58
57
|
export {
|
|
59
58
|
cr as GRID_COL_INDEX_ATTRIBUTE,
|
|
60
59
|
Sr as GRID_PREVENT_SELECTION_ELEMENT,
|
|
@@ -70,7 +69,7 @@ export {
|
|
|
70
69
|
u as GridColumnMenuFilter,
|
|
71
70
|
c as GridColumnMenuFilterCell,
|
|
72
71
|
I as GridColumnMenuFilterUI,
|
|
73
|
-
|
|
72
|
+
a as GridColumnMenuGroup,
|
|
74
73
|
Gr as GridColumnMenuItem,
|
|
75
74
|
sr as GridColumnMenuItemContent,
|
|
76
75
|
Ir as GridColumnMenuItemGroup,
|
|
@@ -90,10 +89,10 @@ export {
|
|
|
90
89
|
fr as GridNoRecords,
|
|
91
90
|
xo as GridPdfExportButton,
|
|
92
91
|
X as GridRow,
|
|
93
|
-
|
|
92
|
+
ao as GridSearchBox,
|
|
94
93
|
k as GridSelectionCell,
|
|
95
94
|
K as GridToolbar,
|
|
96
|
-
|
|
95
|
+
ar as GridToolbarAIAssistant,
|
|
97
96
|
Z as GridToolbarCheckboxFilter,
|
|
98
97
|
rr as GridToolbarColumnsChooser,
|
|
99
98
|
er as GridToolbarFilter,
|
|
@@ -101,8 +100,7 @@ export {
|
|
|
101
100
|
Q as GridToolbarSeparator,
|
|
102
101
|
mr as GridToolbarSort,
|
|
103
102
|
z as GridToolbarSpacer,
|
|
104
|
-
Co as
|
|
105
|
-
go as SmartBox,
|
|
103
|
+
Co as SmartBox,
|
|
106
104
|
Zr as StatusBar,
|
|
107
105
|
Pr as booleanFilterValues,
|
|
108
106
|
Br as cellBoolDropdownChange,
|
|
@@ -22,4 +22,27 @@ export interface GridGroupableSettings {
|
|
|
22
22
|
* The group expandable settings.
|
|
23
23
|
*/
|
|
24
24
|
expandable?: boolean | GridGroupExpandableSettings;
|
|
25
|
+
/**
|
|
26
|
+
* When enabled, the group header row sticks to the top of the scrollable area
|
|
27
|
+
* so that it remains visible while scrolling through group data rows.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```jsx
|
|
31
|
+
* <Grid groupable={{ stickyHeaders: true }} />
|
|
32
|
+
* ```
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
stickyHeaders?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* When enabled, the group footer row sticks to the bottom of the scrollable area
|
|
38
|
+
* so that it remains visible while scrolling through group data rows.
|
|
39
|
+
* Requires the `footer` property to be set to `'always'` or `'visible'`.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```jsx
|
|
43
|
+
* <Grid groupable={{ stickyFooters: true, footer: 'always' }} />
|
|
44
|
+
* ```
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
stickyFooters?: boolean;
|
|
25
48
|
}
|
package/messages/index.d.ts
CHANGED
|
@@ -333,6 +333,10 @@ export declare const smartBoxSemanticSearchModeText = "grid.smartBoxSemanticSear
|
|
|
333
333
|
* @hidden
|
|
334
334
|
*/
|
|
335
335
|
export declare const smartBoxSemanticSearchModeDescription = "grid.smartBoxSemanticSearchModeDescription";
|
|
336
|
+
/**
|
|
337
|
+
* @hidden
|
|
338
|
+
*/
|
|
339
|
+
export declare const headerGroupSpacerAccessibleLabel = "grid.headerGroupSpacerAccessibleLabel";
|
|
336
340
|
/**
|
|
337
341
|
* @hidden
|
|
338
342
|
*/
|
|
@@ -393,6 +397,7 @@ export declare const messages: {
|
|
|
393
397
|
"grid.filterSelectAll": string;
|
|
394
398
|
"grid.filterAriaLabel": string;
|
|
395
399
|
"grid.groupPanelAriaLabel": string;
|
|
400
|
+
"grid.headerGroupSpacerAccessibleLabel": string;
|
|
396
401
|
"grid.gridAriaLabel": string;
|
|
397
402
|
"grid.gridRowReorderAriaLabel": string;
|
|
398
403
|
"grid.selectRow": string;
|
package/messages/index.js
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
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="grid.noRecords",t="grid.pagerInfo",r="grid.pagerFirstPage",o="grid.pagerPreviousPage",a="grid.pagerNextPage",l="grid.pagerLastPage",i="grid.pagerItemsPerPage",s="grid.pagerPage",n="grid.pagerPageSizeAriaLabel",g="grid.pagerOf",d="grid.pagerTotalPages",c="grid.groupPanelEmpty",p="grid.groupColumn",u="grid.ungroupColumn",m="grid.columnMenu",h="grid.filterApplyButton",C="grid.filterClearButton",S="grid.filterClearAllButton",B="grid.filterResetButton",x="grid.filterSubmitButton",
|
|
9
|
-
`,[se]:"Generated with AI",[ge]:"Group",[de]:"Filter",[ce]:"Columns",[pe]:"Filter",[p]:"Group Column",[u]:"Ungroup Column",[m]:"Column menu",[i]:"items per page",[t]:"{0} - {1} of {2} items",[r]:"Go to the first page",[o]:"Go to the previous page",[a]:"Go to the next page",[l]:"Go to the last page",[s]:"Page",[n]:"Page size",[g]:"of",[d]:"{0}",[I]:"Search",[v]:"Search...",[y]:"Export PDF",[M]:"Export CSV",[D]:"Check All",[E]:"Edit Dialog",[G]:"Save",[N]:"Cancel",[O]:"Choose Operator",[
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="grid.noRecords",t="grid.pagerInfo",r="grid.pagerFirstPage",o="grid.pagerPreviousPage",a="grid.pagerNextPage",l="grid.pagerLastPage",i="grid.pagerItemsPerPage",s="grid.pagerPage",n="grid.pagerPageSizeAriaLabel",g="grid.pagerOf",d="grid.pagerTotalPages",c="grid.groupPanelEmpty",p="grid.groupColumn",u="grid.ungroupColumn",m="grid.columnMenu",h="grid.filterApplyButton",C="grid.filterClearButton",S="grid.filterClearAllButton",B="grid.filterResetButton",x="grid.filterSubmitButton",b="grid.filterTitle",A="grid.sortAscending",f="grid.sortDescending",P="grid.sortClearButton",T="grid.sortApplyButton",I="grid.searchPlaceholder",v="grid.searchboxPlaceholder",y="grid.exportPDF",M="grid.exportCSV",D="grid.filterCheckAll",O="grid.filterChooseOperator",L="grid.filterSelectAll",F="grid.filterSelectedItems",R="grid.sortAriaLabel",E="grid.editDialogTitle",G="grid.editDialogSaveButtonTitle",N="grid.editDialogCancelButtonTitle",k="grid.filterAriaLabel",w="grid.groupPanelAriaLabel",q="grid.groupExpand",W="grid.groupCollapse",z="grid.groupClearButton",V="grid.groupApplyButton",U="grid.detailExpand",j="grid.detailCollapse",H="grid.selectRow",J="grid.gridAriaLabel",K="grid.gridRowReorderAriaLabel",Q="grid.gridAdaptiveColumnMenuFilterTitle",X="grid.columnMenuColumnChooserTitle",Y="grid.columnMenuColumnChooserSelectedItems",Z="grid.adaptiveColumnMenuChooserTitle",_="grid.adaptiveColumnMenuChooserSubTitle",$="grid.columnChooserApplyButton",ee="grid.columnChooserResetButton",te="grid.adaptiveColumnMenuCheckboxFilterTitle",re="grid.adaptiveToolbarSortTitle",oe="grid.adaptiveToolbarGroupTitle",ae="grid.toolbarSort",le="grid.toolbarAI",ie="grid.aIResponseData",se="grid.generatedWithAI",ne="grid.toolbarAIApply",ge="grid.toolbarGroup",de="grid.toolbarFilter",ce="grid.toolbarColumnsChooser",pe="grid.toolbarCheckboxFilter",ue="grid.smartBoxSearchPlaceholder",me="grid.smartBoxSemanticSearchPlaceholder",he="grid.smartBoxAIAssistantPlaceholder",Ce="grid.smartBoxSuggestedPrompts",Se="grid.smartBoxPreviouslySearched",Be="grid.smartBoxPreviouslyAsked",xe="grid.smartBoxNoPreviousSearches",be="grid.smartBoxNoPreviousPrompts",Ae="grid.smartBoxClearTitle",fe="grid.smartBoxSubmitPromptButton",Pe="grid.smartBoxSpeechToTextButton",Te="grid.smartBoxSearchModeText",Ie="grid.smartBoxSearchModeDescription",ve="grid.smartBoxSemanticSearchModeText",ye="grid.smartBoxSemanticSearchModeDescription",Me="grid.headerGroupSpacerAccessibleLabel",De={[U]:"Expand detail row",[j]:"Collapse detail row",[q]:"Expand group",[W]:"Collapse Group",[z]:"Clear grouping",[V]:"Done",[e]:"No records available",[c]:"Drag a column header and drop it here to group by that column",[h]:"Apply",[C]:"Clear",[S]:"Clear all filters",[B]:"Reset",[x]:"Filter",[b]:"Filter",[A]:"Sort Ascending",[f]:"Sort Descending",[P]:"Clear sorting",[T]:"Done",[R]:"Sortable",[re]:"Sort by",[oe]:"Group by",[ae]:"Sort",[le]:"AI Assistant",[ne]:"Apply",[ie]:`Operation is successful. Data is:
|
|
9
|
+
`,[se]:"Generated with AI",[ge]:"Group",[de]:"Filter",[ce]:"Columns",[pe]:"Filter",[p]:"Group Column",[u]:"Ungroup Column",[m]:"Column menu",[i]:"items per page",[t]:"{0} - {1} of {2} items",[r]:"Go to the first page",[o]:"Go to the previous page",[a]:"Go to the next page",[l]:"Go to the last page",[s]:"Page",[n]:"Page size",[g]:"of",[d]:"{0}",[I]:"Search",[v]:"Search...",[y]:"Export PDF",[M]:"Export CSV",[D]:"Check All",[E]:"Edit Dialog",[G]:"Save",[N]:"Cancel",[O]:"Choose Operator",[F]:"selected items",[L]:"Select All",[k]:"Filter",[w]:"Group panel",[Me]:"Group",[J]:"Table",[K]:"Drag row",[H]:"Select Row",[X]:"Columns Chooser",[Q]:"Filter by",[Z]:"Columns Chooser",[_]:"Selected fields are visible",[te]:"Filter by",[Y]:"Selected items",[$]:"Apply",[ee]:"Reset",[ue]:"Search",[me]:"Semantic Search",[he]:"Sort, filter, or group with AI",[Ce]:"Suggested prompts",[Se]:"Previously searched",[Be]:"Previously asked",[xe]:"No previous searches",[be]:"No previous prompts",[Ae]:"Clear",[fe]:"Submit prompt",[Pe]:"Speech to text",[Te]:"Search",[Ie]:"Looks for exact word matches across your data.",[ve]:"Semantic Search",[ye]:"Understands context to surface the most relevant results.","grid.filterEqOperator":"Is equal to","grid.filterNotEqOperator":"Is not equal to","grid.filterIsNullOperator":"Is null","grid.filterIsNotNullOperator":"Is not null","grid.filterIsEmptyOperator":"Is empty","grid.filterIsNotEmptyOperator":"Is not empty","grid.filterStartsWithOperator":"Starts with","grid.filterContainsOperator":"Contains","grid.filterNotContainsOperator":"Does not contain","grid.filterEndsWithOperator":"Ends with","grid.filterGteOperator":"Is greater than or equal to","grid.filterGtOperator":"Is greater than","grid.filterLteOperator":"Is less than or equal to","grid.filterLtOperator":"Is less than","grid.filterIsTrue":"Is true","grid.filterIsFalse":"Is false","grid.filterBooleanAll":"(All)","grid.filterAfterOrEqualOperator":"Is after or equal to","grid.filterAfterOperator":"Is after","grid.filterBeforeOperator":"Is before","grid.filterBeforeOrEqualOperator":"Is before or equal to","grid.filterAndLogic":"And","grid.filterOrLogic":"Or"};exports.aIResponseData=ie;exports.adaptiveColumnMenuCheckboxFilterTitle=te;exports.adaptiveColumnMenuChooserSubTitle=_;exports.adaptiveColumnMenuChooserTitle=Z;exports.adaptiveColumnMenuFilterTitle=Q;exports.adaptiveToolbarGroupTitle=oe;exports.adaptiveToolbarSortTitle=re;exports.columnChooserApplyButton=$;exports.columnChooserResetButton=ee;exports.columnMenu=m;exports.columnMenuColumnChooserSelectedItems=Y;exports.columnMenuColumnChooserTitle=X;exports.detailCollapse=j;exports.detailExpand=U;exports.editDialogCancelButtonTitle=N;exports.editDialogSaveButtonTitle=G;exports.editDialogTitle=E;exports.exportCSV=M;exports.exportPDF=y;exports.filterApplyButton=h;exports.filterAriaLabel=k;exports.filterCheckAll=D;exports.filterChooseOperator=O;exports.filterClearAllButton=S;exports.filterClearButton=C;exports.filterResetButton=B;exports.filterSelectAll=L;exports.filterSelectedItems=F;exports.filterSubmitButton=x;exports.filterTitle=b;exports.generatedWithAI=se;exports.gridAriaLabel=J;exports.gridRowReorderAriaLabel=K;exports.groupApplyButton=V;exports.groupClearButton=z;exports.groupCollapse=W;exports.groupColumn=p;exports.groupExpand=q;exports.groupPanelAriaLabel=w;exports.groupPanelEmpty=c;exports.headerGroupSpacerAccessibleLabel=Me;exports.messages=De;exports.noRecords=e;exports.pagerFirstPage=r;exports.pagerInfo=t;exports.pagerItemPerPage=i;exports.pagerLastPage=l;exports.pagerNextPage=a;exports.pagerOf=g;exports.pagerPage=s;exports.pagerPageSizeAriaLabel=n;exports.pagerPreviousPage=o;exports.pagerTotalPages=d;exports.searchPlaceholder=I;exports.searchboxPlaceholder=v;exports.selectRow=H;exports.smartBoxAIAssistantPlaceholder=he;exports.smartBoxClearTitle=Ae;exports.smartBoxNoPreviousPrompts=be;exports.smartBoxNoPreviousSearches=xe;exports.smartBoxPreviouslyAsked=Be;exports.smartBoxPreviouslySearched=Se;exports.smartBoxSearchModeDescription=Ie;exports.smartBoxSearchModeText=Te;exports.smartBoxSearchPlaceholder=ue;exports.smartBoxSemanticSearchModeDescription=ye;exports.smartBoxSemanticSearchModeText=ve;exports.smartBoxSemanticSearchPlaceholder=me;exports.smartBoxSpeechToTextButton=Pe;exports.smartBoxSubmitPromptButton=fe;exports.smartBoxSuggestedPrompts=Ce;exports.sortApplyButton=T;exports.sortAriaLabel=R;exports.sortAscending=A;exports.sortClearButton=P;exports.sortDescending=f;exports.toolbarAI=le;exports.toolbarAIApply=ne;exports.toolbarCheckboxFilter=pe;exports.toolbarColumnsChooser=ce;exports.toolbarFilter=de;exports.toolbarGroup=ge;exports.toolbarSort=ae;exports.ungroupColumn=u;
|