@progress/kendo-angular-dropdowns 5.5.0-dev.202111011140 → 5.5.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/dist/cdn/js/kendo-angular-dropdowns.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/common/list.component.js +15 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es2015/common/list.component.d.ts +4 -0
- package/dist/es2015/common/list.component.js +15 -1
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/fesm2015/index.js +16 -2
- package/dist/fesm5/index.js +16 -2
- package/dist/npm/common/list.component.js +15 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-angular-dropdowns.js +1 -1
- package/package.json +1 -1
|
@@ -92,6 +92,10 @@ var ListComponent = /** @class */ (function () {
|
|
|
92
92
|
this.lastLoaded = this.data.length - 1;
|
|
93
93
|
this.scrollToFocused = !changes.data.isFirstChange();
|
|
94
94
|
}
|
|
95
|
+
this.setOverflow();
|
|
96
|
+
}
|
|
97
|
+
if (isChanged('virtual', changes, false)) {
|
|
98
|
+
this.setOverflow();
|
|
95
99
|
}
|
|
96
100
|
};
|
|
97
101
|
ListComponent.prototype.ngAfterViewInit = function () {
|
|
@@ -101,6 +105,7 @@ var ListComponent = /** @class */ (function () {
|
|
|
101
105
|
_this.lastScrollTop = _this.content.nativeElement.scrollTop;
|
|
102
106
|
});
|
|
103
107
|
});
|
|
108
|
+
this.setOverflow();
|
|
104
109
|
};
|
|
105
110
|
ListComponent.prototype.ngAfterViewChecked = function () {
|
|
106
111
|
if (this.virtual) {
|
|
@@ -276,6 +281,15 @@ var ListComponent = /** @class */ (function () {
|
|
|
276
281
|
var hasVirtualScroll = isPresent(this.virtual) && this.hasVirtualScrollbar();
|
|
277
282
|
return hasVirtualScroll || this.list.nativeElement.scrollHeight > this.content.nativeElement.offsetHeight;
|
|
278
283
|
};
|
|
284
|
+
/**
|
|
285
|
+
* Sets the list's content overflow (hides/shows scrollbar)
|
|
286
|
+
*/
|
|
287
|
+
ListComponent.prototype.setOverflow = function () {
|
|
288
|
+
if (this.virtual) {
|
|
289
|
+
var overflow = this.hasVirtualScrollbar() ? 'scroll' : 'hidden';
|
|
290
|
+
this.renderer.setStyle(this.content.nativeElement, 'overflow-y', overflow);
|
|
291
|
+
}
|
|
292
|
+
};
|
|
279
293
|
/**
|
|
280
294
|
* Indicates whether the scrollbar should be visible in virtual mode.
|
|
281
295
|
*/
|
|
@@ -396,7 +410,7 @@ var ListComponent = /** @class */ (function () {
|
|
|
396
410
|
ListComponent = tslib_1.__decorate([
|
|
397
411
|
Component({
|
|
398
412
|
selector: 'kendo-list',
|
|
399
|
-
template: "\n <div *ngIf=\"dataService.grouped\"\n class='k-outer-group-header k-first'\n [ngClass]=\"{'k-virtual-item': virtual}\"\n [ngStyle]=\"{\n 'height.px': virtual?.itemHeight,\n 'minHeight.px' : virtual?.itemHeight,\n 'boxSizing' : virtual ? 'border-box' : 'inherit'}\"\n >\n <ng-template *ngIf=\"fixedGroupTemplate\"\n [templateContext]=\"{\n templateRef: fixedGroupTemplate.templateRef,\n $implicit: currentGroup\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!fixedGroupTemplate\"><strong>{{ currentGroup }}</strong> </ng-template>\n </div>\n <div #content\n [ngClass]=\"{ 'k-virtual-content': virtual, 'k-list-scroller': !virtual }\"\n [style.
|
|
413
|
+
template: "\n <div *ngIf=\"dataService.grouped\"\n class='k-outer-group-header k-first'\n [ngClass]=\"{'k-virtual-item': virtual}\"\n [ngStyle]=\"{\n 'height.px': virtual?.itemHeight,\n 'minHeight.px' : virtual?.itemHeight,\n 'boxSizing' : virtual ? 'border-box' : 'inherit'}\"\n >\n <ng-template *ngIf=\"fixedGroupTemplate\"\n [templateContext]=\"{\n templateRef: fixedGroupTemplate.templateRef,\n $implicit: currentGroup\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!fixedGroupTemplate\"><strong>{{ currentGroup }}</strong> </ng-template>\n </div>\n <div #content\n [ngClass]=\"{ 'k-virtual-content': virtual, 'k-list-scroller': !virtual }\"\n [style.overscrollBehavior]=\"'none'\"\n [style.maxHeight.px]=\"height\"\n unselectable=\"on\">\n <ul #list\n role=\"listbox\"\n [class]=\"listClass\"\n [ngClass]=\"{ 'k-virtual-list': virtual }\"\n [attr.id]=\"id\"\n [attr.aria-hidden]=\"!show\">\n <ng-template *ngIf=\"!dataService.grouped && show\" ngFor let-dataItem let-itemIndex=\"index\" [ngForOf]=\"data\">\n <li\n role=\"option\"\n kendoDropDownsSelectable\n [checkboxes]=\"checkboxes\"\n [height]=\"virtual?.itemHeight\"\n [index]=\"itemIndex + startFrom\"\n [multipleSelection]=\"multipleSelection\"\n [attr.id]=\"optionPrefix + '-' + getValue(dataItem)\"\n [attr.tabIndex]=\"-1\"\n class=\"k-item\"\n [ngClass]=\"{ 'k-virtual-item': virtual, 'k-state-disabled': isDisabled(itemIndex) }\">\n <label *ngIf=\"checkboxes.enabled\"\n class=\"k-checkbox-label\">\n <input type=\"checkbox\"\n class=\"k-checkbox\"\n (change)=\"onCheckedChange($event, itemIndex)\"\n [checked]=\"isChecked(itemIndex)\"\n />\n </label>\n <ng-template *ngIf=\"template\"\n [templateContext]=\"{\n templateRef: template.templateRef,\n $implicit: dataItem\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!template\">{{ getText(dataItem) }}</ng-template>\n </li>\n </ng-template>\n <ng-template *ngIf=\"dataService.grouped\" ngFor let-dataItem let-itemIndex=\"index\" [ngForOf]=\"data\">\n <li\n *ngIf=\"dataItem.header && dataItem.index > 0\"\n role=\"group\"\n class='k-outer-group-header'\n [ngClass]=\"{ 'k-virtual-item': virtual }\"\n [ngStyle]=\"{\n 'height.px': virtual?.itemHeight,\n 'minHeight.px' : virtual?.itemHeight,\n 'boxSizing' : virtual ? 'border-box' : 'inherit'}\"\n [attr.group-index]=\"dataItem.index\"\n [attr.id]=\"optionPrefix + '-' + getValue(dataItem.value)\"\n [attr.tabIndex]=\"-1\">\n <ng-template *ngIf=\"groupTemplate\"\n [templateContext]=\"{\n templateRef: groupTemplate.templateRef,\n $implicit: dataItem.value\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!groupTemplate\"><strong> {{ dataItem.value }}</strong> </ng-template>\n </li>\n <li\n *ngIf=\"!dataItem.header\"\n role=\"option\"\n kendoDropDownsSelectable\n [height]=\"virtual?.itemHeight\"\n [index]=\"dataItem.offsetIndex\"\n [multipleSelection]=\"multipleSelection\"\n [attr.absolute-index]=\"dataItem.index\"\n [attr.id]=\"optionPrefix + '-' + getValue(dataItem.value)\"\n [attr.tabIndex]=\"-1\"\n class=\"k-item\"\n [ngClass]=\"{ 'k-virtual-item': virtual, 'k-state-disabled': isDisabled(dataItem.offsetIndex) }\">\n <ng-template *ngIf=\"template\"\n [templateContext]=\"{\n templateRef: template.templateRef,\n $implicit: dataItem.value\n }\">\n </ng-template>\n <ng-template [ngIf]=\"!template\">{{ getText(dataItem.value) }}</ng-template>\n </li>\n </ng-template>\n <kendo-resize-sensor\n *ngIf=\"!virtual\"\n (resize)=\"listResize.emit()\"\n >\n </kendo-resize-sensor>\n </ul>\n <div *ngIf=\"virtual\" #virtualContainer class=\"k-height-container\" role=\"presentation\">\n <div [style.height.px]=\"scrollHeight\">\n <kendo-resize-sensor (resize)=\"listResize.emit()\"></kendo-resize-sensor>\n </div>\n </div>\n </div>\n "
|
|
400
414
|
}),
|
|
401
415
|
tslib_1.__metadata("design:paramtypes", [DataService,
|
|
402
416
|
ElementRef,
|
|
@@ -9,7 +9,7 @@ export var packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-dropdowns',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1639043976,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -83,6 +83,10 @@ export declare class ListComponent implements OnChanges, OnDestroy, AfterViewIni
|
|
|
83
83
|
* Indicates whether a scrollbar is currently rendered in the list.
|
|
84
84
|
*/
|
|
85
85
|
hasScrollbar(): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Sets the list's content overflow (hides/shows scrollbar)
|
|
88
|
+
*/
|
|
89
|
+
private setOverflow;
|
|
86
90
|
/**
|
|
87
91
|
* Indicates whether the scrollbar should be visible in virtual mode.
|
|
88
92
|
*/
|
|
@@ -75,6 +75,10 @@ let ListComponent = class ListComponent {
|
|
|
75
75
|
this.lastLoaded = this.data.length - 1;
|
|
76
76
|
this.scrollToFocused = !changes.data.isFirstChange();
|
|
77
77
|
}
|
|
78
|
+
this.setOverflow();
|
|
79
|
+
}
|
|
80
|
+
if (isChanged('virtual', changes, false)) {
|
|
81
|
+
this.setOverflow();
|
|
78
82
|
}
|
|
79
83
|
}
|
|
80
84
|
ngAfterViewInit() {
|
|
@@ -83,6 +87,7 @@ let ListComponent = class ListComponent {
|
|
|
83
87
|
this.lastScrollTop = this.content.nativeElement.scrollTop;
|
|
84
88
|
});
|
|
85
89
|
});
|
|
90
|
+
this.setOverflow();
|
|
86
91
|
}
|
|
87
92
|
ngAfterViewChecked() {
|
|
88
93
|
if (this.virtual) {
|
|
@@ -256,6 +261,15 @@ let ListComponent = class ListComponent {
|
|
|
256
261
|
const hasVirtualScroll = isPresent(this.virtual) && this.hasVirtualScrollbar();
|
|
257
262
|
return hasVirtualScroll || this.list.nativeElement.scrollHeight > this.content.nativeElement.offsetHeight;
|
|
258
263
|
}
|
|
264
|
+
/**
|
|
265
|
+
* Sets the list's content overflow (hides/shows scrollbar)
|
|
266
|
+
*/
|
|
267
|
+
setOverflow() {
|
|
268
|
+
if (this.virtual) {
|
|
269
|
+
const overflow = this.hasVirtualScrollbar() ? 'scroll' : 'hidden';
|
|
270
|
+
this.renderer.setStyle(this.content.nativeElement, 'overflow-y', overflow);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
259
273
|
/**
|
|
260
274
|
* Indicates whether the scrollbar should be visible in virtual mode.
|
|
261
275
|
*/
|
|
@@ -395,8 +409,8 @@ ListComponent = tslib_1.__decorate([
|
|
|
395
409
|
</div>
|
|
396
410
|
<div #content
|
|
397
411
|
[ngClass]="{ 'k-virtual-content': virtual, 'k-list-scroller': !virtual }"
|
|
412
|
+
[style.overscrollBehavior]="'none'"
|
|
398
413
|
[style.maxHeight.px]="height"
|
|
399
|
-
[style.overflowY]="overflowY"
|
|
400
414
|
unselectable="on">
|
|
401
415
|
<ul #list
|
|
402
416
|
role="listbox"
|