@progress/kendo-react-grid 15.1.0-develop.6 → 15.1.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.
@@ -24,14 +24,18 @@ export declare class VirtualScroll implements VirtualScrollInterface {
24
24
  fixedScroll: boolean;
25
25
  tableTransform: string;
26
26
  rowHeightService?: RowHeightService;
27
+ scrollbarOverlaySpacerElement: HTMLDivElement | null;
27
28
  private reactVersion;
28
29
  private scrollSyncing;
30
+ private pendingTranslate;
31
+ private deferredScrollTop;
29
32
  private firstToLoad;
30
33
  private lastScrollTop;
31
34
  private firstLoaded;
32
35
  private lastLoaded;
33
36
  constructor();
34
37
  reset(): void;
38
+ scrollToPosition(scrollTop: number, e: React.SyntheticEvent<HTMLDivElement>, deferTranslate?: boolean): void;
35
39
  scrollHandler(e: React.SyntheticEvent<HTMLDivElement>): void;
36
40
  update(): void;
37
41
  private loadPage;
package/VirtualScroll.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 c=require("react"),n=require("./utils/index.js");function f(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,i.get?i:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const d=f(c),g=.3;class u{constructor(){this.table=null,this.tableBody=null,this.container=null,this.scrollHeightContainer=null,this.total=0,this.scrollableVirtual=!1,this.pageSize=0,this.PageChange=null,this.fixedScroll=!1,this.tableTransform="",this.reactVersion=Number.parseFloat(d.version),this.scrollSyncing=!1,this.firstToLoad=0,this.lastScrollTop=0,this.firstLoaded=0,this.lastLoaded=0,this.scrollHandler=this.scrollHandler.bind(this)}reset(){if(this.firstToLoad=0,this.firstLoaded=0,this.lastLoaded=0,this.rowHeightService=void 0,this.fixedScroll){this.lastScrollTop=this.container?this.container.scrollTop:0;return}this.container&&this.container.scrollTop!==0&&(this.scrollSyncing=!0,this.container.scrollTop=0,this.lastScrollTop=0,this.translate(0,!0))}scrollHandler(t){if(this.scrollSyncing){this.scrollSyncing=!1;return}if(!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||!this.container)return;const e=this.container.scrollTop,i=this.lastScrollTop>=e,o=!i;this.lastScrollTop=e;const a=this.container.offsetHeight;let s=this.rowHeightService.index(e);const l=this.rowHeightService.index(e+a),h=Math.max(s+this.pageSize-this.total,0);s=Math.max(s-h,0),o&&l>=this.lastLoaded&&this.lastLoaded<this.total-1?(this.firstToLoad=s,this.loadPage(t)):(i&&s<this.firstToLoad||s>this.lastLoaded||l<this.firstLoaded)&&this.loadPageWithBuffer(s,h,i,t)}update(){var e;const t=this.getItemHeights();if(this.firstLoaded>this.firstToLoad){const i=Math.min(this.firstLoaded-this.firstToLoad,this.pageSize),o=this.getTotalHeight(i,t),a=this.getExpectedTotalHeight(i),s=o-a;s!==0&&this.adjustScroll(s)}(e=this.rowHeightService)==null||e.update(this.firstToLoad,t),this.setScrollHeightContainerHeight(),this.firstLoaded=this.firstToLoad,this.lastLoaded=this.firstLoaded+t.length-1}loadPage(t){this.rowHeightService&&(this.translate(this.rowHeightService.offset(this.firstToLoad)),this.changePage(this.firstToLoad,t))}loadPageWithBuffer(t,e,i,o){const a=i?Math.max(Math.floor(this.pageSize*g)-e,0):0;this.firstToLoad=Math.max(t-a,0),this.loadPage(o)}translate(t,e){this.scrollableVirtual&&this.table&&((this.reactVersion<=17||e)&&(this.table.style.transform="translateY("+t+"px)"),this.reactVersion>17&&(this.tableTransform="translateY("+t+"px)"))}changePage(t,e){this.PageChange&&this.PageChange({skip:Math.max(0,t),take:this.pageSize},e)}adjustScroll(t){this.scrollSyncing=!0,this.container&&(this.container.scrollTop+=t)}setScrollHeightContainerHeight(){var t;if(this.scrollableVirtual&&this.scrollHeightContainer){let e=((t=this.rowHeightService)==null?void 0:t.totalHeight())||0;e=n.firefox?Math.min(n.firefoxMaxHeight,e):e,this.scrollHeightContainer.style.height=e+"px"}}getItemHeights(){const t=[];return this.tableBody&&Array.from(this.tableBody.children).forEach(e=>{const i=e.offsetHeight;e.classList.contains("k-detail-row")?t[t.length-1]+=i:t.push(i)}),t}getTotalHeight(t,e){return e.slice(0,t).reduce((i,o)=>i+o,0)}getExpectedTotalHeight(t){const e=this.rowHeightService;if(!e)return 0;const i=this.firstToLoad+(t-1);return e.offset(i)+e.height(i)-e.offset(this.firstToLoad)}}exports.VirtualScroll=u;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),f=require("./utils/index.js");function g(o){const t=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(t,e,i.get?i:{enumerable:!0,get:()=>o[e]})}}return t.default=o,Object.freeze(t)}const u=g(d),S=.3;class p{constructor(){this.table=null,this.tableBody=null,this.container=null,this.scrollHeightContainer=null,this.total=0,this.scrollableVirtual=!1,this.pageSize=0,this.PageChange=null,this.fixedScroll=!1,this.tableTransform="",this.scrollbarOverlaySpacerElement=null,this.reactVersion=Number.parseFloat(u.version),this.scrollSyncing=!1,this.pendingTranslate=!1,this.deferredScrollTop=0,this.firstToLoad=0,this.lastScrollTop=0,this.firstLoaded=0,this.lastLoaded=0,this.scrollHandler=this.scrollHandler.bind(this)}reset(){if(this.firstToLoad=0,this.firstLoaded=0,this.lastLoaded=0,this.rowHeightService=void 0,this.fixedScroll){this.lastScrollTop=this.container?this.container.scrollTop:0;return}this.container&&this.container.scrollTop!==0&&(this.scrollSyncing=!0,this.container.scrollTop=0,this.lastScrollTop=0,this.translate(0,!0))}scrollToPosition(t,e,i=!1){var c;if(!this.scrollableVirtual||!this.rowHeightService)return;i&&(this.pendingTranslate=!0,this.deferredScrollTop=t);const s=this.lastScrollTop>=t,a=!s;this.lastScrollTop=t;const l=((c=this.container)==null?void 0:c.offsetHeight)||0;let r=this.rowHeightService.index(t);const h=this.rowHeightService.index(t+l),n=Math.max(r+this.pageSize-this.total,0);r=Math.max(r-n,0),a&&h>=this.lastLoaded&&this.lastLoaded<this.total-1?(this.firstToLoad=r,this.loadPage(e)):(s&&r<this.firstToLoad||r>this.lastLoaded||h<this.firstLoaded)&&this.loadPageWithBuffer(r,n,s,e)}scrollHandler(t){if(this.scrollSyncing){this.scrollSyncing=!1;return}!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||this.scrollToPosition(this.container.scrollTop,t)}update(){var e;const t=this.getItemHeights();if(this.firstLoaded>this.firstToLoad){const i=Math.min(this.firstLoaded-this.firstToLoad,this.pageSize),s=this.getTotalHeight(i,t),a=this.getExpectedTotalHeight(i),l=s-a;l!==0&&this.adjustScroll(l)}(e=this.rowHeightService)==null||e.update(this.firstToLoad,t),this.setScrollHeightContainerHeight(),this.firstLoaded=this.firstToLoad,this.lastLoaded=this.firstLoaded+t.length-1,this.pendingTranslate&&this.rowHeightService&&(this.translate(this.rowHeightService.offset(this.firstLoaded),!0),this.container&&(this.scrollSyncing=!0,this.container.scrollTop=this.deferredScrollTop),this.pendingTranslate=!1)}loadPage(t){this.rowHeightService&&(this.pendingTranslate||this.translate(this.rowHeightService.offset(this.firstToLoad)),this.changePage(this.firstToLoad,t))}loadPageWithBuffer(t,e,i,s){const a=i?Math.max(Math.floor(this.pageSize*S)-e,0):0;this.firstToLoad=Math.max(t-a,0),this.loadPage(s)}translate(t,e){this.scrollableVirtual&&this.table&&((this.reactVersion<=17||e)&&(this.table.style.transform="translateY("+t+"px)"),this.reactVersion>17&&(this.tableTransform="translateY("+t+"px)"))}changePage(t,e){this.PageChange&&this.PageChange({skip:Math.max(0,t),take:this.pageSize},e)}adjustScroll(t){this.scrollSyncing=!0,this.container&&(this.container.scrollTop+=t)}setScrollHeightContainerHeight(){var t;if(this.scrollableVirtual&&this.scrollHeightContainer){let e=((t=this.rowHeightService)==null?void 0:t.totalHeight())||0;e=f.firefox?Math.min(f.firefoxMaxHeight,e):e,this.scrollHeightContainer.style.height=e+"px",this.scrollbarOverlaySpacerElement&&(this.scrollbarOverlaySpacerElement.style.height=e+"px")}}getItemHeights(){const t=[];return this.tableBody&&Array.from(this.tableBody.children).forEach(e=>{const i=e.offsetHeight;e.classList.contains("k-detail-row")?t[t.length-1]+=i:t.push(i)}),t}getTotalHeight(t,e){return e.slice(0,t).reduce((i,s)=>i+s,0)}getExpectedTotalHeight(t){const e=this.rowHeightService;if(!e)return 0;const i=this.firstToLoad+(t-1);return e.offset(i)+e.height(i)-e.offset(this.firstToLoad)}}exports.VirtualScroll=p;
package/VirtualScroll.mjs CHANGED
@@ -5,12 +5,12 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as l from "react";
9
- import { firefox as n, firefoxMaxHeight as c } from "./utils/index.mjs";
10
- const f = 0.3;
11
- class u {
8
+ import * as c from "react";
9
+ import { firefox as f, firefoxMaxHeight as d } from "./utils/index.mjs";
10
+ const g = 0.3;
11
+ class p {
12
12
  constructor() {
13
- this.table = null, this.tableBody = null, this.container = null, this.scrollHeightContainer = null, this.total = 0, this.scrollableVirtual = !1, this.pageSize = 0, this.PageChange = null, this.fixedScroll = !1, this.tableTransform = "", this.reactVersion = Number.parseFloat(l.version), this.scrollSyncing = !1, this.firstToLoad = 0, this.lastScrollTop = 0, this.firstLoaded = 0, this.lastLoaded = 0, this.scrollHandler = this.scrollHandler.bind(this);
13
+ this.table = null, this.tableBody = null, this.container = null, this.scrollHeightContainer = null, this.total = 0, this.scrollableVirtual = !1, this.pageSize = 0, this.PageChange = null, this.fixedScroll = !1, this.tableTransform = "", this.scrollbarOverlaySpacerElement = null, this.reactVersion = Number.parseFloat(c.version), this.scrollSyncing = !1, this.pendingTranslate = !1, this.deferredScrollTop = 0, this.firstToLoad = 0, this.lastScrollTop = 0, this.firstLoaded = 0, this.lastLoaded = 0, this.scrollHandler = this.scrollHandler.bind(this);
14
14
  }
15
15
  reset() {
16
16
  if (this.firstToLoad = 0, this.firstLoaded = 0, this.lastLoaded = 0, this.rowHeightService = void 0, this.fixedScroll) {
@@ -19,35 +19,40 @@ class u {
19
19
  }
20
20
  this.container && this.container.scrollTop !== 0 && (this.scrollSyncing = !0, this.container.scrollTop = 0, this.lastScrollTop = 0, this.translate(0, !0));
21
21
  }
22
+ scrollToPosition(t, i, e = !1) {
23
+ var n;
24
+ if (!this.scrollableVirtual || !this.rowHeightService)
25
+ return;
26
+ e && (this.pendingTranslate = !0, this.deferredScrollTop = t);
27
+ const s = this.lastScrollTop >= t, o = !s;
28
+ this.lastScrollTop = t;
29
+ const a = ((n = this.container) == null ? void 0 : n.offsetHeight) || 0;
30
+ let r = this.rowHeightService.index(t);
31
+ const h = this.rowHeightService.index(t + a), l = Math.max(r + this.pageSize - this.total, 0);
32
+ r = Math.max(r - l, 0), o && h >= this.lastLoaded && this.lastLoaded < this.total - 1 ? (this.firstToLoad = r, this.loadPage(i)) : (s && r < this.firstToLoad || r > this.lastLoaded || h < this.firstLoaded) && this.loadPageWithBuffer(r, l, s, i);
33
+ }
22
34
  scrollHandler(t) {
23
35
  if (this.scrollSyncing) {
24
36
  this.scrollSyncing = !1;
25
37
  return;
26
38
  }
27
- if (!this.scrollableVirtual || !this.container || !this.table || !this.rowHeightService || !this.container)
28
- return;
29
- const i = this.container.scrollTop, s = this.lastScrollTop >= i, o = !s;
30
- this.lastScrollTop = i;
31
- const r = this.container.offsetHeight;
32
- let e = this.rowHeightService.index(i);
33
- const a = this.rowHeightService.index(i + r), h = Math.max(e + this.pageSize - this.total, 0);
34
- e = Math.max(e - h, 0), o && a >= this.lastLoaded && this.lastLoaded < this.total - 1 ? (this.firstToLoad = e, this.loadPage(t)) : (s && e < this.firstToLoad || e > this.lastLoaded || a < this.firstLoaded) && this.loadPageWithBuffer(e, h, s, t);
39
+ !this.scrollableVirtual || !this.container || !this.table || !this.rowHeightService || this.scrollToPosition(this.container.scrollTop, t);
35
40
  }
36
41
  update() {
37
42
  var i;
38
43
  const t = this.getItemHeights();
39
44
  if (this.firstLoaded > this.firstToLoad) {
40
- const s = Math.min(this.firstLoaded - this.firstToLoad, this.pageSize), o = this.getTotalHeight(s, t), r = this.getExpectedTotalHeight(s), e = o - r;
41
- e !== 0 && this.adjustScroll(e);
45
+ const e = Math.min(this.firstLoaded - this.firstToLoad, this.pageSize), s = this.getTotalHeight(e, t), o = this.getExpectedTotalHeight(e), a = s - o;
46
+ a !== 0 && this.adjustScroll(a);
42
47
  }
43
- (i = this.rowHeightService) == null || i.update(this.firstToLoad, t), this.setScrollHeightContainerHeight(), this.firstLoaded = this.firstToLoad, this.lastLoaded = this.firstLoaded + t.length - 1;
48
+ (i = this.rowHeightService) == null || i.update(this.firstToLoad, t), this.setScrollHeightContainerHeight(), this.firstLoaded = this.firstToLoad, this.lastLoaded = this.firstLoaded + t.length - 1, this.pendingTranslate && this.rowHeightService && (this.translate(this.rowHeightService.offset(this.firstLoaded), !0), this.container && (this.scrollSyncing = !0, this.container.scrollTop = this.deferredScrollTop), this.pendingTranslate = !1);
44
49
  }
45
50
  loadPage(t) {
46
- this.rowHeightService && (this.translate(this.rowHeightService.offset(this.firstToLoad)), this.changePage(this.firstToLoad, t));
51
+ this.rowHeightService && (this.pendingTranslate || this.translate(this.rowHeightService.offset(this.firstToLoad)), this.changePage(this.firstToLoad, t));
47
52
  }
48
- loadPageWithBuffer(t, i, s, o) {
49
- const r = s ? Math.max(Math.floor(this.pageSize * f) - i, 0) : 0;
50
- this.firstToLoad = Math.max(t - r, 0), this.loadPage(o);
53
+ loadPageWithBuffer(t, i, e, s) {
54
+ const o = e ? Math.max(Math.floor(this.pageSize * g) - i, 0) : 0;
55
+ this.firstToLoad = Math.max(t - o, 0), this.loadPage(s);
51
56
  }
52
57
  translate(t, i) {
53
58
  this.scrollableVirtual && this.table && ((this.reactVersion <= 17 || i) && (this.table.style.transform = "translateY(" + t + "px)"), this.reactVersion > 17 && (this.tableTransform = "translateY(" + t + "px)"));
@@ -68,27 +73,27 @@ class u {
68
73
  var t;
69
74
  if (this.scrollableVirtual && this.scrollHeightContainer) {
70
75
  let i = ((t = this.rowHeightService) == null ? void 0 : t.totalHeight()) || 0;
71
- i = n ? Math.min(c, i) : i, this.scrollHeightContainer.style.height = i + "px";
76
+ i = f ? Math.min(d, i) : i, this.scrollHeightContainer.style.height = i + "px", this.scrollbarOverlaySpacerElement && (this.scrollbarOverlaySpacerElement.style.height = i + "px");
72
77
  }
73
78
  }
74
79
  getItemHeights() {
75
80
  const t = [];
76
81
  return this.tableBody && Array.from(this.tableBody.children).forEach((i) => {
77
- const s = i.offsetHeight;
78
- i.classList.contains("k-detail-row") ? t[t.length - 1] += s : t.push(s);
82
+ const e = i.offsetHeight;
83
+ i.classList.contains("k-detail-row") ? t[t.length - 1] += e : t.push(e);
79
84
  }), t;
80
85
  }
81
86
  getTotalHeight(t, i) {
82
- return i.slice(0, t).reduce((s, o) => s + o, 0);
87
+ return i.slice(0, t).reduce((e, s) => e + s, 0);
83
88
  }
84
89
  getExpectedTotalHeight(t) {
85
90
  const i = this.rowHeightService;
86
91
  if (!i)
87
92
  return 0;
88
- const s = this.firstToLoad + (t - 1);
89
- return i.offset(s) + i.height(s) - i.offset(this.firstToLoad);
93
+ const e = this.firstToLoad + (t - 1);
94
+ return i.offset(e) + i.height(e) - i.offset(this.firstToLoad);
90
95
  }
91
96
  }
92
97
  export {
93
- u as VirtualScroll
98
+ p as VirtualScroll
94
99
  };
@@ -0,0 +1,12 @@
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 * as React from 'react';
9
+ /**
10
+ * @hidden
11
+ */
12
+ export declare const VirtualScrollOverlay: () => React.JSX.Element;
@@ -0,0 +1,16 @@
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 f=require("react"),g=require("../utils/GridContext.js");function p(r){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const l in r)if(l!=="default"){const t=Object.getOwnPropertyDescriptor(r,l);Object.defineProperty(o,l,t.get?t:{enumerable:!0,get:()=>r[l]})}}return o.default=r,Object.freeze(o)}const e=p(f),v=`
10
+ .k-grid-content--hide-scrollbar::-webkit-scrollbar { display: none; }
11
+
12
+ .k-grid-scrollbar-overlay::-webkit-scrollbar { width: 17px; }
13
+ .k-grid-scrollbar-overlay::-webkit-scrollbar-track { background: transparent; }
14
+ .k-grid-scrollbar-overlay::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.25); border: 4px solid transparent; background-clip: content-box; border-radius: 8px; min-height: 40px; }
15
+ .k-grid-scrollbar-overlay::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.4); border: 4px solid transparent; background-clip: content-box; border-radius: 8px; }
16
+ `,k=()=>{const r=e.useContext(g.GridContext),[o,l]=e.useState(!1),t=e.useRef(null),a=e.useCallback(()=>{l(!0),t.current!==null&&clearTimeout(t.current),t.current=setTimeout(()=>l(!1),1e3)},[]);e.useEffect(()=>(r.scrollbarShowCallbackRef&&(r.scrollbarShowCallbackRef.current=a),()=>{r.scrollbarShowCallbackRef&&(r.scrollbarShowCallbackRef.current=null),t.current!==null&&clearTimeout(t.current)}),[r.scrollbarShowCallbackRef,a]),e.useEffect(()=>{const n=()=>{r.vScrollDraggingRef&&(r.vScrollDraggingRef.current=!1)};return document.addEventListener("pointerup",n),()=>document.removeEventListener("pointerup",n)},[r.vScrollDraggingRef]);const b=()=>{r.vScrollDraggingRef&&(r.vScrollDraggingRef.current=!0)},d=n=>{var i,s,u;const c=(i=r.scrollbarContainerRef)==null?void 0:i.current;c&&((u=(s=r.vsRef)==null?void 0:s.current)==null||u.scrollToPosition(c.scrollTop,n,!0))};return e.createElement(e.Fragment,null,e.createElement("style",null,v),e.createElement("div",{ref:r.scrollbarContainerRef,onScroll:d,onMouseEnter:a,onPointerDown:b,className:"k-grid-scrollbar-overlay",style:{position:"absolute",right:0,top:0,bottom:0,width:"17px",overflowY:"scroll",overflowX:"hidden",zIndex:1,opacity:o?1:0,transition:"opacity 0.3s",scrollbarWidth:"auto",scrollbarColor:"rgba(0,0,0,0.25) transparent"}},e.createElement("div",{ref:r.scrollbarSpacerRef})))};exports.VirtualScrollOverlay=k;
@@ -0,0 +1,65 @@
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 e from "react";
10
+ import { GridContext as f } from "../utils/GridContext.mjs";
11
+ const g = `
12
+ .k-grid-content--hide-scrollbar::-webkit-scrollbar { display: none; }
13
+
14
+ .k-grid-scrollbar-overlay::-webkit-scrollbar { width: 17px; }
15
+ .k-grid-scrollbar-overlay::-webkit-scrollbar-track { background: transparent; }
16
+ .k-grid-scrollbar-overlay::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.25); border: 4px solid transparent; background-clip: content-box; border-radius: 8px; min-height: 40px; }
17
+ .k-grid-scrollbar-overlay::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.4); border: 4px solid transparent; background-clip: content-box; border-radius: 8px; }
18
+ `, v = () => {
19
+ const r = e.useContext(f), [b, a] = e.useState(!1), l = e.useRef(null), t = e.useCallback(() => {
20
+ a(!0), l.current !== null && clearTimeout(l.current), l.current = setTimeout(() => a(!1), 1e3);
21
+ }, []);
22
+ e.useEffect(() => (r.scrollbarShowCallbackRef && (r.scrollbarShowCallbackRef.current = t), () => {
23
+ r.scrollbarShowCallbackRef && (r.scrollbarShowCallbackRef.current = null), l.current !== null && clearTimeout(l.current);
24
+ }), [r.scrollbarShowCallbackRef, t]), e.useEffect(() => {
25
+ const o = () => {
26
+ r.vScrollDraggingRef && (r.vScrollDraggingRef.current = !1);
27
+ };
28
+ return document.addEventListener("pointerup", o), () => document.removeEventListener("pointerup", o);
29
+ }, [r.vScrollDraggingRef]);
30
+ const u = () => {
31
+ r.vScrollDraggingRef && (r.vScrollDraggingRef.current = !0);
32
+ }, d = (o) => {
33
+ var c, i, s;
34
+ const n = (c = r.scrollbarContainerRef) == null ? void 0 : c.current;
35
+ n && ((s = (i = r.vsRef) == null ? void 0 : i.current) == null || s.scrollToPosition(n.scrollTop, o, !0));
36
+ };
37
+ return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("style", null, g), /* @__PURE__ */ e.createElement(
38
+ "div",
39
+ {
40
+ ref: r.scrollbarContainerRef,
41
+ onScroll: d,
42
+ onMouseEnter: t,
43
+ onPointerDown: u,
44
+ className: "k-grid-scrollbar-overlay",
45
+ style: {
46
+ position: "absolute",
47
+ right: 0,
48
+ top: 0,
49
+ bottom: 0,
50
+ width: "17px",
51
+ overflowY: "scroll",
52
+ overflowX: "hidden",
53
+ zIndex: 1,
54
+ opacity: b ? 1 : 0,
55
+ transition: "opacity 0.3s",
56
+ scrollbarWidth: "auto",
57
+ scrollbarColor: "rgba(0,0,0,0.25) transparent"
58
+ }
59
+ },
60
+ /* @__PURE__ */ e.createElement("div", { ref: r.scrollbarSpacerRef })
61
+ ));
62
+ };
63
+ export {
64
+ v as VirtualScrollOverlay
65
+ };