@progress/kendo-react-dropdowns 7.5.0-develop.9 → 8.0.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/ComboBox/ComboBox.js +1 -1
- package/ComboBox/ComboBox.mjs +6 -6
- package/DropDownList/DropDownList.js +1 -1
- package/DropDownList/DropDownList.mjs +2 -2
- package/MultiSelect/MultiSelect.js +1 -1
- package/MultiSelect/MultiSelect.mjs +4 -5
- package/common/DropDownBase.js +1 -1
- package/common/DropDownBase.mjs +109 -105
- package/common/VirtualScrollStatic.js +8 -0
- package/common/VirtualScrollStatic.mjs +77 -0
- package/dist/cdn/js/kendo-react-dropdowns.js +1 -1
- package/index.d.mts +23 -18
- package/index.d.ts +23 -18
- package/package-metadata.mjs +1 -1
- package/package.json +10 -10
- package/common/VirtualScroll.js +0 -8
- package/common/VirtualScroll.mjs +0 -75
package/index.d.mts
CHANGED
|
@@ -15,6 +15,7 @@ import { LocalizationService } from '@progress/kendo-react-intl';
|
|
|
15
15
|
import { PopupProps } from '@progress/kendo-react-popup';
|
|
16
16
|
import PropTypes from 'prop-types';
|
|
17
17
|
import * as React_2 from 'react';
|
|
18
|
+
import { RowHeightService } from '@progress/kendo-react-common';
|
|
18
19
|
import { SVGIcon } from '@progress/kendo-react-common';
|
|
19
20
|
import { TextBoxChangeEvent } from '@progress/kendo-react-inputs';
|
|
20
21
|
import { TextBoxHandle } from '@progress/kendo-react-inputs';
|
|
@@ -1216,6 +1217,7 @@ declare class DropDownBase {
|
|
|
1216
1217
|
readonly guid: string;
|
|
1217
1218
|
readonly component: DropDownComponent;
|
|
1218
1219
|
constructor(component: DropDownComponent);
|
|
1220
|
+
didUpdate(): void;
|
|
1219
1221
|
didMount(): void;
|
|
1220
1222
|
calculateDir(): void;
|
|
1221
1223
|
calculatePopupWidth(): void;
|
|
@@ -4081,32 +4083,35 @@ export declare interface VirtualizationSettings {
|
|
|
4081
4083
|
* @hidden
|
|
4082
4084
|
*/
|
|
4083
4085
|
declare class VirtualScroll {
|
|
4084
|
-
|
|
4085
|
-
scrollElement: HTMLDivElement | null;
|
|
4086
|
-
list: HTMLUListElement | null;
|
|
4087
|
-
containerHeight: number;
|
|
4088
|
-
skip: number;
|
|
4086
|
+
table: HTMLTableElement | null;
|
|
4089
4087
|
total: number;
|
|
4090
4088
|
enabled: boolean;
|
|
4089
|
+
skip: number;
|
|
4091
4090
|
pageSize: number;
|
|
4091
|
+
PageChange: ((event: Page, syntheticEvent: React_2.SyntheticEvent<any>) => void) | null;
|
|
4092
|
+
scrollElement: HTMLDivElement | null;
|
|
4093
|
+
listTransform: string;
|
|
4092
4094
|
itemHeight: number;
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
private
|
|
4095
|
+
containerHeight: number;
|
|
4096
|
+
rowHeightService?: RowHeightService;
|
|
4097
|
+
private reactVersion;
|
|
4096
4098
|
private scrollSyncing;
|
|
4097
|
-
|
|
4099
|
+
private lastLoaded;
|
|
4100
|
+
private firstLoaded;
|
|
4101
|
+
private lastScrollTop;
|
|
4102
|
+
private listTranslate;
|
|
4098
4103
|
get translate(): number;
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
translateTo(dY: number): void;
|
|
4104
|
+
list: HTMLUListElement | null;
|
|
4105
|
+
container: HTMLDivElement | null;
|
|
4106
|
+
constructor();
|
|
4107
|
+
translateTo(dY: number, force?: boolean): void;
|
|
4108
|
+
changePage(skip: number, e: React_2.SyntheticEvent<HTMLDivElement>): void;
|
|
4103
4109
|
reset(): void;
|
|
4104
4110
|
scrollToEnd(): void;
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
validateTranslate(translate: number): number;
|
|
4111
|
+
calcScrollElementHeight: () => boolean;
|
|
4112
|
+
scrollerRef: (element: HTMLDivElement | null) => void;
|
|
4113
|
+
scrollHandler(e: React_2.SyntheticEvent<HTMLDivElement>): void;
|
|
4114
|
+
private getRowHeightService;
|
|
4110
4115
|
}
|
|
4111
4116
|
|
|
4112
4117
|
export { }
|
package/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { LocalizationService } from '@progress/kendo-react-intl';
|
|
|
15
15
|
import { PopupProps } from '@progress/kendo-react-popup';
|
|
16
16
|
import PropTypes from 'prop-types';
|
|
17
17
|
import * as React_2 from 'react';
|
|
18
|
+
import { RowHeightService } from '@progress/kendo-react-common';
|
|
18
19
|
import { SVGIcon } from '@progress/kendo-react-common';
|
|
19
20
|
import { TextBoxChangeEvent } from '@progress/kendo-react-inputs';
|
|
20
21
|
import { TextBoxHandle } from '@progress/kendo-react-inputs';
|
|
@@ -1216,6 +1217,7 @@ declare class DropDownBase {
|
|
|
1216
1217
|
readonly guid: string;
|
|
1217
1218
|
readonly component: DropDownComponent;
|
|
1218
1219
|
constructor(component: DropDownComponent);
|
|
1220
|
+
didUpdate(): void;
|
|
1219
1221
|
didMount(): void;
|
|
1220
1222
|
calculateDir(): void;
|
|
1221
1223
|
calculatePopupWidth(): void;
|
|
@@ -4081,32 +4083,35 @@ export declare interface VirtualizationSettings {
|
|
|
4081
4083
|
* @hidden
|
|
4082
4084
|
*/
|
|
4083
4085
|
declare class VirtualScroll {
|
|
4084
|
-
|
|
4085
|
-
scrollElement: HTMLDivElement | null;
|
|
4086
|
-
list: HTMLUListElement | null;
|
|
4087
|
-
containerHeight: number;
|
|
4088
|
-
skip: number;
|
|
4086
|
+
table: HTMLTableElement | null;
|
|
4089
4087
|
total: number;
|
|
4090
4088
|
enabled: boolean;
|
|
4089
|
+
skip: number;
|
|
4091
4090
|
pageSize: number;
|
|
4091
|
+
PageChange: ((event: Page, syntheticEvent: React_2.SyntheticEvent<any>) => void) | null;
|
|
4092
|
+
scrollElement: HTMLDivElement | null;
|
|
4093
|
+
listTransform: string;
|
|
4092
4094
|
itemHeight: number;
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
private
|
|
4095
|
+
containerHeight: number;
|
|
4096
|
+
rowHeightService?: RowHeightService;
|
|
4097
|
+
private reactVersion;
|
|
4096
4098
|
private scrollSyncing;
|
|
4097
|
-
|
|
4099
|
+
private lastLoaded;
|
|
4100
|
+
private firstLoaded;
|
|
4101
|
+
private lastScrollTop;
|
|
4102
|
+
private listTranslate;
|
|
4098
4103
|
get translate(): number;
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
translateTo(dY: number): void;
|
|
4104
|
+
list: HTMLUListElement | null;
|
|
4105
|
+
container: HTMLDivElement | null;
|
|
4106
|
+
constructor();
|
|
4107
|
+
translateTo(dY: number, force?: boolean): void;
|
|
4108
|
+
changePage(skip: number, e: React_2.SyntheticEvent<HTMLDivElement>): void;
|
|
4103
4109
|
reset(): void;
|
|
4104
4110
|
scrollToEnd(): void;
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
validateTranslate(translate: number): number;
|
|
4111
|
+
calcScrollElementHeight: () => boolean;
|
|
4112
|
+
scrollerRef: (element: HTMLDivElement | null) => void;
|
|
4113
|
+
scrollHandler(e: React_2.SyntheticEvent<HTMLDivElement>): void;
|
|
4114
|
+
private getRowHeightService;
|
|
4110
4115
|
}
|
|
4111
4116
|
|
|
4112
4117
|
export { }
|
package/package-metadata.mjs
CHANGED
|
@@ -10,7 +10,7 @@ const e = {
|
|
|
10
10
|
name: "@progress/kendo-react-dropdowns",
|
|
11
11
|
productName: "KendoReact",
|
|
12
12
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
-
publishDate:
|
|
13
|
+
publishDate: 1715609619,
|
|
14
14
|
version: "",
|
|
15
15
|
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-dropdowns",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-develop.2",
|
|
4
4
|
"description": "React DropDowns offer an interface for users to select different items from a list and more. KendoReact Dropdowns package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@progress/kendo-licensing": "^1.3.4",
|
|
26
|
-
"@progress/kendo-react-buttons": "
|
|
27
|
-
"@progress/kendo-react-common": "
|
|
28
|
-
"@progress/kendo-react-inputs": "
|
|
29
|
-
"@progress/kendo-react-intl": "
|
|
30
|
-
"@progress/kendo-react-labels": "
|
|
31
|
-
"@progress/kendo-react-layout": "
|
|
32
|
-
"@progress/kendo-react-popup": "
|
|
33
|
-
"@progress/kendo-react-treeview": "
|
|
34
|
-
"@progress/kendo-svg-icons": "^
|
|
26
|
+
"@progress/kendo-react-buttons": "8.0.0-develop.2",
|
|
27
|
+
"@progress/kendo-react-common": "8.0.0-develop.2",
|
|
28
|
+
"@progress/kendo-react-inputs": "8.0.0-develop.2",
|
|
29
|
+
"@progress/kendo-react-intl": "8.0.0-develop.2",
|
|
30
|
+
"@progress/kendo-react-labels": "8.0.0-develop.2",
|
|
31
|
+
"@progress/kendo-react-layout": "8.0.0-develop.2",
|
|
32
|
+
"@progress/kendo-react-popup": "8.0.0-develop.2",
|
|
33
|
+
"@progress/kendo-react-treeview": "8.0.0-develop.2",
|
|
34
|
+
"@progress/kendo-svg-icons": "^3.0.0",
|
|
35
35
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
36
36
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
|
37
37
|
},
|
package/common/VirtualScroll.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2024 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";"use strict";class a{constructor(){this.container=null,this.scrollElement=null,this.list=null,this.containerHeight=0,this.skip=0,this.total=0,this.enabled=!1,this.pageSize=0,this.itemHeight=0,this.PageChange=null,this.prevScrollPos=0,this.listTranslate=0,this.scrollSyncing=!1,this.scrollerRef=t=>{const i=this;i.container=t,t&&(t.setAttribute("unselectable","on"),window.setTimeout(i.calcScrollElementHeight.bind(i),0))},this.calcScrollElementHeight=()=>{this.scrollSyncing=!0;let t=!1;this.itemHeight=this.list?this.list.children[0].offsetHeight:this.itemHeight,this.containerHeight=Math.min(1533915,this.itemHeight*this.total);const i=this.containerHeight;return this.scrollElement&&(t=this.scrollElement.style.height!==i+"px",t&&(this.scrollElement.style.height=i+"px")),this.scrollSyncing=!1,t},this.scrollHandler=this.scrollHandler.bind(this)}get translate(){return this.listTranslate}changePage(t,i){const l=Math.min(Math.max(0,t),this.total-this.pageSize);l!==this.skip&&this.PageChange&&this.PageChange({skip:l,take:this.pageSize},i)}translateTo(t){this.listTranslate=t,this.list&&(this.list.style.transform="translateY("+t+"px)")}reset(){this.container&&(this.calcScrollElementHeight(),this.container.scrollTop=0,this.translateTo(0))}scrollToEnd(){this.container&&this.list&&(this.calcScrollElementHeight(),this.container.scrollTop=this.container.scrollHeight-this.container.offsetHeight,this.translateTo(this.container.scrollHeight))}localScrollUp(t){const i=this.itemHeight,l=this.container.scrollTop;let s=this.listTranslate,h,e=l-s;if(!(e>i)){for(h=0;h<this.skip&&!(s+i+e<=l);h++)s-=i;if(s=this.validateTranslate(s),this.skip-h<=0&&s>=l){this.translateTo(0),this.changePage(0,t),this.container.scrollTop=0;return}s!==this.listTranslate&&(this.translateTo(s),this.changePage(this.skip-h,t))}}localScrollDown(t){const i=this.itemHeight;let l=this.container.scrollTop,s=this.listTranslate;const h=this.list.children.length;let e;for(e=0;e<h&&!(s+i>=l);e++)s+=i;s=this.validateTranslate(s),e>=h&&this.skip+e>=this.total?(this.translateTo(s),this.changePage(this.total-1,t)):s!==this.listTranslate&&(this.translateTo(s),this.changePage(this.skip+e,t))}scrollNonStrict(t){const i=this.total*this.prevScrollPos/this.containerHeight,l=Math.min(Math.floor(i),this.total-1);let s=this.containerHeight*i/this.total;s=this.validateTranslate(s),this.translateTo(s),this.changePage(l,t)}scrollHandler(t){const i=this.container?this.container.scrollTop:0,l=this.prevScrollPos;this.prevScrollPos=i,!(!this.enabled||!this.list||!this.container||this.scrollSyncing)&&(i-l<=0&&i>this.listTranslate-this.list.scrollHeight/10?this.localScrollUp(t):i-l>0&&i<this.listTranslate+this.list.scrollHeight*2/3?this.localScrollDown(t):this.scrollNonStrict(t))}validateTranslate(t){return t=Math.max(0,t),t=Math.min(this.containerHeight,t),t}}module.exports=a;
|
package/common/VirtualScroll.mjs
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright © 2024 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
|
-
class n {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.container = null, this.scrollElement = null, this.list = null, this.containerHeight = 0, this.skip = 0, this.total = 0, this.enabled = !1, this.pageSize = 0, this.itemHeight = 0, this.PageChange = null, this.prevScrollPos = 0, this.listTranslate = 0, this.scrollSyncing = !1, this.scrollerRef = (t) => {
|
|
12
|
-
const i = this;
|
|
13
|
-
i.container = t, t && (t.setAttribute("unselectable", "on"), window.setTimeout(i.calcScrollElementHeight.bind(i), 0));
|
|
14
|
-
}, this.calcScrollElementHeight = () => {
|
|
15
|
-
this.scrollSyncing = !0;
|
|
16
|
-
let t = !1;
|
|
17
|
-
this.itemHeight = this.list ? this.list.children[0].offsetHeight : this.itemHeight, this.containerHeight = Math.min(1533915, this.itemHeight * this.total);
|
|
18
|
-
const i = this.containerHeight;
|
|
19
|
-
return this.scrollElement && (t = this.scrollElement.style.height !== i + "px", t && (this.scrollElement.style.height = i + "px")), this.scrollSyncing = !1, t;
|
|
20
|
-
}, this.scrollHandler = this.scrollHandler.bind(this);
|
|
21
|
-
}
|
|
22
|
-
get translate() {
|
|
23
|
-
return this.listTranslate;
|
|
24
|
-
}
|
|
25
|
-
changePage(t, i) {
|
|
26
|
-
const l = Math.min(Math.max(0, t), this.total - this.pageSize);
|
|
27
|
-
l !== this.skip && this.PageChange && this.PageChange({ skip: l, take: this.pageSize }, i);
|
|
28
|
-
}
|
|
29
|
-
translateTo(t) {
|
|
30
|
-
this.listTranslate = t, this.list && (this.list.style.transform = "translateY(" + t + "px)");
|
|
31
|
-
}
|
|
32
|
-
reset() {
|
|
33
|
-
this.container && (this.calcScrollElementHeight(), this.container.scrollTop = 0, this.translateTo(0));
|
|
34
|
-
}
|
|
35
|
-
scrollToEnd() {
|
|
36
|
-
this.container && this.list && (this.calcScrollElementHeight(), this.container.scrollTop = this.container.scrollHeight - this.container.offsetHeight, this.translateTo(this.container.scrollHeight));
|
|
37
|
-
}
|
|
38
|
-
localScrollUp(t) {
|
|
39
|
-
const i = this.itemHeight, l = this.container.scrollTop;
|
|
40
|
-
let s = this.listTranslate, h, e = l - s;
|
|
41
|
-
if (!(e > i)) {
|
|
42
|
-
for (h = 0; h < this.skip && !(s + i + e <= l); h++)
|
|
43
|
-
s -= i;
|
|
44
|
-
if (s = this.validateTranslate(s), this.skip - h <= 0 && s >= l) {
|
|
45
|
-
this.translateTo(0), this.changePage(0, t), this.container.scrollTop = 0;
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
s !== this.listTranslate && (this.translateTo(s), this.changePage(this.skip - h, t));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
localScrollDown(t) {
|
|
52
|
-
const i = this.itemHeight;
|
|
53
|
-
let l = this.container.scrollTop, s = this.listTranslate;
|
|
54
|
-
const h = this.list.children.length;
|
|
55
|
-
let e;
|
|
56
|
-
for (e = 0; e < h && !(s + i >= l); e++)
|
|
57
|
-
s += i;
|
|
58
|
-
s = this.validateTranslate(s), e >= h && this.skip + e >= this.total ? (this.translateTo(s), this.changePage(this.total - 1, t)) : s !== this.listTranslate && (this.translateTo(s), this.changePage(this.skip + e, t));
|
|
59
|
-
}
|
|
60
|
-
scrollNonStrict(t) {
|
|
61
|
-
const i = this.total * this.prevScrollPos / this.containerHeight, l = Math.min(Math.floor(i), this.total - 1);
|
|
62
|
-
let s = this.containerHeight * i / this.total;
|
|
63
|
-
s = this.validateTranslate(s), this.translateTo(s), this.changePage(l, t);
|
|
64
|
-
}
|
|
65
|
-
scrollHandler(t) {
|
|
66
|
-
const i = this.container ? this.container.scrollTop : 0, l = this.prevScrollPos;
|
|
67
|
-
this.prevScrollPos = i, !(!this.enabled || !this.list || !this.container || this.scrollSyncing) && (i - l <= 0 && i > this.listTranslate - this.list.scrollHeight / 10 ? this.localScrollUp(t) : i - l > 0 && i < this.listTranslate + this.list.scrollHeight * 2 / 3 ? this.localScrollDown(t) : this.scrollNonStrict(t));
|
|
68
|
-
}
|
|
69
|
-
validateTranslate(t) {
|
|
70
|
-
return t = Math.max(0, t), t = Math.min(this.containerHeight, t), t;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
export {
|
|
74
|
-
n as default
|
|
75
|
-
};
|