@progress/kendo-react-grid 9.0.0-develop.9 → 9.0.1-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Grid.js +1 -1
- package/Grid.mjs +927 -1042
- package/GridNoRecords.js +1 -1
- package/GridNoRecords.mjs +7 -14
- package/GridToolbar.js +1 -1
- package/GridToolbar.mjs +23 -28
- package/VirtualScroll.js +1 -1
- package/VirtualScroll.mjs +53 -51
- package/VirtualScrollFixed.js +1 -1
- package/VirtualScrollFixed.mjs +16 -14
- package/cells/GridFilterCell.js +1 -1
- package/cells/GridFilterCell.mjs +99 -113
- package/columnMenu/GridColumnMenuCheckboxFilter.js +1 -1
- package/columnMenu/GridColumnMenuCheckboxFilter.mjs +132 -178
- package/columnMenu/GridColumnMenuFilter.js +1 -1
- package/columnMenu/GridColumnMenuFilter.mjs +123 -156
- package/columnMenu/GridColumnMenuFilterCell.js +1 -1
- package/columnMenu/GridColumnMenuFilterCell.mjs +42 -53
- package/columnMenu/GridColumnMenuFilterUI.js +1 -1
- package/columnMenu/GridColumnMenuFilterUI.mjs +15 -17
- package/columnMenu/GridColumnMenuGroup.js +1 -1
- package/columnMenu/GridColumnMenuGroup.mjs +29 -40
- package/columnMenu/GridColumnMenuItemContent.js +1 -1
- package/columnMenu/GridColumnMenuItemContent.mjs +7 -20
- package/columnMenu/GridColumnMenuItemGroup.js +1 -1
- package/columnMenu/GridColumnMenuItemGroup.mjs +7 -20
- package/columnMenu/GridColumnMenuSort.js +1 -1
- package/columnMenu/GridColumnMenuSort.mjs +42 -53
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/drag/ColumnDraggable.js +1 -1
- package/drag/ColumnDraggable.mjs +34 -45
- package/drag/GroupingIndicator.js +1 -1
- package/drag/GroupingIndicator.mjs +51 -69
- package/footer/Footer.js +1 -1
- package/footer/Footer.mjs +40 -57
- package/header/FilterRow.js +1 -1
- package/header/FilterRow.mjs +70 -78
- package/header/GridHeaderSelectionCell.js +1 -1
- package/header/GridHeaderSelectionCell.mjs +28 -37
- package/header/GroupPanel.js +1 -1
- package/header/GroupPanel.mjs +43 -49
- package/header/Header.js +1 -1
- package/header/Header.mjs +70 -89
- package/index.d.mts +261 -725
- package/index.d.ts +261 -725
- package/index.js +1 -1
- package/index.mjs +78 -80
- package/package-metadata.mjs +1 -1
- package/package.json +11 -11
- package/rows/GridDetailRow.js +1 -1
- package/rows/GridDetailRow.mjs +2 -10
package/GridNoRecords.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@progress/kendo-react-intl"),e=require("./messages/index.js"),o=r=>{const n=t.useLocalization();return r.children||n.toLanguageString(e.noRecords,e.messages[e.noRecords])};o.displayName="KendoReactGridNoRecords";exports.GridNoRecords=o;
|
package/GridNoRecords.mjs
CHANGED
|
@@ -6,20 +6,13 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
render() {
|
|
17
|
-
return this.props.children || i(this).toLanguageString(o, a[o]);
|
|
18
|
-
}
|
|
9
|
+
import { useLocalization as i } from "@progress/kendo-react-intl";
|
|
10
|
+
import { noRecords as o, messages as t } from "./messages/index.mjs";
|
|
11
|
+
const n = (e) => {
|
|
12
|
+
const r = i();
|
|
13
|
+
return e.children || r.toLanguageString(o, t[o]);
|
|
19
14
|
};
|
|
20
|
-
|
|
21
|
-
let e = t;
|
|
22
|
-
s(e);
|
|
15
|
+
n.displayName = "KendoReactGridNoRecords";
|
|
23
16
|
export {
|
|
24
|
-
|
|
17
|
+
n as GridNoRecords
|
|
25
18
|
};
|
package/GridToolbar.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),r=require("@progress/kendo-react-common");function s(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:()=>o[t]})}}return e.default=o,Object.freeze(e)}const b=s(i),l=o=>{const{size:e,className:t,ariaLabel:a,ariaControls:n,children:c}=o;return b.createElement("div",{className:r.classNames("k-toolbar k-grid-toolbar k-toolbar-solid",{"k-toolbar-md":!e,[`k-toolbar-${r.kendoThemeMaps.sizeMap[e]||e}`]:e},t),"aria-label":a,"aria-controls":n,role:"toolbar"},c)};l.displayName="KendoReactGridToolbar";exports.GridToolbar=l;
|
package/GridToolbar.mjs
CHANGED
|
@@ -6,34 +6,29 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { classNames as
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
this.props.children
|
|
32
|
-
);
|
|
33
|
-
}
|
|
9
|
+
import * as s from "react";
|
|
10
|
+
import { classNames as i, kendoThemeMaps as c } from "@progress/kendo-react-common";
|
|
11
|
+
const m = (o) => {
|
|
12
|
+
const { size: a, className: r, ariaLabel: e, ariaControls: l, children: t } = o;
|
|
13
|
+
return /* @__PURE__ */ s.createElement(
|
|
14
|
+
"div",
|
|
15
|
+
{
|
|
16
|
+
className: i(
|
|
17
|
+
"k-toolbar k-grid-toolbar k-toolbar-solid",
|
|
18
|
+
{
|
|
19
|
+
"k-toolbar-md": !a,
|
|
20
|
+
[`k-toolbar-${c.sizeMap[a] || a}`]: a
|
|
21
|
+
},
|
|
22
|
+
r
|
|
23
|
+
),
|
|
24
|
+
"aria-label": e,
|
|
25
|
+
"aria-controls": l,
|
|
26
|
+
role: "toolbar"
|
|
27
|
+
},
|
|
28
|
+
t
|
|
29
|
+
);
|
|
34
30
|
};
|
|
35
|
-
|
|
36
|
-
let e = s;
|
|
31
|
+
m.displayName = "KendoReactGridToolbar";
|
|
37
32
|
export {
|
|
38
|
-
|
|
33
|
+
m as GridToolbar
|
|
39
34
|
};
|
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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react");function g(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:()=>r[t]})}}return i.default=r,Object.freeze(i)}const u=g(p);class f{constructor(i){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.tableBodyRef=null,this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=null,this.tableTransform="",this.prevScrollPos=0,this.tableTranslate=0,this.scrollSyncing=!1,this.reactVersion=Number.parseFloat(u.version),this.topItems=(t,s)=>{if(!this.container||s)return{topItemsCount:0,topItemsHeight:0};const l=this.container.clientHeight,e=Math.ceil(l/t[0].line),n=Math.ceil((t.length-e)/2);let o=0;for(let a=0;a<n;a++)o+=t[a].line+t[a].acc;return{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:e+e/2}},this.horizontalScrollbarHeight=()=>this.container?this.container.offsetHeight-this.container.clientHeight:0,i&&(this.topCacheCount=4,this.attendedSkip=-this.topCacheCount),this.scrollHandler=this.scrollHandler.bind(this)}get container(){var i;return(i=this.containerRef)==null?void 0:i.current}get rowHeights(){var l,e;const i=[],t=((l=this.tableBodyRef)==null?void 0:l.current)&&((e=this.tableBodyRef)==null?void 0:e.current.children)||[];let s=0;for(let n=0;n<t.length;n++){if(t[n].className.indexOf("k-grouping-row")>-1){s+=t[n].scrollHeight;continue}t[n].className.indexOf("k-detail-row")>-1?i[i.length-1].line+=t[n].scrollHeight:(i.push({line:t[n].scrollHeight,acc:s}),s=0)}return i}changePage(i,t){this.attendedSkip=i-this.topCacheCount,this.PageChange&&this.PageChange({skip:Math.max(0,i-this.topCacheCount),take:this.pageSize},t)}translate(i,t){this.tableTranslate=i,this.scrollableVirtual&&this.table&&(this.reactVersion<=17||t?this.table.style.transform="translateY("+i+"px)":this.tableTransform="translateY("+i+"px)")}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}localScrollUp(i){if(!this.container)return;const t=this.rowHeights,s=this.container.scrollTop;let l=this.tableTranslate,e=0;const{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:a}=this.topItems(t,!!this.topCacheCount),h=s-l;if(!(h>o||t.length<=a)){for(;e<this.topCacheCount+this.attendedSkip-this.realSkip+n&&this.propsSkip-e>0&&!(l+(t[t.length-1-e].line+t[t.length-1-e].acc)+h<=s);)l-=t[t.length-1-e].line+t[t.length-1-e].acc,e++;if(e===0&&this.topCacheCount===0&&this.attendedSkip>0&&(l=Math.max(l-t[0].line,0),e=1),this.propsSkip-e<=0&&l>s){this.translate(0),this.changePage(0,i),this.container.scrollTop=0;return}if(l>s&&(l=s),l!==this.tableTranslate){this.translate(Math.max(0,l-o));const c=Math.max(0,this.propsSkip-e-n);this.changePage(c,i)}}}localScrollDown(i){if(!this.container)return;const t=this.rowHeights,s=this.container.scrollTop;let l=this.tableTranslate,e=0;const{topItemsCount:n,topItemsHeight:o,itemsNeededOnScreen:a}=this.topItems(t,!!this.topCacheCount);for(;e<t.length-this.topCacheCount&&!(l+t[e].line+t[e].acc>s);)l+=t[e].line+t[e].acc,e++;n>this.propsSkip+e||t.length<=a||(e>=t.length-this.topCacheCount&&this.propsSkip+e>=this.total?(this.translate(l-o),this.changePage(this.total-1-n,i)):l!==this.tableTranslate&&this.propsSkip+e-n!==this.propsSkip&&(this.translate(l-o),this.changePage(this.propsSkip+e-n,i)))}scrollNonStrict(i){const t=this.total*this.prevScrollPos/this.containerHeight;let s=Math.floor(t);s>=this.total&&(s=this.total-1);const l=Math.min(t-s,1);let e=0;const n=s-this.propsSkip,o=this.rowHeights;n>=0&&n<=1?e=-((o[0].line+o[0].acc)*l):n===-1&&(e=-((o[o.length-1].line+o[o.length-1].acc)*l));const{topItemsCount:a,topItemsHeight:h}=this.topItems(o,!!this.topCacheCount);this.translate(Math.max(0,e-h-this.horizontalScrollbarHeight()+this.containerHeight*t/this.total)),this.changePage(s-a,i)}scrollHandler(i){if(!this.scrollableVirtual)return;if(this.scrollSyncing||!this.container||!this.table){this.scrollSyncing=!1;return}const t=this.container.scrollTop,s=this.prevScrollPos;if(this.prevScrollPos=t,this.askedSkip!==void 0){this.translate(this.containerHeight*this.askedSkip/this.total),this.changePage(this.askedSkip,i),this.prevScrollPos=t,this.askedSkip=void 0;return}t-s<0&&t>this.tableTranslate-this.table.scrollHeight/10?this.localScrollUp(i):t-s>0&&t<this.tableTranslate+this.table.scrollHeight*2/3?this.localScrollDown(i):this.scrollNonStrict(i),this.prevScrollPos=t}}exports.VirtualScroll=f;
|
package/VirtualScroll.mjs
CHANGED
|
@@ -6,112 +6,114 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
9
|
+
import * as c from "react";
|
|
10
10
|
class g {
|
|
11
|
-
constructor(
|
|
12
|
-
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.tableBodyRef =
|
|
11
|
+
constructor(i) {
|
|
12
|
+
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.tableBodyRef = null, this.fixedScroll = !1, this.askedSkip = void 0, this.containerRef = null, this.tableTransform = "", this.prevScrollPos = 0, this.tableTranslate = 0, this.scrollSyncing = !1, this.reactVersion = Number.parseFloat(c.version), this.topItems = (t, l) => {
|
|
13
13
|
if (!this.container || l)
|
|
14
14
|
return { topItemsCount: 0, topItemsHeight: 0 };
|
|
15
|
-
const
|
|
16
|
-
let
|
|
17
|
-
for (let a = 0; a <
|
|
18
|
-
|
|
15
|
+
const s = this.container.clientHeight, e = Math.ceil(s / t[0].line), o = Math.ceil((t.length - e) / 2);
|
|
16
|
+
let n = 0;
|
|
17
|
+
for (let a = 0; a < o; a++)
|
|
18
|
+
n += t[a].line + t[a].acc;
|
|
19
19
|
return {
|
|
20
|
-
topItemsCount:
|
|
21
|
-
topItemsHeight:
|
|
20
|
+
topItemsCount: o,
|
|
21
|
+
topItemsHeight: n,
|
|
22
22
|
itemsNeededOnScreen: e + e / 2
|
|
23
23
|
};
|
|
24
|
-
}, this.horizontalScrollbarHeight = () => this.container ? this.container.offsetHeight - this.container.clientHeight : 0,
|
|
24
|
+
}, this.horizontalScrollbarHeight = () => this.container ? this.container.offsetHeight - this.container.clientHeight : 0, i && (this.topCacheCount = 4, this.attendedSkip = -this.topCacheCount), this.scrollHandler = this.scrollHandler.bind(this);
|
|
25
25
|
}
|
|
26
26
|
get container() {
|
|
27
|
-
|
|
27
|
+
var i;
|
|
28
|
+
return (i = this.containerRef) == null ? void 0 : i.current;
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
31
|
* @return - The row heights in an array.
|
|
31
32
|
*/
|
|
32
33
|
get rowHeights() {
|
|
33
|
-
|
|
34
|
+
var s, e;
|
|
35
|
+
const i = [], t = ((s = this.tableBodyRef) == null ? void 0 : s.current) && ((e = this.tableBodyRef) == null ? void 0 : e.current.children) || [];
|
|
34
36
|
let l = 0;
|
|
35
|
-
for (let
|
|
36
|
-
if (t[
|
|
37
|
-
l += t[
|
|
37
|
+
for (let o = 0; o < t.length; o++) {
|
|
38
|
+
if (t[o].className.indexOf("k-grouping-row") > -1) {
|
|
39
|
+
l += t[o].scrollHeight;
|
|
38
40
|
continue;
|
|
39
41
|
}
|
|
40
|
-
t[
|
|
41
|
-
line: t[
|
|
42
|
+
t[o].className.indexOf("k-detail-row") > -1 ? i[i.length - 1].line += t[o].scrollHeight : (i.push({
|
|
43
|
+
line: t[o].scrollHeight,
|
|
42
44
|
acc: l
|
|
43
45
|
}), l = 0);
|
|
44
46
|
}
|
|
45
|
-
return
|
|
47
|
+
return i;
|
|
46
48
|
}
|
|
47
|
-
changePage(
|
|
48
|
-
this.attendedSkip =
|
|
49
|
+
changePage(i, t) {
|
|
50
|
+
this.attendedSkip = i - this.topCacheCount, this.PageChange && this.PageChange(
|
|
49
51
|
{
|
|
50
|
-
skip: Math.max(0,
|
|
52
|
+
skip: Math.max(0, i - this.topCacheCount),
|
|
51
53
|
take: this.pageSize
|
|
52
54
|
},
|
|
53
55
|
t
|
|
54
56
|
);
|
|
55
57
|
}
|
|
56
|
-
translate(
|
|
57
|
-
this.tableTranslate =
|
|
58
|
+
translate(i, t) {
|
|
59
|
+
this.tableTranslate = i, this.scrollableVirtual && this.table && (this.reactVersion <= 17 || t ? this.table.style.transform = "translateY(" + i + "px)" : this.tableTransform = "translateY(" + i + "px)");
|
|
58
60
|
}
|
|
59
61
|
reset() {
|
|
60
62
|
this.scrollSyncing = !0, !this.fixedScroll && (this.container && (this.container.scrollTop = 0), this.translate(0, !0));
|
|
61
63
|
}
|
|
62
|
-
localScrollUp(
|
|
64
|
+
localScrollUp(i) {
|
|
63
65
|
if (!this.container)
|
|
64
66
|
return;
|
|
65
67
|
const t = this.rowHeights, l = this.container.scrollTop;
|
|
66
|
-
let
|
|
67
|
-
const { topItemsCount:
|
|
68
|
+
let s = this.tableTranslate, e = 0;
|
|
69
|
+
const { topItemsCount: o, topItemsHeight: n, itemsNeededOnScreen: a } = this.topItems(
|
|
68
70
|
t,
|
|
69
71
|
!!this.topCacheCount
|
|
70
|
-
), h = l -
|
|
71
|
-
if (!(h >
|
|
72
|
-
for (; e < this.topCacheCount + this.attendedSkip - this.realSkip +
|
|
73
|
-
|
|
74
|
-
if (e === 0 && this.topCacheCount === 0 && this.attendedSkip > 0 && (
|
|
75
|
-
this.translate(0), this.changePage(0,
|
|
72
|
+
), h = l - s;
|
|
73
|
+
if (!(h > n || t.length <= a)) {
|
|
74
|
+
for (; e < this.topCacheCount + this.attendedSkip - this.realSkip + o && this.propsSkip - e > 0 && !(s + (t[t.length - 1 - e].line + t[t.length - 1 - e].acc) + h <= l); )
|
|
75
|
+
s -= t[t.length - 1 - e].line + t[t.length - 1 - e].acc, e++;
|
|
76
|
+
if (e === 0 && this.topCacheCount === 0 && this.attendedSkip > 0 && (s = Math.max(s - t[0].line, 0), e = 1), this.propsSkip - e <= 0 && s > l) {
|
|
77
|
+
this.translate(0), this.changePage(0, i), this.container.scrollTop = 0;
|
|
76
78
|
return;
|
|
77
79
|
}
|
|
78
|
-
if (
|
|
79
|
-
this.translate(Math.max(0,
|
|
80
|
-
const
|
|
81
|
-
this.changePage(
|
|
80
|
+
if (s > l && (s = l), s !== this.tableTranslate) {
|
|
81
|
+
this.translate(Math.max(0, s - n));
|
|
82
|
+
const r = Math.max(0, this.propsSkip - e - o);
|
|
83
|
+
this.changePage(r, i);
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
|
-
localScrollDown(
|
|
87
|
+
localScrollDown(i) {
|
|
86
88
|
if (!this.container)
|
|
87
89
|
return;
|
|
88
90
|
const t = this.rowHeights, l = this.container.scrollTop;
|
|
89
|
-
let
|
|
90
|
-
const { topItemsCount:
|
|
91
|
+
let s = this.tableTranslate, e = 0;
|
|
92
|
+
const { topItemsCount: o, topItemsHeight: n, itemsNeededOnScreen: a } = this.topItems(
|
|
91
93
|
t,
|
|
92
94
|
!!this.topCacheCount
|
|
93
95
|
);
|
|
94
|
-
for (; e < t.length - this.topCacheCount && !(
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
for (; e < t.length - this.topCacheCount && !(s + t[e].line + t[e].acc > l); )
|
|
97
|
+
s += t[e].line + t[e].acc, e++;
|
|
98
|
+
o > this.propsSkip + e || t.length <= a || (e >= t.length - this.topCacheCount && this.propsSkip + e >= this.total ? (this.translate(s - n), this.changePage(this.total - 1 - o, i)) : s !== this.tableTranslate && this.propsSkip + e - o !== this.propsSkip && (this.translate(s - n), this.changePage(this.propsSkip + e - o, i)));
|
|
97
99
|
}
|
|
98
|
-
scrollNonStrict(
|
|
100
|
+
scrollNonStrict(i) {
|
|
99
101
|
const t = this.total * this.prevScrollPos / this.containerHeight;
|
|
100
102
|
let l = Math.floor(t);
|
|
101
103
|
l >= this.total && (l = this.total - 1);
|
|
102
|
-
const
|
|
104
|
+
const s = Math.min(t - l, 1);
|
|
103
105
|
let e = 0;
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
const { topItemsCount: a, topItemsHeight: h } = this.topItems(
|
|
106
|
+
const o = l - this.propsSkip, n = this.rowHeights;
|
|
107
|
+
o >= 0 && o <= 1 ? e = -((n[0].line + n[0].acc) * s) : o === -1 && (e = -((n[n.length - 1].line + n[n.length - 1].acc) * s));
|
|
108
|
+
const { topItemsCount: a, topItemsHeight: h } = this.topItems(n, !!this.topCacheCount);
|
|
107
109
|
this.translate(
|
|
108
110
|
Math.max(
|
|
109
111
|
0,
|
|
110
112
|
e - h - this.horizontalScrollbarHeight() + this.containerHeight * t / this.total
|
|
111
113
|
)
|
|
112
|
-
), this.changePage(l - a,
|
|
114
|
+
), this.changePage(l - a, i);
|
|
113
115
|
}
|
|
114
|
-
scrollHandler(
|
|
116
|
+
scrollHandler(i) {
|
|
115
117
|
if (!this.scrollableVirtual)
|
|
116
118
|
return;
|
|
117
119
|
if (this.scrollSyncing || !this.container || !this.table) {
|
|
@@ -120,10 +122,10 @@ class g {
|
|
|
120
122
|
}
|
|
121
123
|
const t = this.container.scrollTop, l = this.prevScrollPos;
|
|
122
124
|
if (this.prevScrollPos = t, this.askedSkip !== void 0) {
|
|
123
|
-
this.translate(this.containerHeight * this.askedSkip / this.total), this.changePage(this.askedSkip,
|
|
125
|
+
this.translate(this.containerHeight * this.askedSkip / this.total), this.changePage(this.askedSkip, i), this.prevScrollPos = t, this.askedSkip = void 0;
|
|
124
126
|
return;
|
|
125
127
|
}
|
|
126
|
-
t - l < 0 && t > this.tableTranslate - this.table.scrollHeight / 10 ? this.localScrollUp(
|
|
128
|
+
t - l < 0 && t > this.tableTranslate - this.table.scrollHeight / 10 ? this.localScrollUp(i) : t - l > 0 && t < this.tableTranslate + this.table.scrollHeight * 2 / 3 ? this.localScrollDown(i) : this.scrollNonStrict(i), this.prevScrollPos = t;
|
|
127
129
|
}
|
|
128
130
|
}
|
|
129
131
|
export {
|
package/VirtualScrollFixed.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),g=require("./utils/index.js");function u(s){const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),g=require("./utils/index.js");function u(s){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(t,e,a.get?a:{enumerable:!0,get:()=>s[e]})}}return t.default=s,Object.freeze(t)}const p=u(d);class S{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.tableBodyRef=null,this.fixedScroll=!1,this.askedSkip=void 0,this.containerRef=null,this.tableTransform="",this.scrollSyncing=!1,this.lastLoaded=0,this.firstLoaded=0,this.lastScrollTop=0,this.reactVersion=Number.parseFloat(p.version),this.firstLoaded=this.pageSize,this.lastLoaded=this.realSkip+this.pageSize,this.scrollHandler=this.scrollHandler.bind(this)}get container(){var t;return((t=this.containerRef)==null?void 0:t.current)||void 0}translate(t,e){this.scrollableVirtual&&this.table&&(g.firefox||this.reactVersion<=17||e?this.table.style.transform="translateY("+t+"px)":this.tableTransform="translateY("+t+"px)")}changePage(t,e){this.PageChange&&this.PageChange({skip:Math.max(0,t),take:this.pageSize},e)}reset(){this.scrollSyncing=!0,!this.fixedScroll&&(this.container&&(this.container.scrollTop=0),this.translate(0,!0))}scrollHandler(t){var o;if(!this.scrollableVirtual||!this.container||!this.table||!this.rowHeightService||!((o=this.containerRef)!=null&&o.current))return;if(this.scrollSyncing){this.scrollSyncing=!1;return}const e=this.container.scrollTop,a=this.lastScrollTop>=e,n=!a;this.lastScrollTop=e;let i=this.rowHeightService.index(e),l=this.rowHeightService.offset(i);const{offsetHeight:h}=this.containerRef.current,c=this.rowHeightService.index(e+h);if(n&&c>=this.lastLoaded&&this.lastLoaded<this.total){const r=i+this.pageSize-this.total;r>0&&(i=i-r,l=this.rowHeightService.offset(i)),this.firstLoaded=i,this.translate(l);const f=this.firstLoaded+this.pageSize;this.lastLoaded=Math.min(f,this.total),this.changePage(this.firstLoaded,t)}else if(a&&i<this.firstLoaded){const r=Math.floor(this.pageSize*.3);this.firstLoaded=Math.max(i-r,0),this.translate(this.rowHeightService.offset(this.firstLoaded)),this.lastLoaded=Math.min(this.firstLoaded+this.pageSize,this.total),this.changePage(this.firstLoaded,t)}}}exports.VirtualScrollFixed=S;
|
package/VirtualScrollFixed.mjs
CHANGED
|
@@ -6,17 +6,18 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { firefox as
|
|
11
|
-
class
|
|
9
|
+
import * as f from "react";
|
|
10
|
+
import { firefox as d } from "./utils/index.mjs";
|
|
11
|
+
class S {
|
|
12
12
|
constructor(t) {
|
|
13
|
-
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.tableBodyRef =
|
|
13
|
+
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.tableBodyRef = null, this.fixedScroll = !1, this.askedSkip = void 0, this.containerRef = null, this.tableTransform = "", this.scrollSyncing = !1, this.lastLoaded = 0, this.firstLoaded = 0, this.lastScrollTop = 0, this.reactVersion = Number.parseFloat(f.version), this.firstLoaded = this.pageSize, this.lastLoaded = this.realSkip + this.pageSize, this.scrollHandler = this.scrollHandler.bind(this);
|
|
14
14
|
}
|
|
15
15
|
get container() {
|
|
16
|
-
|
|
16
|
+
var t;
|
|
17
|
+
return ((t = this.containerRef) == null ? void 0 : t.current) || void 0;
|
|
17
18
|
}
|
|
18
19
|
translate(t, i) {
|
|
19
|
-
this.scrollableVirtual && this.table && (
|
|
20
|
+
this.scrollableVirtual && this.table && (d || this.reactVersion <= 17 || i ? this.table.style.transform = "translateY(" + t + "px)" : this.tableTransform = "translateY(" + t + "px)");
|
|
20
21
|
}
|
|
21
22
|
changePage(t, i) {
|
|
22
23
|
this.PageChange && this.PageChange({ skip: Math.max(0, t), take: this.pageSize }, i);
|
|
@@ -25,27 +26,28 @@ class p {
|
|
|
25
26
|
this.scrollSyncing = !0, !this.fixedScroll && (this.container && (this.container.scrollTop = 0), this.translate(0, !0));
|
|
26
27
|
}
|
|
27
28
|
scrollHandler(t) {
|
|
28
|
-
|
|
29
|
+
var h;
|
|
30
|
+
if (!this.scrollableVirtual || !this.container || !this.table || !this.rowHeightService || !((h = this.containerRef) != null && h.current))
|
|
29
31
|
return;
|
|
30
32
|
if (this.scrollSyncing) {
|
|
31
33
|
this.scrollSyncing = !1;
|
|
32
34
|
return;
|
|
33
35
|
}
|
|
34
|
-
const i = this.container.scrollTop,
|
|
36
|
+
const i = this.container.scrollTop, a = this.lastScrollTop >= i, l = !a;
|
|
35
37
|
this.lastScrollTop = i;
|
|
36
|
-
let e = this.rowHeightService.index(i),
|
|
37
|
-
const { offsetHeight:
|
|
38
|
-
if (
|
|
38
|
+
let e = this.rowHeightService.index(i), r = this.rowHeightService.offset(e);
|
|
39
|
+
const { offsetHeight: o } = this.containerRef.current, n = this.rowHeightService.index(i + o);
|
|
40
|
+
if (l && n >= this.lastLoaded && this.lastLoaded < this.total) {
|
|
39
41
|
const s = e + this.pageSize - this.total;
|
|
40
|
-
s > 0 && (e = e - s,
|
|
42
|
+
s > 0 && (e = e - s, r = this.rowHeightService.offset(e)), this.firstLoaded = e, this.translate(r);
|
|
41
43
|
const c = this.firstLoaded + this.pageSize;
|
|
42
44
|
this.lastLoaded = Math.min(c, this.total), this.changePage(this.firstLoaded, t);
|
|
43
|
-
} else if (
|
|
45
|
+
} else if (a && e < this.firstLoaded) {
|
|
44
46
|
const s = Math.floor(this.pageSize * 0.3);
|
|
45
47
|
this.firstLoaded = Math.max(e - s, 0), this.translate(this.rowHeightService.offset(this.firstLoaded)), this.lastLoaded = Math.min(this.firstLoaded + this.pageSize, this.total), this.changePage(this.firstLoaded, t);
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
51
|
export {
|
|
50
|
-
|
|
52
|
+
S as VirtualScrollFixed
|
|
51
53
|
};
|
package/cells/GridFilterCell.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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),D=require("@progress/kendo-react-buttons"),m=require("@progress/kendo-react-dropdowns"),C=require("@progress/kendo-react-inputs"),E=require("@progress/kendo-react-dateinputs"),u=require("../messages/index.js"),O=require("@progress/kendo-react-intl"),h=require("@progress/kendo-svg-icons"),g=require("../filterCommon.js"),y=require("@progress/kendo-react-common");function L(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const c in e)if(c!=="default"){const s=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(t,c,s.get?s:{enumerable:!0,get:()=>e[c]})}}return t.default=e,Object.freeze(t)}const r=L(z),R=e=>{const t=r.useRef(),c=O.useLocalization(),s=()=>{if(e.filterType==="boolean")return;let n;const l=e.operators.find(o=>o.operator===e.operator)||null;return r.createElement(m.DropDownList,{ref:o=>n=o,size:e.size,value:l,onChange:b,className:"k-dropdown-operator",iconClassName:"k-i-filter k-icon",svgIcon:h.filterIcon,data:e.operators,textField:"text",title:c.toLanguageString(u.filterChooseOperator,u.messages[u.filterChooseOperator]),popupSettings:{width:"",onMouseDownOutside:function(o){!o.isAnchorClicked&&o.state&&o.state.props.show&&n&&n.togglePopup()}}})},d=(n,l)=>{g.cellInputChange(n,l,e)},b=n=>{g.cellOperatorChange(n,e.value,e.onChange)},k=n=>{g.cellBoolDropdownChange(n,e.onChange)},v=n=>{n.preventDefault(),e.onChange({value:"",operator:"",syntheticEvent:n}),t.current&&(t.current.element.value="",setTimeout(()=>{t.current.element.focus()},0))},w=(n,l,o)=>{switch(n){case"numeric":return r.createElement(C.NumericTextBox,{ref:t,size:e.size,value:l,onChange:a=>{d(a.value,a.syntheticEvent)},title:e.title,ariaLabel:e.ariaLabel});case"date":return r.createElement(E.DatePicker,{ref:t,size:e.size,value:l,onChange:a=>{d(a.value,a.syntheticEvent)},title:e.title,ariaLabel:e.ariaLabel,popupSettings:{onMouseDownOutside:a=>{!a.isAnchorClicked&&a.state&&a.state.props.show&&t&&t.current.togglePopup()}}});case"boolean":{const a=i=>i==null;return r.createElement(m.DropDownList,{ref:t,size:e.size,onChange:k,value:o.find(i=>i.operator===(a(l)?"":l)),data:o,textField:"text",title:e.title,ariaLabel:e.ariaLabel,popupSettings:{onMouseDownOutside:i=>{!i.isAnchorClicked&&i.state&&i.state.props.show&&t&&t.current.togglePopup()}}})}default:return r.createElement(C.TextBox,{ref:t,size:e.size,value:l||"",onChange:a=>{d(a.target.value,a.syntheticEvent)},title:e.title,"aria-label":e.ariaLabel})}},f=r.createElement("div",{className:"k-filtercell"},r.createElement("div",{className:"k-filtercell-wrapper"},w(e.filterType,e.value,e.booleanValues),r.createElement("div",{className:"k-filtercell-operator"},s()," ",r.createElement(D.Button,{size:e.size,icon:"filter-clear",svgIcon:h.filterClearIcon,className:y.classNames({"k-clear-button-visible":!!(!(e.value===null||e.value==="")||e.operator)}),title:c.toLanguageString(u.filterClearButton,u.messages[u.filterClearButton]),type:"button",onClick:v,disabled:!(!(e.value===null||e.value==="")||e.operator)}))));return e.render?e.render.call(void 0,f,e):f};exports.GridFilterCell=R;
|