@progress/kendo-angular-listview 19.0.0-develop.2 → 19.0.0-develop.21

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.
@@ -86,7 +86,13 @@ export class ListViewComponent {
86
86
  * The data collection that will be used to populate the ListView
87
87
  * ([see data binding examples]({% slug paging_listview %})).
88
88
  */
89
- data;
89
+ set data(value) {
90
+ this.lastScrollTop = this.contentContainer?.nativeElement.scrollTop ?? 0;
91
+ this._data = value;
92
+ }
93
+ get data() {
94
+ return this._data;
95
+ }
90
96
  /**
91
97
  * Specifies if the loading indicator of the ListView will be displayed
92
98
  * ([see example]({% slug paging_listview %}#toc-remote-binding)).
@@ -132,7 +138,7 @@ export class ListViewComponent {
132
138
  /**
133
139
  * Specifies whether the keyboard navigation is enabled
134
140
  * ([see example]({% slug keyboard_navigation_listview %})).
135
- * By default, the navigation is disabled.
141
+ * By default, the navigation is enabled.
136
142
  */
137
143
  set navigable(navigable) {
138
144
  if (!navigable && isPresent(this.removeNavigationListeners)) {
@@ -275,8 +281,10 @@ export class ListViewComponent {
275
281
  }
276
282
  removeNavigationListeners;
277
283
  _skip = 0;
278
- _navigable = false;
284
+ _navigable = true;
279
285
  _pageable;
286
+ lastScrollTop;
287
+ _data;
280
288
  editServiceSubscription;
281
289
  constructor(ngZone, element, renderer, changeDetectorRef, editService, navigationService) {
282
290
  this.ngZone = ngZone;
@@ -288,6 +296,9 @@ export class ListViewComponent {
288
296
  validatePackage(packageMetadata);
289
297
  this.attachEditHandlers();
290
298
  }
299
+ ngAfterViewInit() {
300
+ this.lastScrollTop = this.contentContainer?.nativeElement.scrollTop;
301
+ }
291
302
  ngOnChanges(changes) {
292
303
  if (isChanged('height', changes, false)) {
293
304
  this.renderer.setStyle(this.element.nativeElement, 'height', `${this.height}px`);
@@ -391,12 +402,17 @@ export class ListViewComponent {
391
402
  /**
392
403
  * @hidden
393
404
  */
394
- handleContentScroll() {
405
+ handleContentScroll = () => {
395
406
  if (!hasObservers(this.scrollBottom)) {
396
407
  return;
397
408
  }
398
409
  const THRESHOLD = 2;
399
410
  const { scrollHeight, scrollTop, clientHeight } = this.contentContainer.nativeElement;
411
+ const isScrollUp = this.lastScrollTop > scrollTop;
412
+ this.lastScrollTop = scrollTop;
413
+ if (isScrollUp) {
414
+ return;
415
+ }
400
416
  const atBottom = scrollHeight - clientHeight - scrollTop <= THRESHOLD;
401
417
  if (atBottom) {
402
418
  this.ngZone.run(() => {
@@ -404,7 +420,7 @@ export class ListViewComponent {
404
420
  this.scrollBottom.emit(event);
405
421
  });
406
422
  }
407
- }
423
+ };
408
424
  /**
409
425
  * @hidden
410
426
  */
@@ -587,7 +603,7 @@ export class ListViewComponent {
587
603
  >
588
604
  </kendo-datapager>
589
605
  </ng-template>
590
- `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "directive", type: ListViewNavigableItemDirective, selector: "[kendoListViewNavigableItem]", inputs: ["index"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: PagerComponent, selector: "kendo-datapager, kendo-pager", inputs: ["externalTemplate", "total", "skip", "pageSize", "buttonCount", "info", "type", "pageSizeValues", "previousNext", "navigable", "size", "responsive"], outputs: ["pageChange", "pageSizeChange"], exportAs: ["kendoDataPager", "kendoPager"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
606
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "directive", type: ListViewNavigableItemDirective, selector: "[kendoListViewNavigableItem]", inputs: ["index"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: PagerComponent, selector: "kendo-datapager, kendo-pager", inputs: ["externalTemplate", "total", "skip", "pageSize", "buttonCount", "info", "type", "pageSizeValues", "previousNext", "navigable", "size", "responsive", "adaptiveMode"], outputs: ["pageChange", "pageSizeChange"], exportAs: ["kendoDataPager", "kendoPager"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
591
607
  }
592
608
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ListViewComponent, decorators: [{
593
609
  type: Component,
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1745321906,
14
- version: '19.0.0-develop.2',
13
+ publishDate: 1747412075,
14
+ version: '19.0.0-develop.21',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -25,8 +25,8 @@ const packageMetadata = {
25
25
  productName: 'Kendo UI for Angular',
26
26
  productCode: 'KENDOUIANGULAR',
27
27
  productCodes: ['KENDOUIANGULAR'],
28
- publishDate: 1745321906,
29
- version: '19.0.0-develop.2',
28
+ publishDate: 1747412075,
29
+ version: '19.0.0-develop.21',
30
30
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
31
31
  };
32
32
 
@@ -641,7 +641,13 @@ class ListViewComponent {
641
641
  * The data collection that will be used to populate the ListView
642
642
  * ([see data binding examples]({% slug paging_listview %})).
643
643
  */
644
- data;
644
+ set data(value) {
645
+ this.lastScrollTop = this.contentContainer?.nativeElement.scrollTop ?? 0;
646
+ this._data = value;
647
+ }
648
+ get data() {
649
+ return this._data;
650
+ }
645
651
  /**
646
652
  * Specifies if the loading indicator of the ListView will be displayed
647
653
  * ([see example]({% slug paging_listview %}#toc-remote-binding)).
@@ -687,7 +693,7 @@ class ListViewComponent {
687
693
  /**
688
694
  * Specifies whether the keyboard navigation is enabled
689
695
  * ([see example]({% slug keyboard_navigation_listview %})).
690
- * By default, the navigation is disabled.
696
+ * By default, the navigation is enabled.
691
697
  */
692
698
  set navigable(navigable) {
693
699
  if (!navigable && isPresent(this.removeNavigationListeners)) {
@@ -830,8 +836,10 @@ class ListViewComponent {
830
836
  }
831
837
  removeNavigationListeners;
832
838
  _skip = 0;
833
- _navigable = false;
839
+ _navigable = true;
834
840
  _pageable;
841
+ lastScrollTop;
842
+ _data;
835
843
  editServiceSubscription;
836
844
  constructor(ngZone, element, renderer, changeDetectorRef, editService, navigationService) {
837
845
  this.ngZone = ngZone;
@@ -843,6 +851,9 @@ class ListViewComponent {
843
851
  validatePackage(packageMetadata);
844
852
  this.attachEditHandlers();
845
853
  }
854
+ ngAfterViewInit() {
855
+ this.lastScrollTop = this.contentContainer?.nativeElement.scrollTop;
856
+ }
846
857
  ngOnChanges(changes) {
847
858
  if (isChanged('height', changes, false)) {
848
859
  this.renderer.setStyle(this.element.nativeElement, 'height', `${this.height}px`);
@@ -946,12 +957,17 @@ class ListViewComponent {
946
957
  /**
947
958
  * @hidden
948
959
  */
949
- handleContentScroll() {
960
+ handleContentScroll = () => {
950
961
  if (!hasObservers(this.scrollBottom)) {
951
962
  return;
952
963
  }
953
964
  const THRESHOLD = 2;
954
965
  const { scrollHeight, scrollTop, clientHeight } = this.contentContainer.nativeElement;
966
+ const isScrollUp = this.lastScrollTop > scrollTop;
967
+ this.lastScrollTop = scrollTop;
968
+ if (isScrollUp) {
969
+ return;
970
+ }
955
971
  const atBottom = scrollHeight - clientHeight - scrollTop <= THRESHOLD;
956
972
  if (atBottom) {
957
973
  this.ngZone.run(() => {
@@ -959,7 +975,7 @@ class ListViewComponent {
959
975
  this.scrollBottom.emit(event);
960
976
  });
961
977
  }
962
- }
978
+ };
963
979
  /**
964
980
  * @hidden
965
981
  */
@@ -1142,7 +1158,7 @@ class ListViewComponent {
1142
1158
  >
1143
1159
  </kendo-datapager>
1144
1160
  </ng-template>
1145
- `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "directive", type: ListViewNavigableItemDirective, selector: "[kendoListViewNavigableItem]", inputs: ["index"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: PagerComponent, selector: "kendo-datapager, kendo-pager", inputs: ["externalTemplate", "total", "skip", "pageSize", "buttonCount", "info", "type", "pageSizeValues", "previousNext", "navigable", "size", "responsive"], outputs: ["pageChange", "pageSizeChange"], exportAs: ["kendoDataPager", "kendoPager"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1161
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "directive", type: ListViewNavigableItemDirective, selector: "[kendoListViewNavigableItem]", inputs: ["index"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: PagerComponent, selector: "kendo-datapager, kendo-pager", inputs: ["externalTemplate", "total", "skip", "pageSize", "buttonCount", "info", "type", "pageSizeValues", "previousNext", "navigable", "size", "responsive", "adaptiveMode"], outputs: ["pageChange", "pageSizeChange"], exportAs: ["kendoDataPager", "kendoPager"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1146
1162
  }
1147
1163
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ListViewComponent, decorators: [{
1148
1164
  type: Component,
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2025 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { EventEmitter, NgZone, Renderer2, ElementRef, SimpleChanges, QueryList, ChangeDetectorRef } from '@angular/core';
5
+ import { EventEmitter, NgZone, Renderer2, ElementRef, SimpleChanges, QueryList, ChangeDetectorRef, AfterViewInit, OnDestroy, OnChanges } from '@angular/core';
6
6
  import { NavigationService } from './navigation/navigation.service';
7
7
  import { ListViewNavigableItemDirective } from './navigation/listview-navigable-item.directive';
8
8
  import { ItemTemplateDirective } from './templates/item-template.directive';
@@ -25,7 +25,7 @@ import * as i0 from "@angular/core";
25
25
  /**
26
26
  * Represents the Kendo UI ListView component for Angular.
27
27
  */
28
- export declare class ListViewComponent {
28
+ export declare class ListViewComponent implements AfterViewInit, OnChanges, OnDestroy {
29
29
  ngZone: NgZone;
30
30
  element: ElementRef;
31
31
  renderer: Renderer2;
@@ -74,7 +74,8 @@ export declare class ListViewComponent {
74
74
  * The data collection that will be used to populate the ListView
75
75
  * ([see data binding examples]({% slug paging_listview %})).
76
76
  */
77
- data: any[] | ListViewDataResult;
77
+ set data(value: any[] | ListViewDataResult | undefined);
78
+ get data(): any[] | ListViewDataResult | undefined;
78
79
  /**
79
80
  * Specifies if the loading indicator of the ListView will be displayed
80
81
  * ([see example]({% slug paging_listview %}#toc-remote-binding)).
@@ -84,35 +85,35 @@ export declare class ListViewComponent {
84
85
  * The CSS styles that will be rendered on the content container element of the ListView.
85
86
  * Supports the type of values that are supported by [`ngStyle`](link:site.data.urls.angular['ngstyleapi']).
86
87
  */
87
- containerStyle: {
88
+ containerStyle?: {
88
89
  [key: string]: string;
89
90
  };
90
91
  /**
91
92
  * The CSS styles that will be rendered on each item element wrapper of the ListView.
92
93
  * Supports the type of values that are supported by [`ngStyle`](link:site.data.urls.angular['ngstyleapi']).
93
94
  */
94
- itemStyle: {
95
+ itemStyle?: {
95
96
  [key: string]: string;
96
97
  };
97
98
  /**
98
99
  * The CSS class that will be rendered on the content container element of the ListView.
99
100
  * Supports the type of values that are supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
100
101
  */
101
- containerClass: string | string[] | Set<string> | {
102
+ containerClass?: string | string[] | Set<string> | {
102
103
  [key: string]: boolean;
103
104
  };
104
105
  /**
105
106
  * The CSS class that will be rendered on each item element wrapper of the ListView.
106
107
  * Supports the type of values that are supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
107
108
  */
108
- itemClass: string | string[] | Set<string> | {
109
+ itemClass?: string | string[] | Set<string> | {
109
110
  [key: string]: boolean;
110
111
  };
111
112
  /**
112
113
  * Specifies the content container `aria-label` attribute
113
114
  * ([see example]({% slug accessibility_listview %}#toc-accessible-names)).
114
115
  */
115
- containerLabel: string;
116
+ containerLabel?: string;
116
117
  /**
117
118
  * Specifies the content container `role` attribute
118
119
  * ([more details]({% slug accessibility_listview %}#toc-wai-aria-support)).
@@ -128,7 +129,7 @@ export declare class ListViewComponent {
128
129
  /**
129
130
  * Specifies whether the keyboard navigation is enabled
130
131
  * ([see example]({% slug keyboard_navigation_listview %})).
131
- * By default, the navigation is disabled.
132
+ * By default, the navigation is enabled.
132
133
  */
133
134
  set navigable(navigable: boolean);
134
135
  get navigable(): boolean;
@@ -136,7 +137,7 @@ export declare class ListViewComponent {
136
137
  * Defines the page size used by the ListView pager
137
138
  * ([more details]({% slug paging_listview %})).
138
139
  */
139
- pageSize: number;
140
+ pageSize?: number;
140
141
  /**
141
142
  * Defines the number of records to be skipped by the pager
142
143
  * ([more details]({% slug paging_listview %})).
@@ -156,7 +157,7 @@ export declare class ListViewComponent {
156
157
  * To set the height of the ListView, you can also use `style.height`. The `style.height`
157
158
  * option supports units such as `px`, `%`, `em`, `rem`, and others.
158
159
  */
159
- height: number;
160
+ height?: number;
160
161
  /**
161
162
  * Fires when the user scrolls to the last record on the page
162
163
  * ([see endless scrolling example]({% slug scrollmodes_listview %}#toc-endless-scrolling)).
@@ -230,8 +231,11 @@ export declare class ListViewComponent {
230
231
  private _skip;
231
232
  private _navigable;
232
233
  private _pageable;
234
+ private lastScrollTop;
235
+ private _data;
233
236
  private editServiceSubscription;
234
237
  constructor(ngZone: NgZone, element: ElementRef, renderer: Renderer2, changeDetectorRef: ChangeDetectorRef, editService: EditService, navigationService: NavigationService);
238
+ ngAfterViewInit(): void;
235
239
  ngOnChanges(changes: SimpleChanges): void;
236
240
  ngOnDestroy(): void;
237
241
  /**
@@ -286,7 +290,7 @@ export declare class ListViewComponent {
286
290
  /**
287
291
  * @hidden
288
292
  */
289
- handleContentScroll(): void;
293
+ handleContentScroll: () => void;
290
294
  /**
291
295
  * @hidden
292
296
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-listview",
3
- "version": "19.0.0-develop.2",
3
+ "version": "19.0.0-develop.21",
4
4
  "description": "Kendo UI Angular listview component",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -19,7 +19,7 @@
19
19
  "package": {
20
20
  "productName": "Kendo UI for Angular",
21
21
  "productCode": "KENDOUIANGULAR",
22
- "publishDate": 1745321906,
22
+ "publishDate": 1747412075,
23
23
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
24
24
  }
25
25
  },
@@ -30,16 +30,16 @@
30
30
  "@angular/forms": "16 - 19",
31
31
  "@angular/platform-browser": "16 - 19",
32
32
  "@progress/kendo-licensing": "^1.5.0",
33
- "@progress/kendo-angular-buttons": "19.0.0-develop.2",
34
- "@progress/kendo-angular-common": "19.0.0-develop.2",
35
- "@progress/kendo-angular-icons": "19.0.0-develop.2",
36
- "@progress/kendo-angular-l10n": "19.0.0-develop.2",
37
- "@progress/kendo-angular-pager": "19.0.0-develop.2",
33
+ "@progress/kendo-angular-buttons": "19.0.0-develop.21",
34
+ "@progress/kendo-angular-common": "19.0.0-develop.21",
35
+ "@progress/kendo-angular-icons": "19.0.0-develop.21",
36
+ "@progress/kendo-angular-l10n": "19.0.0-develop.21",
37
+ "@progress/kendo-angular-pager": "19.0.0-develop.21",
38
38
  "rxjs": "^6.5.3 || ^7.0.0"
39
39
  },
40
40
  "dependencies": {
41
41
  "tslib": "^2.3.1",
42
- "@progress/kendo-angular-schematics": "19.0.0-develop.2"
42
+ "@progress/kendo-angular-schematics": "19.0.0-develop.21"
43
43
  },
44
44
  "schematics": "./schematics/collection.json",
45
45
  "module": "fesm2022/progress-kendo-angular-listview.mjs",
@@ -4,12 +4,12 @@ const schematics_1 = require("@angular-devkit/schematics");
4
4
  function default_1(options) {
5
5
  const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'ListViewModule', package: 'listview', peerDependencies: {
6
6
  // Peers of pager
7
- '@progress/kendo-angular-dropdowns': '19.0.0-develop.2',
8
- '@progress/kendo-angular-treeview': '19.0.0-develop.2',
9
- '@progress/kendo-angular-inputs': '19.0.0-develop.2',
10
- '@progress/kendo-angular-intl': '19.0.0-develop.2',
11
- '@progress/kendo-angular-l10n': '19.0.0-develop.2',
12
- '@progress/kendo-angular-popup': '19.0.0-develop.2',
7
+ '@progress/kendo-angular-dropdowns': '19.0.0-develop.21',
8
+ '@progress/kendo-angular-treeview': '19.0.0-develop.21',
9
+ '@progress/kendo-angular-inputs': '19.0.0-develop.21',
10
+ '@progress/kendo-angular-intl': '19.0.0-develop.21',
11
+ '@progress/kendo-angular-l10n': '19.0.0-develop.21',
12
+ '@progress/kendo-angular-popup': '19.0.0-develop.21',
13
13
  '@progress/kendo-drawing': '^1.17.2',
14
14
  // Peer of icons
15
15
  '@progress/kendo-svg-icons': '^4.0.0'