@progress/kendo-angular-listview 25.1.0-develop.3 → 25.1.0-develop.4
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/fesm2022/progress-kendo-angular-listview.mjs +128 -75
- package/index.d.ts +53 -27
- package/package-metadata.mjs +2 -2
- package/package.json +8 -8
- package/schematics/ngAdd/index.js +6 -6
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { Injectable, Input, Directive, Optional, EventEmitter, forwardRef, Output, HostBinding, ViewChildren, ContentChild, ViewChild, ChangeDetectionStrategy, Component, HostListener, NgModule } from '@angular/core';
|
|
7
|
-
import { isDocumentAvailable, normalizeKeys, Keys,
|
|
6
|
+
import { Injectable, signal, Input, Directive, Optional, EventEmitter, effect, forwardRef, Output, HostBinding, ViewChildren, ContentChild, ViewChild, ChangeDetectionStrategy, Component, HostListener, NgModule } from '@angular/core';
|
|
7
|
+
import { isDocumentAvailable, normalizeKeys, Keys, hasObservers, EventsOutsideAngularDirective, KENDO_WEBMCP_HOST, provideComponentName, ResizeBatchService } from '@progress/kendo-angular-common';
|
|
8
8
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
9
9
|
import * as i2 from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
11
11
|
import { Subject, Subscription } from 'rxjs';
|
|
12
12
|
import { FormGroup, FormControl } from '@angular/forms';
|
|
13
|
-
import { switchMap, take } from 'rxjs/operators';
|
|
14
13
|
import { NgTemplateOutlet, NgClass, NgStyle } from '@angular/common';
|
|
15
14
|
import { PagerComponent, PageSizeChangeEvent as PageSizeChangeEvent$1 } from '@progress/kendo-angular-pager';
|
|
16
15
|
import { Button } from '@progress/kendo-angular-buttons';
|
|
@@ -25,8 +24,8 @@ const packageMetadata = {
|
|
|
25
24
|
productName: 'Kendo UI for Angular',
|
|
26
25
|
productCode: 'KENDOUIANGULAR',
|
|
27
26
|
productCodes: ['KENDOUIANGULAR'],
|
|
28
|
-
publishDate:
|
|
29
|
-
version: '25.1.0-develop.
|
|
27
|
+
publishDate: 1787052772,
|
|
28
|
+
version: '25.1.0-develop.4',
|
|
30
29
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
31
30
|
};
|
|
32
31
|
|
|
@@ -290,8 +289,14 @@ class ListViewNavigableItemDirective {
|
|
|
290
289
|
/**
|
|
291
290
|
* The current item index. Used to track which navigation changes apply to this item.
|
|
292
291
|
*/
|
|
293
|
-
index
|
|
292
|
+
set index(value) {
|
|
293
|
+
this._index.set(value);
|
|
294
|
+
}
|
|
295
|
+
get index() {
|
|
296
|
+
return this._index();
|
|
297
|
+
}
|
|
294
298
|
navigationSubscription;
|
|
299
|
+
_index = signal(undefined, ...(ngDevMode ? [{ debugName: "_index" }] : []));
|
|
295
300
|
constructor(hostElement, renderer, navigationService) {
|
|
296
301
|
this.hostElement = hostElement;
|
|
297
302
|
this.renderer = renderer;
|
|
@@ -600,39 +605,30 @@ const isNewItem = (index) => index === -1 || index === undefined;
|
|
|
600
605
|
* @hidden
|
|
601
606
|
*/
|
|
602
607
|
class EditService {
|
|
603
|
-
ngZone;
|
|
604
608
|
changes = new EventEmitter();
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
newItem;
|
|
608
|
-
changedSource = new Subject();
|
|
609
|
-
constructor(ngZone) {
|
|
610
|
-
this.ngZone = ngZone;
|
|
611
|
-
this.changed = this.changedSource.asObservable().pipe(switchMap(() => this.ngZone.onStable.asObservable().pipe(take(1))));
|
|
612
|
-
}
|
|
609
|
+
_editedIndices = signal([], ...(ngDevMode ? [{ debugName: "_editedIndices" }] : []));
|
|
610
|
+
_newItem = signal(undefined, ...(ngDevMode ? [{ debugName: "_newItem" }] : []));
|
|
613
611
|
editItem(index, group = undefined) {
|
|
614
|
-
this.
|
|
615
|
-
this.onChanged();
|
|
612
|
+
this._editedIndices.update(indices => [...indices, { index, group }]);
|
|
616
613
|
}
|
|
617
614
|
addItem(group) {
|
|
618
|
-
this.
|
|
619
|
-
this.onChanged();
|
|
615
|
+
this._newItem.set({ group });
|
|
620
616
|
}
|
|
621
617
|
isEditing() {
|
|
622
|
-
return this.
|
|
618
|
+
return this._editedIndices().length > 0;
|
|
623
619
|
}
|
|
624
620
|
get hasNewItem() {
|
|
625
|
-
return isPresent(this.
|
|
621
|
+
return isPresent(this._newItem());
|
|
626
622
|
}
|
|
627
623
|
get newDataItem() {
|
|
628
624
|
if (this.hasNewItem) {
|
|
629
|
-
return this.
|
|
625
|
+
return this._newItem().group.value;
|
|
630
626
|
}
|
|
631
627
|
return {};
|
|
632
628
|
}
|
|
633
629
|
get newItemGroup() {
|
|
634
630
|
if (this.hasNewItem) {
|
|
635
|
-
return this.
|
|
631
|
+
return this._newItem().group;
|
|
636
632
|
}
|
|
637
633
|
return new FormGroup({});
|
|
638
634
|
}
|
|
@@ -641,20 +637,19 @@ class EditService {
|
|
|
641
637
|
}
|
|
642
638
|
close(index) {
|
|
643
639
|
if (isNewItem(index)) {
|
|
644
|
-
this.
|
|
640
|
+
this._newItem.set(undefined);
|
|
645
641
|
return;
|
|
646
642
|
}
|
|
647
|
-
this.
|
|
648
|
-
this.onChanged();
|
|
643
|
+
this._editedIndices.update(indices => indices.filter(isNotEqual(index)));
|
|
649
644
|
}
|
|
650
645
|
context(index) {
|
|
651
646
|
if (isNewItem(index)) {
|
|
652
|
-
return this.
|
|
647
|
+
return this._newItem();
|
|
653
648
|
}
|
|
654
649
|
return this.findByIndex(index);
|
|
655
650
|
}
|
|
656
651
|
isEdited(index) {
|
|
657
|
-
if (isNewItem(index) && isPresent(this.
|
|
652
|
+
if (isNewItem(index) && isPresent(this._newItem())) {
|
|
658
653
|
return true;
|
|
659
654
|
}
|
|
660
655
|
return isPresent(this.findByIndex(index));
|
|
@@ -680,19 +675,14 @@ class EditService {
|
|
|
680
675
|
this.changes.emit({ action: 'remove', itemIndex });
|
|
681
676
|
}
|
|
682
677
|
findByIndex(index) {
|
|
683
|
-
return this.
|
|
678
|
+
return this._editedIndices().find(isEqual(index));
|
|
684
679
|
}
|
|
685
|
-
|
|
686
|
-
this.ngZone.runOutsideAngular(() => {
|
|
687
|
-
this.changedSource.next(undefined);
|
|
688
|
-
});
|
|
689
|
-
}
|
|
690
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: EditService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
680
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: EditService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
691
681
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: EditService });
|
|
692
682
|
}
|
|
693
683
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: EditService, decorators: [{
|
|
694
684
|
type: Injectable
|
|
695
|
-
}]
|
|
685
|
+
}] });
|
|
696
686
|
|
|
697
687
|
const DEFAULT_PAGER_SETTINGS = {
|
|
698
688
|
position: 'bottom',
|
|
@@ -741,7 +731,6 @@ class ListViewComponent {
|
|
|
741
731
|
ngZone;
|
|
742
732
|
element;
|
|
743
733
|
renderer;
|
|
744
|
-
changeDetectorRef;
|
|
745
734
|
editService;
|
|
746
735
|
navigationService;
|
|
747
736
|
/**
|
|
@@ -785,17 +774,22 @@ class ListViewComponent {
|
|
|
785
774
|
*
|
|
786
775
|
* @default false
|
|
787
776
|
*/
|
|
788
|
-
bordered
|
|
777
|
+
set bordered(value) {
|
|
778
|
+
this._bordered.set(value);
|
|
779
|
+
}
|
|
780
|
+
get bordered() {
|
|
781
|
+
return this._bordered();
|
|
782
|
+
}
|
|
789
783
|
/**
|
|
790
784
|
* Specifies the data collection that populates the ListView
|
|
791
785
|
* ([see data binding examples](https://www.telerik.com/kendo-angular-ui/components/listview/paging)).
|
|
792
786
|
*/
|
|
793
787
|
set data(value) {
|
|
794
788
|
this.lastScrollTop = this.contentContainer?.nativeElement.scrollTop ?? 0;
|
|
795
|
-
this._data
|
|
789
|
+
this._data.set(value);
|
|
796
790
|
}
|
|
797
791
|
get data() {
|
|
798
|
-
return this._data;
|
|
792
|
+
return this._data();
|
|
799
793
|
}
|
|
800
794
|
/**
|
|
801
795
|
* Specifies whether the loading indicator of the ListView displays
|
|
@@ -803,27 +797,52 @@ class ListViewComponent {
|
|
|
803
797
|
*
|
|
804
798
|
* @default false
|
|
805
799
|
*/
|
|
806
|
-
loading
|
|
800
|
+
set loading(value) {
|
|
801
|
+
this._loading.set(value);
|
|
802
|
+
}
|
|
803
|
+
get loading() {
|
|
804
|
+
return this._loading();
|
|
805
|
+
}
|
|
807
806
|
/**
|
|
808
807
|
* Specifies the CSS styles that render on the content container element of the ListView.
|
|
809
808
|
* Supports the type of values that [`ngStyle`](link:site.data.urls.angular['ngstyleapi']) supports.
|
|
810
809
|
*/
|
|
811
|
-
containerStyle
|
|
810
|
+
set containerStyle(value) {
|
|
811
|
+
this._containerStyle.set(value);
|
|
812
|
+
}
|
|
813
|
+
get containerStyle() {
|
|
814
|
+
return this._containerStyle();
|
|
815
|
+
}
|
|
812
816
|
/**
|
|
813
817
|
* Specifies the CSS styles that render on each item element wrapper of the ListView.
|
|
814
818
|
* Supports the type of values that [`ngStyle`](link:site.data.urls.angular['ngstyleapi']) supports.
|
|
815
819
|
*/
|
|
816
|
-
itemStyle
|
|
820
|
+
set itemStyle(value) {
|
|
821
|
+
this._itemStyle.set(value);
|
|
822
|
+
}
|
|
823
|
+
get itemStyle() {
|
|
824
|
+
return this._itemStyle();
|
|
825
|
+
}
|
|
817
826
|
/**
|
|
818
827
|
* Specifies the CSS class that renders on the content container element of the ListView.
|
|
819
828
|
* Supports the type of values that [`ngClass`](link:site.data.urls.angular['ngclassapi']) supports.
|
|
820
829
|
*/
|
|
821
|
-
containerClass
|
|
830
|
+
set containerClass(value) {
|
|
831
|
+
this._containerClass.set(value);
|
|
832
|
+
}
|
|
833
|
+
get containerClass() {
|
|
834
|
+
return this._containerClass();
|
|
835
|
+
}
|
|
822
836
|
/**
|
|
823
837
|
* Specifies the CSS class that renders on each item element wrapper of the ListView.
|
|
824
838
|
* Supports the type of values that [`ngClass`](link:site.data.urls.angular['ngclassapi']) supports.
|
|
825
839
|
*/
|
|
826
|
-
itemClass
|
|
840
|
+
set itemClass(value) {
|
|
841
|
+
this._itemClass.set(value);
|
|
842
|
+
}
|
|
843
|
+
get itemClass() {
|
|
844
|
+
return this._itemClass();
|
|
845
|
+
}
|
|
827
846
|
/**
|
|
828
847
|
* Specifies the content container `aria-label` attribute
|
|
829
848
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/listview/accessibility#accessible-names)).
|
|
@@ -831,7 +850,12 @@ class ListViewComponent {
|
|
|
831
850
|
* @remarks
|
|
832
851
|
* This property is related to accessibility.
|
|
833
852
|
*/
|
|
834
|
-
containerLabel
|
|
853
|
+
set containerLabel(value) {
|
|
854
|
+
this._containerLabel.set(value);
|
|
855
|
+
}
|
|
856
|
+
get containerLabel() {
|
|
857
|
+
return this._containerLabel();
|
|
858
|
+
}
|
|
835
859
|
/**
|
|
836
860
|
* Specifies the content container `role` attribute
|
|
837
861
|
* ([more details](https://www.telerik.com/kendo-angular-ui/components/listview/accessibility#wai-aria-support)).
|
|
@@ -841,7 +865,12 @@ class ListViewComponent {
|
|
|
841
865
|
* @remarks
|
|
842
866
|
* This property is related to accessibility.
|
|
843
867
|
*/
|
|
844
|
-
containerRole
|
|
868
|
+
set containerRole(value) {
|
|
869
|
+
this._containerRole.set(value);
|
|
870
|
+
}
|
|
871
|
+
get containerRole() {
|
|
872
|
+
return this._containerRole();
|
|
873
|
+
}
|
|
845
874
|
/**
|
|
846
875
|
* Specifies the list item `role` attribute
|
|
847
876
|
* ([more details](https://www.telerik.com/kendo-angular-ui/components/listview/accessibility#wai-aria-support)).
|
|
@@ -851,7 +880,12 @@ class ListViewComponent {
|
|
|
851
880
|
* @remarks
|
|
852
881
|
* This property is related to accessibility.
|
|
853
882
|
*/
|
|
854
|
-
listItemRole
|
|
883
|
+
set listItemRole(value) {
|
|
884
|
+
this._listItemRole.set(value);
|
|
885
|
+
}
|
|
886
|
+
get listItemRole() {
|
|
887
|
+
return this._listItemRole();
|
|
888
|
+
}
|
|
855
889
|
/**
|
|
856
890
|
* Specifies whether keyboard navigation is enabled
|
|
857
891
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/listview/keyboard-navigation)).
|
|
@@ -871,16 +905,21 @@ class ListViewComponent {
|
|
|
871
905
|
this.addNavigationListeners();
|
|
872
906
|
this.navigationService.isEnabled = true;
|
|
873
907
|
}
|
|
874
|
-
this._navigable
|
|
908
|
+
this._navigable.set(navigable);
|
|
875
909
|
}
|
|
876
910
|
get navigable() {
|
|
877
|
-
return this._navigable;
|
|
911
|
+
return this._navigable();
|
|
878
912
|
}
|
|
879
913
|
/**
|
|
880
914
|
* Specifies the page size used by the ListView pager
|
|
881
915
|
* ([more details](https://www.telerik.com/kendo-angular-ui/components/listview/paging)).
|
|
882
916
|
*/
|
|
883
|
-
pageSize
|
|
917
|
+
set pageSize(value) {
|
|
918
|
+
this._pageSize.set(value);
|
|
919
|
+
}
|
|
920
|
+
get pageSize() {
|
|
921
|
+
return this._pageSize();
|
|
922
|
+
}
|
|
884
923
|
/**
|
|
885
924
|
* Defines the number of records to be skipped by the pager
|
|
886
925
|
* ([more details](https://www.telerik.com/kendo-angular-ui/components/listview/paging)).
|
|
@@ -888,10 +927,10 @@ class ListViewComponent {
|
|
|
888
927
|
set skip(skip) {
|
|
889
928
|
const parsed = parseInt(skip, 10);
|
|
890
929
|
const defaultSkipValue = 0;
|
|
891
|
-
this._skip
|
|
930
|
+
this._skip.set(!isNaN(parsed) ? parsed : defaultSkipValue);
|
|
892
931
|
}
|
|
893
932
|
get skip() {
|
|
894
|
-
return this._skip;
|
|
933
|
+
return this._skip();
|
|
895
934
|
}
|
|
896
935
|
/**
|
|
897
936
|
* Configures whether the ListView renders a pager
|
|
@@ -899,11 +938,11 @@ class ListViewComponent {
|
|
|
899
938
|
* When you provide a boolean value, it renders a pager with the default settings.
|
|
900
939
|
*/
|
|
901
940
|
set pageable(pageable) {
|
|
902
|
-
this._pageable
|
|
941
|
+
this._pageable.set(pageable);
|
|
903
942
|
this.pagerSettings = pageable ? Object.assign({}, DEFAULT_PAGER_SETTINGS, pageable) : null;
|
|
904
943
|
}
|
|
905
944
|
get pageable() {
|
|
906
|
-
return this._pageable;
|
|
945
|
+
return this._pageable();
|
|
907
946
|
}
|
|
908
947
|
/**
|
|
909
948
|
* Specifies the height (in pixels) of the ListView component.
|
|
@@ -912,7 +951,12 @@ class ListViewComponent {
|
|
|
912
951
|
* To set the height of the ListView, you can also use `style.height`. The `style.height`
|
|
913
952
|
* option supports units such as `px`, `%`, `em`, `rem`, and others.
|
|
914
953
|
*/
|
|
915
|
-
height
|
|
954
|
+
set height(value) {
|
|
955
|
+
this._height.set(value);
|
|
956
|
+
}
|
|
957
|
+
get height() {
|
|
958
|
+
return this._height();
|
|
959
|
+
}
|
|
916
960
|
/**
|
|
917
961
|
* Fires when you scroll to the last record on the page
|
|
918
962
|
* ([see endless scrolling example](https://www.telerik.com/kendo-angular-ui/components/listview/scroll-modes#endless-scrolling)).
|
|
@@ -999,17 +1043,33 @@ class ListViewComponent {
|
|
|
999
1043
|
return this.navigationService.activeIndex;
|
|
1000
1044
|
}
|
|
1001
1045
|
removeNavigationListeners;
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1046
|
+
_bordered = signal(false, ...(ngDevMode ? [{ debugName: "_bordered" }] : []));
|
|
1047
|
+
_data = signal(undefined, ...(ngDevMode ? [{ debugName: "_data" }] : []));
|
|
1048
|
+
_loading = signal(false, ...(ngDevMode ? [{ debugName: "_loading" }] : []));
|
|
1049
|
+
_containerStyle = signal(undefined, ...(ngDevMode ? [{ debugName: "_containerStyle" }] : []));
|
|
1050
|
+
_itemStyle = signal(undefined, ...(ngDevMode ? [{ debugName: "_itemStyle" }] : []));
|
|
1051
|
+
_containerClass = signal(undefined, ...(ngDevMode ? [{ debugName: "_containerClass" }] : []));
|
|
1052
|
+
_itemClass = signal(undefined, ...(ngDevMode ? [{ debugName: "_itemClass" }] : []));
|
|
1053
|
+
_containerLabel = signal(undefined, ...(ngDevMode ? [{ debugName: "_containerLabel" }] : []));
|
|
1054
|
+
_containerRole = signal('list', ...(ngDevMode ? [{ debugName: "_containerRole" }] : []));
|
|
1055
|
+
_listItemRole = signal('listitem', ...(ngDevMode ? [{ debugName: "_listItemRole" }] : []));
|
|
1056
|
+
_navigable = signal(true, ...(ngDevMode ? [{ debugName: "_navigable" }] : []));
|
|
1057
|
+
_pageSize = signal(undefined, ...(ngDevMode ? [{ debugName: "_pageSize" }] : []));
|
|
1058
|
+
_skip = signal(0, ...(ngDevMode ? [{ debugName: "_skip" }] : []));
|
|
1059
|
+
_pageable = signal(undefined, ...(ngDevMode ? [{ debugName: "_pageable" }] : []));
|
|
1060
|
+
_height = signal(undefined, ...(ngDevMode ? [{ debugName: "_height" }] : []));
|
|
1061
|
+
heightEffect = effect(() => {
|
|
1062
|
+
const height = this._height();
|
|
1063
|
+
if (height != null) {
|
|
1064
|
+
this.renderer.setStyle(this.element.nativeElement, 'height', `${height}px`);
|
|
1065
|
+
}
|
|
1066
|
+
}, ...(ngDevMode ? [{ debugName: "heightEffect" }] : []));
|
|
1005
1067
|
lastScrollTop;
|
|
1006
|
-
_data;
|
|
1007
1068
|
editServiceSubscription;
|
|
1008
|
-
constructor(ngZone, element, renderer,
|
|
1069
|
+
constructor(ngZone, element, renderer, editService, navigationService) {
|
|
1009
1070
|
this.ngZone = ngZone;
|
|
1010
1071
|
this.element = element;
|
|
1011
1072
|
this.renderer = renderer;
|
|
1012
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
1013
1073
|
this.editService = editService;
|
|
1014
1074
|
this.navigationService = navigationService;
|
|
1015
1075
|
validatePackage(packageMetadata);
|
|
@@ -1018,11 +1078,6 @@ class ListViewComponent {
|
|
|
1018
1078
|
ngAfterViewInit() {
|
|
1019
1079
|
this.lastScrollTop = this.contentContainer?.nativeElement.scrollTop;
|
|
1020
1080
|
}
|
|
1021
|
-
ngOnChanges(changes) {
|
|
1022
|
-
if (isChanged('height', changes, false)) {
|
|
1023
|
-
this.renderer.setStyle(this.element.nativeElement, 'height', `${this.height}px`);
|
|
1024
|
-
}
|
|
1025
|
-
}
|
|
1026
1081
|
ngOnDestroy() {
|
|
1027
1082
|
if (isPresent(this.editServiceSubscription)) {
|
|
1028
1083
|
this.editServiceSubscription.unsubscribe();
|
|
@@ -1091,7 +1146,6 @@ class ListViewComponent {
|
|
|
1091
1146
|
*/
|
|
1092
1147
|
editItem(index, group) {
|
|
1093
1148
|
this.editService.editItem(index, group);
|
|
1094
|
-
this.changeDetectorRef.markForCheck();
|
|
1095
1149
|
}
|
|
1096
1150
|
/**
|
|
1097
1151
|
* Closes the editor for a given item ([see example](https://www.telerik.com/kendo-angular-ui/components/listview/editing/editing-template-forms#cancelling-editing)).
|
|
@@ -1100,7 +1154,6 @@ class ListViewComponent {
|
|
|
1100
1154
|
*/
|
|
1101
1155
|
closeItem(index) {
|
|
1102
1156
|
this.editService.close(index);
|
|
1103
|
-
this.changeDetectorRef.markForCheck();
|
|
1104
1157
|
}
|
|
1105
1158
|
/**
|
|
1106
1159
|
* @hidden
|
|
@@ -1182,7 +1235,7 @@ class ListViewComponent {
|
|
|
1182
1235
|
});
|
|
1183
1236
|
this[action].emit(args);
|
|
1184
1237
|
}
|
|
1185
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: ListViewComponent, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token:
|
|
1238
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.27", ngImport: i0, type: ListViewComponent, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: EditService }, { token: NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1186
1239
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.27", type: ListViewComponent, isStandalone: true, selector: "kendo-listview", inputs: { bordered: "bordered", data: "data", loading: "loading", containerStyle: "containerStyle", itemStyle: "itemStyle", containerClass: "containerClass", itemClass: "itemClass", containerLabel: "containerLabel", containerRole: "containerRole", listItemRole: "listItemRole", navigable: "navigable", pageSize: "pageSize", skip: "skip", pageable: "pageable", height: "height" }, outputs: { scrollBottom: "scrollBottom", pageChange: "pageChange", pageSizeChange: "pageSizeChange", edit: "edit", cancel: "cancel", save: "save", remove: "remove", add: "add" }, host: { properties: { "class.k-listview": "this.className", "class.k-listview-bordered": "this.bordered" } }, providers: [
|
|
1187
1240
|
EditService,
|
|
1188
1241
|
NavigationService,
|
|
@@ -1193,7 +1246,7 @@ class ListViewComponent {
|
|
|
1193
1246
|
},
|
|
1194
1247
|
provideComponentName('listview'),
|
|
1195
1248
|
{ provide: KENDO_WEBMCP_HOST, useExisting: forwardRef(() => ListViewComponent) }
|
|
1196
|
-
], queries: [{ propertyName: "itemTemplate", first: true, predicate: ItemTemplateDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: HeaderTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: FooterTemplateDirective, descendants: true }, { propertyName: "loaderTemplate", first: true, predicate: LoaderTemplateDirective, descendants: true }, { propertyName: "noDataTemplate", first: true, predicate: NoDataTemplateDirective, descendants: true }, { propertyName: "editTemplate", first: true, predicate: EditTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, static: true }, { propertyName: "listViewItems", predicate: ListViewNavigableItemDirective, descendants: true }], exportAs: ["kendoListView"],
|
|
1249
|
+
], queries: [{ propertyName: "itemTemplate", first: true, predicate: ItemTemplateDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: HeaderTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: FooterTemplateDirective, descendants: true }, { propertyName: "loaderTemplate", first: true, predicate: LoaderTemplateDirective, descendants: true }, { propertyName: "noDataTemplate", first: true, predicate: NoDataTemplateDirective, descendants: true }, { propertyName: "editTemplate", first: true, predicate: EditTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, static: true }, { propertyName: "listViewItems", predicate: ListViewNavigableItemDirective, descendants: true }], exportAs: ["kendoListView"], ngImport: i0, template: `
|
|
1197
1250
|
<!-- top pager -->
|
|
1198
1251
|
@if (pagerSettings?.position !== 'bottom') {
|
|
1199
1252
|
<ng-template
|
|
@@ -1530,7 +1583,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.27", ngImpo
|
|
|
1530
1583
|
standalone: true,
|
|
1531
1584
|
imports: [NgTemplateOutlet, NgClass, NgStyle, EventsOutsideAngularDirective, ListViewNavigableItemDirective, PagerComponent]
|
|
1532
1585
|
}]
|
|
1533
|
-
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type:
|
|
1586
|
+
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: EditService }, { type: NavigationService }], propDecorators: { className: [{
|
|
1534
1587
|
type: HostBinding,
|
|
1535
1588
|
args: ['class.k-listview']
|
|
1536
1589
|
}], itemTemplate: [{
|
|
@@ -1637,13 +1690,13 @@ class DataBindingDirective {
|
|
|
1637
1690
|
* Specifies the array of data that populates the ListView.
|
|
1638
1691
|
*/
|
|
1639
1692
|
set data(data) {
|
|
1640
|
-
this._data
|
|
1693
|
+
this._data.set(data || []);
|
|
1641
1694
|
this.updateListViewData();
|
|
1642
1695
|
}
|
|
1643
1696
|
get data() {
|
|
1644
|
-
return this._data;
|
|
1697
|
+
return this._data();
|
|
1645
1698
|
}
|
|
1646
|
-
_data;
|
|
1699
|
+
_data = signal([], ...(ngDevMode ? [{ debugName: "_data" }] : []));
|
|
1647
1700
|
subscriptions = new Subscription();
|
|
1648
1701
|
constructor(listView) {
|
|
1649
1702
|
this.listView = listView;
|
package/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { OnChanges, ElementRef, Renderer2, TemplateRef,
|
|
7
|
-
import { Subject
|
|
6
|
+
import { OnChanges, ElementRef, Renderer2, TemplateRef, EventEmitter, AfterViewInit, OnDestroy, NgZone, QueryList } from '@angular/core';
|
|
7
|
+
import { Subject } from 'rxjs';
|
|
8
8
|
import { PageChangeEvent as PageChangeEvent$1, PageSizeChangeEvent as PageSizeChangeEvent$1, PagerType as PagerType$1, PageSizeItem as PageSizeItem$1 } from '@progress/kendo-angular-pager';
|
|
9
9
|
import { FormGroup } from '@angular/forms';
|
|
10
10
|
import { Button } from '@progress/kendo-angular-buttons';
|
|
@@ -70,8 +70,10 @@ declare class ListViewNavigableItemDirective implements OnChanges {
|
|
|
70
70
|
/**
|
|
71
71
|
* The current item index. Used to track which navigation changes apply to this item.
|
|
72
72
|
*/
|
|
73
|
-
index: number;
|
|
73
|
+
set index(value: number);
|
|
74
|
+
get index(): number;
|
|
74
75
|
private navigationSubscription;
|
|
76
|
+
private _index;
|
|
75
77
|
constructor(hostElement: ElementRef<HTMLElement>, renderer: Renderer2, navigationService: NavigationService);
|
|
76
78
|
ngOnChanges(): void;
|
|
77
79
|
ngOnInit(): void;
|
|
@@ -384,13 +386,9 @@ type CommandEvent = {
|
|
|
384
386
|
* @hidden
|
|
385
387
|
*/
|
|
386
388
|
declare class EditService {
|
|
387
|
-
ngZone: NgZone;
|
|
388
389
|
changes: EventEmitter<CommandEvent>;
|
|
389
|
-
|
|
390
|
-
private
|
|
391
|
-
private newItem;
|
|
392
|
-
private changedSource;
|
|
393
|
-
constructor(ngZone: NgZone);
|
|
390
|
+
private _editedIndices;
|
|
391
|
+
private _newItem;
|
|
394
392
|
editItem(index: number, group?: any): void;
|
|
395
393
|
addItem(group: any): void;
|
|
396
394
|
isEditing(): boolean;
|
|
@@ -408,7 +406,6 @@ declare class EditService {
|
|
|
408
406
|
save(itemIndex?: number): void;
|
|
409
407
|
remove(itemIndex: number): void;
|
|
410
408
|
private findByIndex;
|
|
411
|
-
private onChanged;
|
|
412
409
|
static ɵfac: i0.ɵɵFactoryDeclaration<EditService, never>;
|
|
413
410
|
static ɵprov: i0.ɵɵInjectableDeclaration<EditService>;
|
|
414
411
|
}
|
|
@@ -498,11 +495,10 @@ interface AddEvent extends EditEvent {
|
|
|
498
495
|
* }
|
|
499
496
|
* ```
|
|
500
497
|
*/
|
|
501
|
-
declare class ListViewComponent implements AfterViewInit,
|
|
498
|
+
declare class ListViewComponent implements AfterViewInit, OnDestroy {
|
|
502
499
|
ngZone: NgZone;
|
|
503
500
|
element: ElementRef;
|
|
504
501
|
renderer: Renderer2;
|
|
505
|
-
private changeDetectorRef;
|
|
506
502
|
editService: EditService;
|
|
507
503
|
private navigationService;
|
|
508
504
|
/**
|
|
@@ -546,7 +542,8 @@ declare class ListViewComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
|
546
542
|
*
|
|
547
543
|
* @default false
|
|
548
544
|
*/
|
|
549
|
-
bordered: boolean;
|
|
545
|
+
set bordered(value: boolean);
|
|
546
|
+
get bordered(): boolean;
|
|
550
547
|
/**
|
|
551
548
|
* Specifies the data collection that populates the ListView
|
|
552
549
|
* ([see data binding examples](https://www.telerik.com/kendo-angular-ui/components/listview/paging)).
|
|
@@ -559,33 +556,46 @@ declare class ListViewComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
|
559
556
|
*
|
|
560
557
|
* @default false
|
|
561
558
|
*/
|
|
562
|
-
loading: boolean;
|
|
559
|
+
set loading(value: boolean);
|
|
560
|
+
get loading(): boolean;
|
|
563
561
|
/**
|
|
564
562
|
* Specifies the CSS styles that render on the content container element of the ListView.
|
|
565
563
|
* Supports the type of values that [`ngStyle`](link:site.data.urls.angular['ngstyleapi']) supports.
|
|
566
564
|
*/
|
|
567
|
-
containerStyle
|
|
565
|
+
set containerStyle(value: {
|
|
566
|
+
[key: string]: string;
|
|
567
|
+
});
|
|
568
|
+
get containerStyle(): {
|
|
568
569
|
[key: string]: string;
|
|
569
570
|
};
|
|
570
571
|
/**
|
|
571
572
|
* Specifies the CSS styles that render on each item element wrapper of the ListView.
|
|
572
573
|
* Supports the type of values that [`ngStyle`](link:site.data.urls.angular['ngstyleapi']) supports.
|
|
573
574
|
*/
|
|
574
|
-
itemStyle
|
|
575
|
+
set itemStyle(value: {
|
|
576
|
+
[key: string]: string;
|
|
577
|
+
});
|
|
578
|
+
get itemStyle(): {
|
|
575
579
|
[key: string]: string;
|
|
576
580
|
};
|
|
577
581
|
/**
|
|
578
582
|
* Specifies the CSS class that renders on the content container element of the ListView.
|
|
579
583
|
* Supports the type of values that [`ngClass`](link:site.data.urls.angular['ngclassapi']) supports.
|
|
580
584
|
*/
|
|
581
|
-
containerClass
|
|
585
|
+
set containerClass(value: string | string[] | Set<string> | {
|
|
586
|
+
[key: string]: boolean;
|
|
587
|
+
});
|
|
588
|
+
get containerClass(): string | string[] | Set<string> | {
|
|
582
589
|
[key: string]: boolean;
|
|
583
590
|
};
|
|
584
591
|
/**
|
|
585
592
|
* Specifies the CSS class that renders on each item element wrapper of the ListView.
|
|
586
593
|
* Supports the type of values that [`ngClass`](link:site.data.urls.angular['ngclassapi']) supports.
|
|
587
594
|
*/
|
|
588
|
-
itemClass
|
|
595
|
+
set itemClass(value: string | string[] | Set<string> | {
|
|
596
|
+
[key: string]: boolean;
|
|
597
|
+
});
|
|
598
|
+
get itemClass(): string | string[] | Set<string> | {
|
|
589
599
|
[key: string]: boolean;
|
|
590
600
|
};
|
|
591
601
|
/**
|
|
@@ -595,7 +605,8 @@ declare class ListViewComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
|
595
605
|
* @remarks
|
|
596
606
|
* This property is related to accessibility.
|
|
597
607
|
*/
|
|
598
|
-
containerLabel
|
|
608
|
+
set containerLabel(value: string);
|
|
609
|
+
get containerLabel(): string;
|
|
599
610
|
/**
|
|
600
611
|
* Specifies the content container `role` attribute
|
|
601
612
|
* ([more details](https://www.telerik.com/kendo-angular-ui/components/listview/accessibility#wai-aria-support)).
|
|
@@ -605,7 +616,8 @@ declare class ListViewComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
|
605
616
|
* @remarks
|
|
606
617
|
* This property is related to accessibility.
|
|
607
618
|
*/
|
|
608
|
-
containerRole: string;
|
|
619
|
+
set containerRole(value: string);
|
|
620
|
+
get containerRole(): string;
|
|
609
621
|
/**
|
|
610
622
|
* Specifies the list item `role` attribute
|
|
611
623
|
* ([more details](https://www.telerik.com/kendo-angular-ui/components/listview/accessibility#wai-aria-support)).
|
|
@@ -615,7 +627,8 @@ declare class ListViewComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
|
615
627
|
* @remarks
|
|
616
628
|
* This property is related to accessibility.
|
|
617
629
|
*/
|
|
618
|
-
listItemRole: string;
|
|
630
|
+
set listItemRole(value: string);
|
|
631
|
+
get listItemRole(): string;
|
|
619
632
|
/**
|
|
620
633
|
* Specifies whether keyboard navigation is enabled
|
|
621
634
|
* ([see example](https://www.telerik.com/kendo-angular-ui/components/listview/keyboard-navigation)).
|
|
@@ -631,7 +644,8 @@ declare class ListViewComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
|
631
644
|
* Specifies the page size used by the ListView pager
|
|
632
645
|
* ([more details](https://www.telerik.com/kendo-angular-ui/components/listview/paging)).
|
|
633
646
|
*/
|
|
634
|
-
pageSize
|
|
647
|
+
set pageSize(value: number);
|
|
648
|
+
get pageSize(): number;
|
|
635
649
|
/**
|
|
636
650
|
* Defines the number of records to be skipped by the pager
|
|
637
651
|
* ([more details](https://www.telerik.com/kendo-angular-ui/components/listview/paging)).
|
|
@@ -652,7 +666,8 @@ declare class ListViewComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
|
652
666
|
* To set the height of the ListView, you can also use `style.height`. The `style.height`
|
|
653
667
|
* option supports units such as `px`, `%`, `em`, `rem`, and others.
|
|
654
668
|
*/
|
|
655
|
-
height
|
|
669
|
+
set height(value: number);
|
|
670
|
+
get height(): number;
|
|
656
671
|
/**
|
|
657
672
|
* Fires when you scroll to the last record on the page
|
|
658
673
|
* ([see endless scrolling example](https://www.telerik.com/kendo-angular-ui/components/listview/scroll-modes#endless-scrolling)).
|
|
@@ -723,15 +738,26 @@ declare class ListViewComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
|
723
738
|
*/
|
|
724
739
|
get activeIndex(): number;
|
|
725
740
|
private removeNavigationListeners;
|
|
726
|
-
private
|
|
741
|
+
private _bordered;
|
|
742
|
+
private _data;
|
|
743
|
+
private _loading;
|
|
744
|
+
private _containerStyle;
|
|
745
|
+
private _itemStyle;
|
|
746
|
+
private _containerClass;
|
|
747
|
+
private _itemClass;
|
|
748
|
+
private _containerLabel;
|
|
749
|
+
private _containerRole;
|
|
750
|
+
private _listItemRole;
|
|
727
751
|
private _navigable;
|
|
752
|
+
private _pageSize;
|
|
753
|
+
private _skip;
|
|
728
754
|
private _pageable;
|
|
755
|
+
private _height;
|
|
756
|
+
private heightEffect;
|
|
729
757
|
private lastScrollTop;
|
|
730
|
-
private _data;
|
|
731
758
|
private editServiceSubscription;
|
|
732
|
-
constructor(ngZone: NgZone, element: ElementRef, renderer: Renderer2,
|
|
759
|
+
constructor(ngZone: NgZone, element: ElementRef, renderer: Renderer2, editService: EditService, navigationService: NavigationService);
|
|
733
760
|
ngAfterViewInit(): void;
|
|
734
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
735
761
|
ngOnDestroy(): void;
|
|
736
762
|
/**
|
|
737
763
|
* @hidden
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = {
|
|
|
7
7
|
"productCodes": [
|
|
8
8
|
"KENDOUIANGULAR"
|
|
9
9
|
],
|
|
10
|
-
"publishDate":
|
|
11
|
-
"version": "25.1.0-develop.
|
|
10
|
+
"publishDate": 1787052772,
|
|
11
|
+
"version": "25.1.0-develop.4",
|
|
12
12
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
13
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-listview",
|
|
3
|
-
"version": "25.1.0-develop.
|
|
3
|
+
"version": "25.1.0-develop.4",
|
|
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":
|
|
22
|
+
"publishDate": 1787052772,
|
|
23
23
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"@angular/forms": "20 - 22",
|
|
31
31
|
"@angular/platform-browser": "20 - 22",
|
|
32
32
|
"@progress/kendo-licensing": "^1.11.0",
|
|
33
|
-
"@progress/kendo-angular-buttons": "25.1.0-develop.
|
|
34
|
-
"@progress/kendo-angular-common": "25.1.0-develop.
|
|
35
|
-
"@progress/kendo-angular-icons": "25.1.0-develop.
|
|
36
|
-
"@progress/kendo-angular-l10n": "25.1.0-develop.
|
|
37
|
-
"@progress/kendo-angular-pager": "25.1.0-develop.
|
|
33
|
+
"@progress/kendo-angular-buttons": "25.1.0-develop.4",
|
|
34
|
+
"@progress/kendo-angular-common": "25.1.0-develop.4",
|
|
35
|
+
"@progress/kendo-angular-icons": "25.1.0-develop.4",
|
|
36
|
+
"@progress/kendo-angular-l10n": "25.1.0-develop.4",
|
|
37
|
+
"@progress/kendo-angular-pager": "25.1.0-develop.4",
|
|
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": "25.1.0-develop.
|
|
42
|
+
"@progress/kendo-angular-schematics": "25.1.0-develop.4"
|
|
43
43
|
},
|
|
44
44
|
"schematics": "./schematics/collection.json",
|
|
45
45
|
"module": "fesm2022/progress-kendo-angular-listview.mjs",
|
|
@@ -9,12 +9,12 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
9
9
|
function default_1(options) {
|
|
10
10
|
const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'ListViewModule', package: 'listview', peerDependencies: {
|
|
11
11
|
// Peers of pager
|
|
12
|
-
'@progress/kendo-angular-dropdowns': '25.1.0-develop.
|
|
13
|
-
'@progress/kendo-angular-treeview': '25.1.0-develop.
|
|
14
|
-
'@progress/kendo-angular-inputs': '25.1.0-develop.
|
|
15
|
-
'@progress/kendo-angular-intl': '25.1.0-develop.
|
|
16
|
-
'@progress/kendo-angular-l10n': '25.1.0-develop.
|
|
17
|
-
'@progress/kendo-angular-popup': '25.1.0-develop.
|
|
12
|
+
'@progress/kendo-angular-dropdowns': '25.1.0-develop.4',
|
|
13
|
+
'@progress/kendo-angular-treeview': '25.1.0-develop.4',
|
|
14
|
+
'@progress/kendo-angular-inputs': '25.1.0-develop.4',
|
|
15
|
+
'@progress/kendo-angular-intl': '25.1.0-develop.4',
|
|
16
|
+
'@progress/kendo-angular-l10n': '25.1.0-develop.4',
|
|
17
|
+
'@progress/kendo-angular-popup': '25.1.0-develop.4',
|
|
18
18
|
'@progress/kendo-drawing': '^1.17.2',
|
|
19
19
|
// Peer of icons
|
|
20
20
|
'@progress/kendo-svg-icons': '^4.0.0'
|