@progress/kendo-vue-grid 7.1.0-develop.4 → 7.1.0-develop.6
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/Grid.js +1 -1
- package/Grid.mjs +647 -588
- package/GridNav.js +1 -1
- package/GridNav.mjs +3 -1
- package/GridState.js +1 -1
- package/GridState.mjs +80 -60
- package/VirtualScroll.js +1 -1
- package/VirtualScroll.mjs +65 -109
- package/cells/GridCell.js +1 -1
- package/cells/GridCell.mjs +24 -19
- package/cells/GridFilterCell.js +1 -1
- package/cells/GridFilterCell.mjs +23 -23
- package/cells/GridHierarchyCell.js +1 -1
- package/cells/GridHierarchyCell.mjs +13 -14
- package/common.js +1 -1
- package/common.mjs +3 -0
- package/{GridNoRecords.js → components/noRecords/GridNoRecords.js} +1 -1
- package/{GridNoRecords.mjs → components/noRecords/GridNoRecords.mjs} +1 -1
- package/components/noRecords/GridNoRecordsContainer.js +8 -0
- package/components/noRecords/GridNoRecordsContainer.mjs +30 -0
- package/dist/cdn/js/kendo-vue-grid.js +1 -1
- package/footer/Footer.js +1 -1
- package/footer/Footer.mjs +9 -16
- package/header/Header.js +1 -1
- package/header/Header.mjs +20 -26
- package/index.d.mts +102 -23
- package/index.d.ts +102 -23
- package/index.js +1 -1
- package/index.mjs +30 -29
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +12 -12
- package/rows/GridRow.js +1 -1
- package/rows/GridRow.mjs +18 -17
- package/utils/main.js +1 -1
- package/utils/main.mjs +30 -22
- package/VirtualScrollFixed.js +0 -8
- package/VirtualScrollFixed.mjs +0 -86
- package/utils/browser-support.service.js +0 -8
- package/utils/browser-support.service.mjs +0 -21
package/utils/main.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 x=require("@progress/kendo-vue-data-tools"),w=require("@progress/kendo-vue-common"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("@progress/kendo-vue-data-tools"),w=require("@progress/kendo-vue-common"),v=require("../GridColumn.js"),y="string";function I(e,t){const n=e.split(".");let r=t;return n.forEach(a=>{r=r?r[a]:void 0}),r}function M(e,t,n,r,a,l,i,o,d,s,c=0,f){let g=c;for(let h=0;h<t.length;h++){let u;if(!a||t[h].value===void 0||t[h].items===void 0){const p=d?!!(l!=null&&l[w.getter(d)(t[h])]):!1;e[e.length]={dataIndex:r.index,dataItem:t[h],rowType:"data",level:c,group:f,expanded:s!==void 0?I(s,t[h]):p!=null?p:!1},r.index++;continue}else{let p;f!=null&&f.parents?p=[{field:f.field,value:f.value},...f.parents]:f?p=[f]:p=[],u={field:t[h].field,value:t[h].value,parents:p}}g=Math.max(g,c+1);let C=!1;const m=x.findGroupExpand(i||[],u);s?C=s===void 0||I(s,t[h])===void 0||I(s,t[h]):C=m?m.expanded!==!1:o!==!1,e[e.length]={dataIndex:-1,dataItem:t[h],level:c,group:u,rowType:"groupHeader",expanded:C},C&&(u.expanded=C,g=Math.max(M(e,t[h].items,n,r,a,l,i,o,d,s,c+1,u),g)),(n==="always"||C&&n==="visible")&&(e[e.length]={dataIndex:-1,dataItem:t[h],rowType:"groupFooter",level:c,expanded:C})}return g}function F(e){return e&&getComputedStyle(e).direction==="rtl"||!1}function A(e,t){if(!t||!e||!e.originalEvent||!w.canUseDOM)return-1;let n=document.elementFromPoint(e.clientX,e.originalEvent.clientY);for(;n&&n.parentElement!==t;)n=n.parentElement;const r=t.children;for(let a=0;a<r.length;a++)if(r[a]===n)return a;return-1}const E=["sortChange","filterChange","groupChange","pageChange","expandChange","selectionChange","headerSelectionChange","rowClick","itemChange","dataStateChange","columnResize","columnReorder"],k=(e,t)=>`The ${e} event handler property is deprecated, use https://www.telerik.com/kendo-vue-ui/components/grid/api/GridProps/#toc-${t} instead`;function N(e){for(let t=0;t<E.length;t++){const n=E[t];if(e[n]!==void 0){const r="on"+n.charAt(0).toUpperCase()+n.slice(1);console.warn(k(n,r))}}}function H(e,t){const n=[[]];let r=0;for(let i=e.length-1;i>=0;i--)r=Math.max(r,e[i].depth),e[i].headerColSpan=e[i].headerColSpan||1,e[i].children.length>0&&(e[i].headerColSpan=e[i].children.reduce((o,d)=>d.hidden?o:o+d.headerColSpan,0));const a=[];let l=1;return e.forEach((i,o)=>{n[i.depth]=n[i.depth]||[];let d=!1;n[i.depth].length===0&&(l<=1?l=1+(i.children.length>0?0:r-i.depth):(l--,d=!0)),i.rowSpan=1+(i.children.length>0?0:r-i.depth),i.kFirst=d,i.index=n[i.depth].length,n[i.depth].push(o),i.ariaColumnIndex=a[i.depth]?a[i.depth]+1:1;for(let s=i.depth;s<i.depth+i.rowSpan;s++)a[s]=(a[s]||0)+i.headerColSpan}),x.updateLeft(n,e,t),x.updateRight(n,e,t),n}function R(e,t,n,r=0,a=!1){const l=[];if(!e)return[];e&&e.length===void 0&&(e=[e]),e.forEach((o,d)=>{o=o;const s=o.id?o.id:x.tableKeyboardNavigationTools.generateNavigatableId(`${n.prevId++}`,n.idPrefix,"column"),c=w.canUseDOM&&o.media&&window.matchMedia?!window.matchMedia(o.media).matches:!1,f=a||c||o.hidden,g=t==null?void 0:t.find(u=>u.id===s),h=R(o.children,(g==null?void 0:g.children)||[],n,r+1,f);l.push({depth:r,...v.gridDefaultProps,...h.length?{cell:()=>null,filterCell:()=>null}:{},...o,id:s,declarationIndex:l.length,children:h,headerColSpan:0,rowSpan:0,columnType:o.columnType||"data",colSpan:o.colSpan||1,isAccessible:!0,hidden:f,left:null,right:null,rowSpannable:o.rowSpannable,...g?{width:g.width,orderIndex:g.orderIndex}:{}})});const i=(o,d)=>o.orderIndex===d.orderIndex?o.declarationIndex-d.declarationIndex:(o.orderIndex||0)-(d.orderIndex||0);if(l.sort(i),r===0){const o=[],d=(s,c)=>s.forEach(f=>{f.parentIndex=c,d(f.children,o.push(f)-1)});return d(l,-1),o}return l}const b=e=>Array.isArray(e)?e:e?e.data:[];function L(e,t,n,r){const a=b(e),l=[];if(a.length>0){let i=a[0];if(t)for(let d=0;d<t.length;d++)i=i.items&&i.items[0];Object.getOwnPropertyNames(i).forEach(d=>{d!==n.column&&l.push({id:x.tableKeyboardNavigationTools.generateNavigatableId(`${r.prevId++}`,r.idPrefix,"column"),declarationIndex:-1,parentIndex:-1,depth:0,colSpan:0,headerColSpan:0,rowSpan:0,index:0,columnType:"data",left:0,right:0,rightBorder:!1,children:[],ariaColumnIndex:0,isAccessible:!0,...v.gridDefaultProps,field:d})})}return l}const O=(e,t)=>{let n=e[t.parentIndex];for(;n;){if(n.footerCell)return!0;n=e[n.parentIndex]}return!1},V=e=>e.filter(t=>O(e,t)?!1:!!t.footerCell||!(t.children&&t.children.length>0)),j={number:function(e,t,n){return typeof e===y&&e.toLowerCase()==="null"?null:t.parseNumber(e,n)},date:function(e,t,n){return typeof e===y&&e.toLowerCase()==="null"?null:t.parseDate(e,n)},boolean:function(e){return typeof e===y?e.toLowerCase()==="null"?null:e.toLowerCase()==="true":e!=null?!!e:e},string:function(e){return typeof e===y&&e.toLowerCase()==="null"?null:e!=null?e+"":e},default:function(e){return e}};function T(e,t,n,r){return e.forEach(a=>{a.expanded=t[r]&&!t[r].includes(S(a,n)),a.items&&a.items.length&&(a.items=T(a.items,t,n,r+1))}),e}function K(e,t,n){return t&&t.length&&e.data.forEach(r=>{r.expanded=r.expanded!==void 0?r.expanded:t[0]&&!t[0].includes(S(r,n)),r.items&&r.items.length&&(r.items=T(r.items,t,n,1))}),e}function S(e,t){let n=e;for(;n.items&&n.items.length;)n=n.items[0];return t?n[t]:e.value}const $=e=>{const t=[],n=r=>r==null?void 0:r.forEach(a=>{t.push(a),n(a.children)});return n(e),t},z=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),B=17895697,U=e=>e.width!==void 0?Math.floor(parseFloat(e.width.toString()))+"px":void 0,q=(e,t)=>t&&t.filter(n=>n.field===e).length>0,D=e=>(e.sort((t,n)=>t.declarationIndex-n.declarationIndex),e.map(t=>{const{declarationIndex:n,parentIndex:r,depth:a,headerColSpan:l,rowSpan:i,index:o,kFirst:d,children:s,...c}=t;return s.length?{children:D(s),...c}:c})),W=(e,t)=>typeof e.colSpan=="function"?e.colSpan({dataItem:t,column:e}):e.colSpan||1,X=e=>{var r,a;const t=typeof e=="object"?(r=e.enabled)!=null?r:!0:e!=null?e:!1,n=typeof e=="object"?(a=e.valueGetter)!=null?a:(l,i)=>w.getter(i)(l):(l,i)=>w.getter(i)(l);return{enabled:t,valueGetter:n}},Y=e=>{let t=0;if(e){const n=e.insertRow(0),r=n.insertCell(0);r.textContent=" ",t=n.getBoundingClientRect().height,e.deleteRow(0)}return t};exports.applyExpandedState=K;exports.autoGenerateColumns=L;exports.calcRowHeight=Y;exports.checkPropCompatibility=N;exports.firefox=z;exports.firefoxMaxHeight=B;exports.flatData=M;exports.footerColumns=V;exports.getColSpan=W;exports.getColumnWidth=U;exports.getDataAsArray=b;exports.getFlatColumnsState=$;exports.getIndex=A;exports.getNestedValue=I;exports.getRowSpanOptions=X;exports.groupedFirstItemValue=S;exports.isRtl=F;exports.isSorted=q;exports.mapColumns=H;exports.parsers=j;exports.readColumns=R;exports.sanitizeColumns=D;
|
package/utils/main.mjs
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { findGroupExpand as
|
|
8
|
+
import { findGroupExpand as F, updateLeft as T, updateRight as A, tableKeyboardNavigationTools as E } from "@progress/kendo-vue-data-tools";
|
|
9
9
|
import { getter as I, canUseDOM as m } from "@progress/kendo-vue-common";
|
|
10
10
|
import { gridDefaultProps as v } from "../GridColumn.mjs";
|
|
11
11
|
const w = "string";
|
|
@@ -16,7 +16,7 @@ function u(e, t) {
|
|
|
16
16
|
r = r ? r[a] : void 0;
|
|
17
17
|
}), r;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function b(e, t, n, r, a, l, i, d, o, s, c = 0, f) {
|
|
20
20
|
let g = c;
|
|
21
21
|
for (let h = 0; h < t.length; h++) {
|
|
22
22
|
let x;
|
|
@@ -42,7 +42,7 @@ function L(e, t, n, r, a, l, i, d, o, s, c = 0, f) {
|
|
|
42
42
|
}
|
|
43
43
|
g = Math.max(g, c + 1);
|
|
44
44
|
let C = !1;
|
|
45
|
-
const y =
|
|
45
|
+
const y = F(i || [], x);
|
|
46
46
|
s ? C = s === void 0 || u(s, t[h]) === void 0 || u(s, t[h]) : C = y ? y.expanded !== !1 : d !== !1, e[e.length] = {
|
|
47
47
|
dataIndex: -1,
|
|
48
48
|
dataItem: t[h],
|
|
@@ -51,7 +51,7 @@ function L(e, t, n, r, a, l, i, d, o, s, c = 0, f) {
|
|
|
51
51
|
rowType: "groupHeader",
|
|
52
52
|
expanded: C
|
|
53
53
|
}, C && (x.expanded = C, g = Math.max(
|
|
54
|
-
|
|
54
|
+
b(
|
|
55
55
|
e,
|
|
56
56
|
t[h].items,
|
|
57
57
|
n,
|
|
@@ -76,7 +76,7 @@ function L(e, t, n, r, a, l, i, d, o, s, c = 0, f) {
|
|
|
76
76
|
}
|
|
77
77
|
return g;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function B(e) {
|
|
80
80
|
return e && getComputedStyle(e).direction === "rtl" || !1;
|
|
81
81
|
}
|
|
82
82
|
function K(e, t) {
|
|
@@ -104,13 +104,13 @@ const S = [
|
|
|
104
104
|
"dataStateChange",
|
|
105
105
|
"columnResize",
|
|
106
106
|
"columnReorder"
|
|
107
|
-
],
|
|
107
|
+
], L = (e, t) => `The ${e} event handler property is deprecated, use https://www.telerik.com/kendo-vue-ui/components/grid/api/GridProps/#toc-${t} instead`;
|
|
108
108
|
function z(e) {
|
|
109
109
|
for (let t = 0; t < S.length; t++) {
|
|
110
110
|
const n = S[t];
|
|
111
111
|
if (e[n] !== void 0) {
|
|
112
112
|
const r = "on" + n.charAt(0).toUpperCase() + n.slice(1);
|
|
113
|
-
console.warn(
|
|
113
|
+
console.warn(L(n, r));
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
}
|
|
@@ -130,15 +130,15 @@ function U(e, t) {
|
|
|
130
130
|
n[i.depth].length === 0 && (l <= 1 ? l = 1 + (i.children.length > 0 ? 0 : r - i.depth) : (l--, o = !0)), i.rowSpan = 1 + (i.children.length > 0 ? 0 : r - i.depth), i.kFirst = o, i.index = n[i.depth].length, n[i.depth].push(d), i.ariaColumnIndex = a[i.depth] ? a[i.depth] + 1 : 1;
|
|
131
131
|
for (let s = i.depth; s < i.depth + i.rowSpan; s++)
|
|
132
132
|
a[s] = (a[s] || 0) + i.headerColSpan;
|
|
133
|
-
}),
|
|
133
|
+
}), T(n, e, t), A(n, e, t), n;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function N(e, t, n, r = 0, a = !1) {
|
|
136
136
|
const l = [];
|
|
137
137
|
if (!e)
|
|
138
138
|
return [];
|
|
139
139
|
e && e.length === void 0 && (e = [e]), e.forEach((d, o) => {
|
|
140
140
|
d = d;
|
|
141
|
-
const s = d.id ? d.id : E.generateNavigatableId(`${n.prevId++}`, n.idPrefix, "column"), c = m && d.media && window.matchMedia ? !window.matchMedia(d.media).matches : !1, f = a || c || d.hidden, g = t == null ? void 0 : t.find((x) => x.id === s), h =
|
|
141
|
+
const s = d.id ? d.id : E.generateNavigatableId(`${n.prevId++}`, n.idPrefix, "column"), c = m && d.media && window.matchMedia ? !window.matchMedia(d.media).matches : !1, f = a || c || d.hidden, g = t == null ? void 0 : t.find((x) => x.id === s), h = N(d.children, (g == null ? void 0 : g.children) || [], n, r + 1, f);
|
|
142
142
|
l.push(
|
|
143
143
|
{
|
|
144
144
|
depth: r,
|
|
@@ -170,9 +170,9 @@ function k(e, t, n, r = 0, a = !1) {
|
|
|
170
170
|
}
|
|
171
171
|
return l;
|
|
172
172
|
}
|
|
173
|
-
const
|
|
173
|
+
const k = (e) => Array.isArray(e) ? e : e ? e.data : [];
|
|
174
174
|
function V(e, t, n, r) {
|
|
175
|
-
const a =
|
|
175
|
+
const a = k(e), l = [];
|
|
176
176
|
if (a.length > 0) {
|
|
177
177
|
let i = a[0];
|
|
178
178
|
if (t)
|
|
@@ -204,7 +204,7 @@ function V(e, t, n, r) {
|
|
|
204
204
|
}
|
|
205
205
|
return l;
|
|
206
206
|
}
|
|
207
|
-
const
|
|
207
|
+
const D = (e, t) => {
|
|
208
208
|
let n = e[t.parentIndex];
|
|
209
209
|
for (; n; ) {
|
|
210
210
|
if (n.footerCell)
|
|
@@ -212,7 +212,7 @@ const R = (e, t) => {
|
|
|
212
212
|
n = e[n.parentIndex];
|
|
213
213
|
}
|
|
214
214
|
return !1;
|
|
215
|
-
}, W = (e) => e.filter((t) =>
|
|
215
|
+
}, W = (e) => e.filter((t) => D(e, t) ? !1 : !!t.footerCell || !(t.children && t.children.length > 0)), X = {
|
|
216
216
|
number: function(e, t, n) {
|
|
217
217
|
return typeof e === w && e.toLowerCase() === "null" ? null : t.parseNumber(e, n);
|
|
218
218
|
},
|
|
@@ -231,15 +231,15 @@ const R = (e, t) => {
|
|
|
231
231
|
};
|
|
232
232
|
function M(e, t, n, r) {
|
|
233
233
|
return e.forEach((a) => {
|
|
234
|
-
a.expanded = t[r] && !t[r].includes(
|
|
234
|
+
a.expanded = t[r] && !t[r].includes(R(a, n)), a.items && a.items.length && (a.items = M(a.items, t, n, r + 1));
|
|
235
235
|
}), e;
|
|
236
236
|
}
|
|
237
237
|
function Y(e, t, n) {
|
|
238
238
|
return t && t.length && e.data.forEach((r) => {
|
|
239
|
-
r.expanded = r.expanded !== void 0 ? r.expanded : t[0] && !t[0].includes(
|
|
239
|
+
r.expanded = r.expanded !== void 0 ? r.expanded : t[0] && !t[0].includes(R(r, n)), r.items && r.items.length && (r.items = M(r.items, t, n, 1));
|
|
240
240
|
}), e;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function R(e, t) {
|
|
243
243
|
let n = e;
|
|
244
244
|
for (; n.items && n.items.length; )
|
|
245
245
|
n = n.items[0];
|
|
@@ -260,27 +260,35 @@ const J = (e) => {
|
|
|
260
260
|
var r, a;
|
|
261
261
|
const t = typeof e == "object" ? (r = e.enabled) != null ? r : !0 : e != null ? e : !1, n = typeof e == "object" ? (a = e.valueGetter) != null ? a : (l, i) => I(i)(l) : (l, i) => I(i)(l);
|
|
262
262
|
return { enabled: t, valueGetter: n };
|
|
263
|
+
}, ee = (e) => {
|
|
264
|
+
let t = 0;
|
|
265
|
+
if (e) {
|
|
266
|
+
const n = e.insertRow(0), r = n.insertCell(0);
|
|
267
|
+
r.textContent = " ", t = n.getBoundingClientRect().height, e.deleteRow(0);
|
|
268
|
+
}
|
|
269
|
+
return t;
|
|
263
270
|
};
|
|
264
271
|
export {
|
|
265
272
|
Y as applyExpandedState,
|
|
266
273
|
V as autoGenerateColumns,
|
|
274
|
+
ee as calcRowHeight,
|
|
267
275
|
z as checkPropCompatibility,
|
|
268
276
|
Q as firefox,
|
|
269
277
|
Z as firefoxMaxHeight,
|
|
270
|
-
|
|
278
|
+
b as flatData,
|
|
271
279
|
W as footerColumns,
|
|
272
280
|
P as getColSpan,
|
|
273
281
|
_ as getColumnWidth,
|
|
274
|
-
|
|
282
|
+
k as getDataAsArray,
|
|
275
283
|
J as getFlatColumnsState,
|
|
276
284
|
K as getIndex,
|
|
277
285
|
u as getNestedValue,
|
|
278
286
|
G as getRowSpanOptions,
|
|
279
|
-
|
|
280
|
-
|
|
287
|
+
R as groupedFirstItemValue,
|
|
288
|
+
B as isRtl,
|
|
281
289
|
q as isSorted,
|
|
282
290
|
U as mapColumns,
|
|
283
291
|
X as parsers,
|
|
284
|
-
|
|
292
|
+
N as readColumns,
|
|
285
293
|
H as sanitizeColumns
|
|
286
294
|
};
|
package/VirtualScrollFixed.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class f{constructor(t=0,i,h,e){this.total=t,this.offsets=[],this.heights=[];let s=0;for(let r=0;r<t;r++){this.offsets.push(s);const a=e&&e[r].expanded&&e[r].rowType==="data"?h:i;s+=a,this.heights.push(a)}}height(t){return this.heights[t]}index(t){if(t<0)return;const i=this.offsets.reduce((h,e,s)=>{if(h!==void 0)return h;if(e===t)return s;if(e>t)return s-1},void 0);return i===void 0?this.total-1:i}offset(t){return this.offsets[t]}totalHeight(){const t=this.offsets[this.offsets.length-1],i=this.heights[this.heights.length-1];return t+i}}class d{constructor(t){this.table=null,this.containerHeight=0,this.topCacheCount=0,this.attendedSkip=0,this.propsSkip=0,this.total=0,this.scrollableVirtual=!1,this.realSkip=0,this.pageSize=0,this.PageChange=null,this.fixedScroll=!1,this.askedSkip=void 0,this.tableTransform="",this.scrollSyncing=!1,this.lastLoaded=0,this.firstLoaded=0,this.lastScrollTop=0,this.firstLoaded=this.pageSize,this.lastLoaded=this.realSkip+this.pageSize,this.scrollHandler=this.scrollHandler.bind(this)}get container(){return this.containerRef}translate(t){this.scrollableVirtual&&this.table&&(this.table.style.transform="translateY("+t+"px)")}changePage(t,i){this.PageChange&&this.PageChange({skip:Math.max(0,t),take:this.pageSize},i)}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0))}scrollHandler(t){if(!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||!this.containerRef)return;if(this.scrollSyncing){this.scrollSyncing=!1;return}const i=this.container.scrollTop,h=this.lastScrollTop>=i,e=!h;this.lastScrollTop=i;let s=this.rowHeightService.index(i),r=this.rowHeightService.offset(s);const{offsetHeight:a}=this.containerRef,n=this.rowHeightService.index(i+a);if(e&&n>=this.lastLoaded&&this.lastLoaded<this.total){const o=s+this.pageSize-this.total;o>0&&(s=s-o,r=this.rowHeightService.offset(s)),this.firstLoaded=s,this.translate(r);const c=this.firstLoaded+this.pageSize;this.lastLoaded=Math.min(c,this.total),this.changePage(this.firstLoaded,t)}else if(h&&s<this.firstLoaded){const o=Math.floor(this.pageSize*.3);this.firstLoaded=Math.max(s-o,0),this.translate(this.rowHeightService.offset(this.firstLoaded)),this.lastLoaded=Math.min(this.firstLoaded+this.pageSize,this.total),this.changePage(this.firstLoaded,t)}}}exports.RowHeightService=f;exports.VirtualScrollFixed=d;
|
package/VirtualScrollFixed.mjs
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
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
|
-
class c {
|
|
9
|
-
constructor(t = 0, i, h, e) {
|
|
10
|
-
this.total = t, this.offsets = [], this.heights = [];
|
|
11
|
-
let s = 0;
|
|
12
|
-
for (let a = 0; a < t; a++) {
|
|
13
|
-
this.offsets.push(s);
|
|
14
|
-
const r = e && e[a].expanded && e[a].rowType === "data" ? h : i;
|
|
15
|
-
s += r, this.heights.push(r);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
height(t) {
|
|
19
|
-
return this.heights[t];
|
|
20
|
-
}
|
|
21
|
-
index(t) {
|
|
22
|
-
if (t < 0)
|
|
23
|
-
return;
|
|
24
|
-
const i = this.offsets.reduce(
|
|
25
|
-
(h, e, s) => {
|
|
26
|
-
if (h !== void 0)
|
|
27
|
-
return h;
|
|
28
|
-
if (e === t)
|
|
29
|
-
return s;
|
|
30
|
-
if (e > t)
|
|
31
|
-
return s - 1;
|
|
32
|
-
},
|
|
33
|
-
void 0
|
|
34
|
-
);
|
|
35
|
-
return i === void 0 ? this.total - 1 : i;
|
|
36
|
-
}
|
|
37
|
-
offset(t) {
|
|
38
|
-
return this.offsets[t];
|
|
39
|
-
}
|
|
40
|
-
totalHeight() {
|
|
41
|
-
const t = this.offsets[this.offsets.length - 1], i = this.heights[this.heights.length - 1];
|
|
42
|
-
return t + i;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
class d {
|
|
46
|
-
constructor(t) {
|
|
47
|
-
this.table = null, this.containerHeight = 0, this.topCacheCount = 0, this.attendedSkip = 0, this.propsSkip = 0, this.total = 0, this.scrollableVirtual = !1, this.realSkip = 0, this.pageSize = 0, this.PageChange = null, this.fixedScroll = !1, this.askedSkip = void 0, this.tableTransform = "", this.scrollSyncing = !1, this.lastLoaded = 0, this.firstLoaded = 0, this.lastScrollTop = 0, this.firstLoaded = this.pageSize, this.lastLoaded = this.realSkip + this.pageSize, this.scrollHandler = this.scrollHandler.bind(this);
|
|
48
|
-
}
|
|
49
|
-
get container() {
|
|
50
|
-
return this.containerRef;
|
|
51
|
-
}
|
|
52
|
-
translate(t) {
|
|
53
|
-
this.scrollableVirtual && this.table && (this.table.style.transform = "translateY(" + t + "px)");
|
|
54
|
-
}
|
|
55
|
-
changePage(t, i) {
|
|
56
|
-
this.PageChange && this.PageChange({ skip: Math.max(0, t), take: this.pageSize }, i);
|
|
57
|
-
}
|
|
58
|
-
reset() {
|
|
59
|
-
this.scrollSyncing = !0, !this.fixedScroll && (this.container && (this.container.scrollTop = 0), this.translate(0));
|
|
60
|
-
}
|
|
61
|
-
scrollHandler(t) {
|
|
62
|
-
if (!this.scrollableVirtual || !this.container || !this.table || !this.rowHeightService || !this.containerRef)
|
|
63
|
-
return;
|
|
64
|
-
if (this.scrollSyncing) {
|
|
65
|
-
this.scrollSyncing = !1;
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
const i = this.container.scrollTop, h = this.lastScrollTop >= i, e = !h;
|
|
69
|
-
this.lastScrollTop = i;
|
|
70
|
-
let s = this.rowHeightService.index(i), a = this.rowHeightService.offset(s);
|
|
71
|
-
const { offsetHeight: r } = this.containerRef, n = this.rowHeightService.index(i + r);
|
|
72
|
-
if (e && n >= this.lastLoaded && this.lastLoaded < this.total) {
|
|
73
|
-
const o = s + this.pageSize - this.total;
|
|
74
|
-
o > 0 && (s = s - o, a = this.rowHeightService.offset(s)), this.firstLoaded = s, this.translate(a);
|
|
75
|
-
const f = this.firstLoaded + this.pageSize;
|
|
76
|
-
this.lastLoaded = Math.min(f, this.total), this.changePage(this.firstLoaded, t);
|
|
77
|
-
} else if (h && s < this.firstLoaded) {
|
|
78
|
-
const o = Math.floor(this.pageSize * 0.3);
|
|
79
|
-
this.firstLoaded = Math.max(s - o, 0), this.translate(this.rowHeightService.offset(this.firstLoaded)), this.lastLoaded = Math.min(this.firstLoaded + this.pageSize, this.total), this.changePage(this.firstLoaded, t);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
export {
|
|
84
|
-
c as RowHeightService,
|
|
85
|
-
d as VirtualScrollFixed
|
|
86
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=()=>typeof document!="undefined"?document:{};class r{get scrollbarWidth(){const o=t();if(!this.scrollbar&&o&&o.createElement){const e=o.createElement("div");e.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",e.innerHTML=" ",o.body.appendChild(e),this.scrollbar=e.offsetWidth-e.scrollWidth,o.body.removeChild(e)}return this.scrollbar}}exports.BrowserSupportService=r;
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
const t = () => typeof document != "undefined" ? document : {};
|
|
9
|
-
class l {
|
|
10
|
-
get scrollbarWidth() {
|
|
11
|
-
const o = t();
|
|
12
|
-
if (!this.scrollbar && o && o.createElement) {
|
|
13
|
-
const e = o.createElement("div");
|
|
14
|
-
e.style.cssText = "overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block", e.innerHTML = " ", o.body.appendChild(e), this.scrollbar = e.offsetWidth - e.scrollWidth, o.body.removeChild(e);
|
|
15
|
-
}
|
|
16
|
-
return this.scrollbar;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export {
|
|
20
|
-
l as BrowserSupportService
|
|
21
|
-
};
|