@progress/kendo-angular-listview 3.0.0-dev.202201181339 → 3.0.1-dev.202201201439
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-listview.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/navigation/listview-navigable-item.directive.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/es2015/navigation/listview-navigable-item.directive.js +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/fesm2015/index.js +2 -2
- package/dist/fesm5/index.js +2 -2
- package/dist/npm/navigation/listview-navigable-item.directive.js +1 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-angular-listview.js +1 -1
- package/package.json +7 -7
- package/schematics/ngAdd/index.js +3 -3
package/dist/cdn/main.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Copyright © 2021 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
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-buttons"),require("@progress/kendo-angular-common"),require("rxjs"),require("@angular/forms"),require("@progress/kendo-angular-pager"),require("@progress/kendo-licensing"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define(["tslib","@angular/core","@progress/kendo-angular-l10n","@progress/kendo-angular-buttons","@progress/kendo-angular-common","rxjs","@angular/forms","@progress/kendo-angular-pager","@progress/kendo-licensing","rxjs/operators","@angular/common"],t):"object"==typeof exports?exports.KendoAngularListview=t(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-buttons"),require("@progress/kendo-angular-common"),require("rxjs"),require("@angular/forms"),require("@progress/kendo-angular-pager"),require("@progress/kendo-licensing"),require("rxjs/operators"),require("@angular/common")):e.KendoAngularListview=t(e.tslib,e["@angular/core"],e["@progress/kendo-angular-l10n"],e["@progress/kendo-angular-buttons"],e["@progress/kendo-angular-common"],e.rxjs,e["@angular/forms"],e["@progress/kendo-angular-pager"],e["@progress/kendo-licensing"],e["rxjs/operators"],e["@angular/common"])}(window,(function(e,t,n,i,a,r,o,s,d,c,p){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=19)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(6);t.isPresent=function(e){return null!=e},t.isObject=function(e){return t.isPresent(e)&&"object"==typeof e},t.match=function(e,n){var i=e.matches||e.msMatchesSelector||e.webkitMatchesSelector;return!!t.isPresent(i)&&i.call(e,n)},t.isListViewItem=function(e){return!!t.isPresent(e)&&t.match(e,".k-listview-item")},t.getListItemIndex=function(e){return t.isPresent(e)?Number(e.getAttribute("data-kendo-listview-item-index")):null},t.relatedTarget=function(e){return t.isPresent(e.relatedTarget)&&i.isDocumentAvailable()?e.relatedTarget||document.activeElement:null},t.fitIntoRange=function(e,n,i){return!t.isPresent(e)||e<=n?n:e>=i?i:e},t.closestWithMatch=function(e,n){for(var i=e;null!==i&&1===i.nodeType;){if(t.match(i,n))return i;i=i.parentElement||i.parentNode}return null},t.getClosestListItemIndex=function(e){if(!t.isPresent(e))return null;var n=t.closestWithMatch(e,".k-listview-item");return t.getListItemIndex(n)}},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(16),o=n(2),s=n(8),d=n(22),c=function(e){return-1===e||void 0===e},p=function(){function e(e){var t=this;this.ngZone=e,this.changes=new a.EventEmitter,this.editedIndices=[],this.changedSource=new s.Subject,this.changed=this.changedSource.asObservable().pipe(d.switchMap((function(){return t.ngZone.onStable.asObservable().pipe(d.take(1))})))}return e.prototype.editItem=function(e,t){void 0===t&&(t=void 0),this.editedIndices.push({index:e,group:t}),this.onChanged()},e.prototype.addItem=function(e){this.newItem={group:e},this.onChanged()},e.prototype.isEditing=function(){return this.editedIndices.length>0},Object.defineProperty(e.prototype,"hasNewItem",{get:function(){return o.isPresent(this.newItem)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"newDataItem",{get:function(){return this.hasNewItem?this.newItem.group.value:{}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"newItemGroup",{get:function(){return this.hasNewItem?this.newItem.group:new r.FormGroup({})},enumerable:!0,configurable:!0}),e.prototype.editGroup=function(e){return this.context(e).group},e.prototype.close=function(e){c(e)?this.newItem=void 0:(this.editedIndices=this.editedIndices.filter(function(e){return function(t){return t.index!==e}}(e)),this.onChanged())},e.prototype.context=function(e){return c(e)?this.newItem:this.findByIndex(e)},e.prototype.isEdited=function(e){return!(!c(e)||!o.isPresent(this.newItem))||o.isPresent(this.findByIndex(e))},e.prototype.hasEdited=function(e){return o.isPresent(this.context(e))},e.prototype.beginEdit=function(e){this.changes.emit({action:"edit",itemIndex:e})},e.prototype.beginAdd=function(){this.changes.emit({action:"add"})},e.prototype.endEdit=function(e){var t=this.context(e).group;this.changes.emit({action:"cancel",itemIndex:e,formGroup:t,isNew:c(e)})},e.prototype.save=function(e){var t=this.context(e).group;this.changes.emit({action:"save",itemIndex:e,formGroup:t,isNew:c(e)})},e.prototype.remove=function(e){this.changes.emit({action:"remove",itemIndex:e})},e.prototype.findByIndex=function(e){return this.editedIndices.find(function(e){return function(t){return t.index===e}}(e))},e.prototype.onChanged=function(){var e=this;this.ngZone.runOutsideAngular((function(){e.changedSource.next()}))},e=i.__decorate([a.Injectable(),i.__metadata("design:paramtypes",[a.NgZone])],e)}();t.EditService=p},function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(6),o=n(20),s=n(21),d=n(3),c=n(14),p=n(15),l=n(9),u=n(10),m=n(11),g=n(12),v=n(13),h=n(4),f=n(2),_=n(16),y={position:"bottom",buttonCount:5,info:!0,previousNext:!0,type:"numeric",pageSizeValues:[5,10,20]},b=function(){function e(e,t,n,i,r){this.ngZone=e,this.element=t,this.renderer=n,this.editService=i,this.navigationService=r,this.className=!0,this.loading=!1,this.containerRole="listbox",this.listItemRole="option",this.scrollBottom=new a.EventEmitter,this.pageChange=new a.EventEmitter,this.pageSizeChange=new a.EventEmitter,this.edit=new a.EventEmitter,this.cancel=new a.EventEmitter,this.save=new a.EventEmitter,this.remove=new a.EventEmitter,this.add=new a.EventEmitter,this._skip=0,this._navigable=!1,o.validatePackage(s.packageMetadata),this.attachEditHandlers()}return Object.defineProperty(e.prototype,"navigable",{get:function(){return this._navigable},set:function(e){!e&&f.isPresent(this.removeNavigationListeners)?(this.removeNavigationListeners(),this.removeNavigationListeners=null,this.navigationService.isEnabled=!1):e&&!f.isPresent(this.removeNavigationListeners)&&(this.addNavigationListeners(),this.navigationService.isEnabled=!0),this._navigable=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"skip",{get:function(){return this._skip},set:function(e){var t=parseInt(e,10);this._skip=isNaN(t)?0:t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageable",{get:function(){return this._pageable},set:function(e){this._pageable=e,this.pagerSettings=e?Object.assign({},y,e):null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return f.isPresent(this.data)?Array.isArray(this.data)?this.data:this.data.data:[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"total",{get:function(){return f.isPresent(this.data)?Array.isArray(this.data)?this.data.length:this.data.total:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"containerTabindex",{get:function(){return this.navigable?-1:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeIndex",{get:function(){return this.navigationService.activeIndex},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(e){r.isChanged("height",e,!1)&&this.renderer.setStyle(this.element.nativeElement,"height",this.height+"px")},e.prototype.ngOnDestroy=function(){f.isPresent(this.editServiceSubscription)&&this.editServiceSubscription.unsubscribe()},e.prototype.templateContext=function(e){return{$implicit:this.items[e],isLast:e===this.items.length-1,isFirst:0===e,dataItem:this.items[e],index:e}},e.prototype.editTemplateContext=function(e){var t=-1===e,n=t?this.editService.newItemGroup:this.editService.editGroup(e);return{$implicit:n,formGroup:n,dataItem:t?this.editService.newDataItem:this.items[e],isNew:t,index:e}},e.prototype.focus=function(e){var t=this.listViewItems.length;this.navigationService.focusIndex(e,t)},e.prototype.addItem=function(e){var t;if(!(e instanceof _.FormGroup)){var n=Object.keys(e).reduce((t=e,function(e,n){return e[n]=new _.FormControl(t[n]),e}),{});e=new _.FormGroup(n)}this.editService.addItem(e)},e.prototype.editItem=function(e,t){this.editService.editItem(e,t)},e.prototype.closeItem=function(e){this.editService.close(e)},e.prototype.isEdited=function(e){return this.editService.isEdited(e)},e.prototype.handlePageChange=function(e){this.scrollToContainerTop();this.navigationService.setActiveIndex(0),this.pageChange.emit(e)},e.prototype.handleContentScroll=function(){var e=this;if(r.hasObservers(this.scrollBottom)){var t=this.contentContainer.nativeElement,n=t.scrollHeight,i=t.scrollTop;n-t.clientHeight-i<=2&&this.ngZone.run((function(){var t={sender:e};e.scrollBottom.emit(t)}))}},e.prototype.itemPosInSet=function(e){return this.skip+e+1},e.prototype.scrollToContainerTop=function(){var e=this.contentContainer.nativeElement;e.scrollTop=0,e.scrollLeft=0},e.prototype.addNavigationListeners=function(){var e=this;this.ngZone.runOutsideAngular((function(){var t=e.renderer.listen(e.contentContainer.nativeElement,"keydown",(function(t){return e.navigationService.handleKeyDown(t,e.listViewItems.length)})),n=e.renderer.listen(e.contentContainer.nativeElement,"focusin",(function(t){return e.navigationService.handleFocusIn(t)})),i=e.renderer.listen(e.contentContainer.nativeElement,"focusout",(function(t){return e.navigationService.handleFocusOut(t)}));e.removeNavigationListeners=function(){t(),n(),i()}}))},e.prototype.attachEditHandlers=function(){f.isPresent(this.editService)&&(this.editServiceSubscription=this.editService.changes.subscribe(this.emitCRUDEvent.bind(this)))},e.prototype.emitCRUDEvent=function(e){var t=e.action,n=e.itemIndex,i=e.formGroup,a=this.items[n];"add"!==t&&i&&(a=i.value),Object.assign(e,{dataItem:a,sender:this}),this[t].emit(e)},i.__decorate([a.HostBinding("class.k-widget"),a.HostBinding("class.k-listview"),a.HostBinding("class.k-listview-bordered"),a.HostBinding("class.k-d-flex"),i.__metadata("design:type",Boolean)],e.prototype,"className",void 0),i.__decorate([a.ContentChild(l.ItemTemplateDirective,{static:!1}),i.__metadata("design:type",l.ItemTemplateDirective)],e.prototype,"itemTemplate",void 0),i.__decorate([a.ContentChild(u.HeaderTemplateDirective,{static:!1}),i.__metadata("design:type",u.HeaderTemplateDirective)],e.prototype,"headerTemplate",void 0),i.__decorate([a.ContentChild(m.FooterTemplateDirective,{static:!1}),i.__metadata("design:type",m.FooterTemplateDirective)],e.prototype,"footerTemplate",void 0),i.__decorate([a.ContentChild(g.LoaderTemplateDirective,{static:!1}),i.__metadata("design:type",g.LoaderTemplateDirective)],e.prototype,"loaderTemplate",void 0),i.__decorate([a.ViewChild("contentContainer",{static:!0}),i.__metadata("design:type",a.ElementRef)],e.prototype,"contentContainer",void 0),i.__decorate([a.ContentChild(v.EditTemplateDirective,{static:!1}),i.__metadata("design:type",v.EditTemplateDirective)],e.prototype,"editTemplate",void 0),i.__decorate([a.ViewChildren(p.ListViewNavigableItemDirective),i.__metadata("design:type",a.QueryList)],e.prototype,"listViewItems",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Object)],e.prototype,"data",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Boolean)],e.prototype,"loading",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Object)],e.prototype,"containerStyle",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Object)],e.prototype,"itemStyle",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Object)],e.prototype,"containerClass",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Object)],e.prototype,"itemClass",void 0),i.__decorate([a.Input(),i.__metadata("design:type",String)],e.prototype,"containerLabel",void 0),i.__decorate([a.Input(),i.__metadata("design:type",String)],e.prototype,"containerRole",void 0),i.__decorate([a.Input(),i.__metadata("design:type",String)],e.prototype,"listItemRole",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"navigable",null),i.__decorate([a.Input(),i.__metadata("design:type",Number)],e.prototype,"pageSize",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Number),i.__metadata("design:paramtypes",[Number])],e.prototype,"skip",null),i.__decorate([a.Input(),i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[Object])],e.prototype,"pageable",null),i.__decorate([a.Input(),i.__metadata("design:type",Number)],e.prototype,"height",void 0),i.__decorate([a.Output(),i.__metadata("design:type",a.EventEmitter)],e.prototype,"scrollBottom",void 0),i.__decorate([a.Output(),i.__metadata("design:type",a.EventEmitter)],e.prototype,"pageChange",void 0),i.__decorate([a.Output(),i.__metadata("design:type",a.EventEmitter)],e.prototype,"pageSizeChange",void 0),i.__decorate([a.Output(),i.__metadata("design:type",a.EventEmitter)],e.prototype,"edit",void 0),i.__decorate([a.Output(),i.__metadata("design:type",a.EventEmitter)],e.prototype,"cancel",void 0),i.__decorate([a.Output(),i.__metadata("design:type",a.EventEmitter)],e.prototype,"save",void 0),i.__decorate([a.Output(),i.__metadata("design:type",a.EventEmitter)],e.prototype,"remove",void 0),i.__decorate([a.Output(),i.__metadata("design:type",a.EventEmitter)],e.prototype,"add",void 0),e=i.__decorate([a.Component({changeDetection:a.ChangeDetectionStrategy.OnPush,exportAs:"kendoListView",selector:"kendo-listview",providers:[h.EditService,c.NavigationService,d.LocalizationService,{provide:d.L10N_PREFIX,useValue:"kendo.listview"}],template:'\n \x3c!-- top pager --\x3e\n <ng-template\n *ngIf="pagerSettings?.position !== \'bottom\'"\n [ngTemplateOutlet]="pagerTemplate"\n [ngTemplateOutletContext]="{ pagerClass: \'k-listview-pager k-listview-pager-top\' }"\n >\n </ng-template>\n\n \x3c!-- header --\x3e\n <div\n *ngIf="headerTemplate"\n class="k-listview-header"\n >\n <ng-template\n [ngTemplateOutlet]="headerTemplate?.templateRef"\n >\n </ng-template>\n </div>\n\n \x3c!-- content --\x3e\n <div\n #contentContainer\n [attr.tabindex]="containerTabindex"\n class="k-listview-content"\n [ngClass]="containerClass"\n [ngStyle]="containerStyle"\n [kendoEventsOutsideAngular]="{\n scroll: handleContentScroll\n }"\n [scope]="this"\n [attr.role]="containerRole"\n [attr.aria-label]="containerLabel"\n >\n \x3c!-- new item edit template --\x3e\n <div\n *ngIf="editService.hasNewItem"\n class="k-listview-item"\n [attr.role]="listItemRole"\n kendoListViewNavigableItem\n [index]="-1"\n [attr.data-kendo-listview-item-index]="-1"\n [ngClass]="itemClass"\n [ngStyle]="itemStyle"\n >\n <ng-template\n *ngIf="editTemplate"\n [ngTemplateOutlet]="editTemplate?.templateRef"\n [ngTemplateOutletContext]="editTemplateContext(-1)"\n >\n </ng-template>\n </div>\n\n \x3c!-- items --\x3e\n <div\n *ngFor="let dataItem of items; let index = index; let first = first; let last = last;"\n class="k-listview-item"\n [attr.role]="listItemRole"\n [attr.aria-posinset]="itemPosInSet(index)"\n [attr.aria-setsize]="total"\n kendoListViewNavigableItem\n [index]="index"\n [attr.data-kendo-listview-item-index]="index"\n [ngClass]="itemClass"\n [ngStyle]="itemStyle"\n >\n <ng-template\n [ngTemplateOutlet]="isEdited(index) ? editTemplate?.templateRef : itemTemplate?.templateRef"\n [ngTemplateOutletContext]="isEdited(index) ? editTemplateContext(index) : templateContext(index)"\n >\n </ng-template>\n </div>\n\n \x3c!-- loading indicator --\x3e\n <div\n *ngIf="loading && !loaderTemplate"\n class="k-loading-mask"\n >\n \x3c!-- TODO: the k-loading-text is hidden with css but read by readers - review when implementing accessibility + possible localization case --\x3e\n <span class="k-loading-text">Loading</span>\n <div class="k-loading-image"></div>\n <div class="k-loading-color"></div>\n </div>\n <ng-template\n *ngIf="loading && loaderTemplate"\n [ngTemplateOutlet]="loaderTemplate.templateRef"\n >\n </ng-template>\n </div>\n\n \x3c!-- footer --\x3e\n <div\n *ngIf="footerTemplate"\n class="k-listview-footer"\n >\n <ng-template\n [ngTemplateOutlet]="footerTemplate?.templateRef"\n >\n </ng-template>\n </div>\n\n \x3c!-- bottom pager --\x3e\n <ng-template\n *ngIf="pagerSettings?.position !== \'top\'"\n [ngTemplateOutlet]="pagerTemplate"\n [ngTemplateOutletContext]="{ pagerClass: \'k-listview-pager\' }"\n >\n </ng-template>\n\n \x3c!-- pager template --\x3e\n <ng-template #pagerTemplate let-pagerClass="pagerClass">\n <kendo-datapager\n *ngIf="pageable"\n [class]="pagerClass"\n [total]="total"\n [pageSize]="pageSize"\n [skip]="skip"\n [buttonCount]="pagerSettings.buttonCount"\n [info]="pagerSettings.info"\n [previousNext]="pagerSettings.previousNext"\n [type]="pagerSettings.type"\n [pageSizeValues]="pagerSettings.pageSizeValues"\n (pageChange)="handlePageChange($event)"\n (pageSizeChange)="pageSizeChange.emit($event)"\n >\n </kendo-datapager>\n </ng-template>\n '}),i.__metadata("design:paramtypes",[a.NgZone,a.ElementRef,a.Renderer2,h.EditService,c.NavigationService])],e)}();t.ListViewComponent=b},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=i.__decorate([a.Directive({selector:"[kendoListViewItemTemplate]"}),i.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.ItemTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=i.__decorate([a.Directive({selector:"[kendoListViewHeaderTemplate]"}),i.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.HeaderTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=i.__decorate([a.Directive({selector:"[kendoListViewFooterTemplate]"}),i.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.FooterTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=i.__decorate([a.Directive({selector:"[kendoListViewLoaderTemplate]"}),i.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.LoaderTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=i.__decorate([a.Directive({selector:"[kendoListViewEditTemplate]"}),i.__param(0,a.Optional()),i.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.EditTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(8),o=n(6),s=n(2),d=function(){function e(){this.changes=new r.Subject,this.isFocused=!1,this.activeIndex=null}return Object.defineProperty(e.prototype,"isEnabled",{get:function(){return s.isPresent(this.activeIndex)},set:function(e){this.activeIndex=e?0:null,this.changes.next()},enumerable:!0,configurable:!0}),e.prototype.isActive=function(e){return e===this.activeIndex},e.prototype.handleKeyDown=function(e,t){switch(e.keyCode){case o.Keys.ArrowLeft:case o.Keys.ArrowUp:this.navigateToPrevious();break;case o.Keys.ArrowRight:case o.Keys.ArrowDown:this.navigateToNext(t);break;case o.Keys.Home:this.navigateTo(0);break;case o.Keys.End:var n=t-1;this.navigateTo(n);break;default:return}e.preventDefault()},e.prototype.handleFocusIn=function(e){var t=e.target;if(s.isListViewItem(t)){var n=s.getListItemIndex(t);this.isFocused&&n===this.activeIndex||(this.activeIndex=n,this.isFocused=!0,this.changes.next())}else{var i=s.closestWithMatch(t,".k-listview-item");if(s.isPresent(i)){var a=s.getListItemIndex(i);this.setActiveIndex(a)}}},e.prototype.handleFocusOut=function(e){s.isListViewItem(e.target)&&!s.isListViewItem(s.relatedTarget(e))&&(this.isFocused=!1,this.changes.next())},e.prototype.setActiveIndex=function(e){this.isEnabled&&e!==this.activeIndex&&(this.activeIndex=e,this.changes.next())},e.prototype.focusIndex=function(e,t){if(this.isEnabled){var n=parseInt(e,10),i=t-1,a=isNaN(n)?this.activeIndex:s.fitIntoRange(n,0,i);this.navigateTo(a)}},e.prototype.navigateTo=function(e){this.isFocused&&this.activeIndex===e||(this.isFocused=!0,this.activeIndex=e,this.changes.next())},e.prototype.navigateToPrevious=function(){var e=Math.max(this.activeIndex-1,0);this.navigateTo(e)},e.prototype.navigateToNext=function(e){var t=e-1,n=Math.min(this.activeIndex+1,t);this.navigateTo(n)},e=i.__decorate([a.Injectable()],e)}();t.NavigationService=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(14),o=n(2),s=function(){function e(e,t,n){this.hostElement=e,this.renderer=t,this.navigationService=n}return e.prototype.ngOnChanges=function(){this.updateNavigationState()},e.prototype.ngOnInit=function(){this.navigationSubscription=this.navigationService.changes.subscribe(this.updateNavigationState.bind(this))},e.prototype.ngOnDestroy=function(){o.isPresent(this.navigationSubscription)&&this.navigationSubscription.unsubscribe()},e.prototype.updateNavigationState=function(){this.updateTabIndex(),this.updateFocusedState()},e.prototype.updateFocusedState=function(){this.navigationService.isActive(this.index)&&this.navigationService.isFocused?(this.renderer.addClass(this.hostElement.nativeElement,"k-focus"),this.hostElement.nativeElement.focus()):this.renderer.removeClass(this.hostElement.nativeElement,"k-focus")},e.prototype.updateTabIndex=function(){this.navigationService.isEnabled?this.navigationService.isActive(this.index)?this.renderer.setAttribute(this.hostElement.nativeElement,"tabindex","0"):this.renderer.setAttribute(this.hostElement.nativeElement,"tabindex","-1"):this.renderer.removeAttribute(this.hostElement.nativeElement,"tabindex")},i.__decorate([a.Input(),i.__metadata("design:type",Number)],e.prototype,"index",void 0),e=i.__decorate([a.Directive({selector:"[kendoListViewNavigableItem]"}),i.__metadata("design:paramtypes",[a.ElementRef,a.Renderer2,r.NavigationService])],e)}();t.ListViewNavigableItemDirective=s},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(8),o=n(7),s=function(){function e(e){this.listView=e,this.subscriptions=new r.Subscription}return Object.defineProperty(e.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e||[],this.updateListViewData()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.subscriptions.add(this.listView.pageChange.subscribe(this.handlePageChange.bind(this))),this.subscriptions.add(this.listView.pageSizeChange.subscribe(this.handlePageSizeChange.bind(this))),this.updateListViewData()},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.handlePageChange=function(e){this.listView.skip=e.skip,this.listView.pageSize=e.take,this.updateListViewData()},e.prototype.handlePageSizeChange=function(e){this.listView.pageSize=Number(e.newPageSize)},e.prototype.updateListViewData=function(){var e=this.listView.skip||0,t=e+(this.listView.pageSize||this.data.length);this.listView.data={data:this.data.slice(e,t),total:this.data.length}},i.__decorate([a.Input("kendoListViewBinding"),i.__metadata("design:type",Array),i.__metadata("design:paramtypes",[Array])],e.prototype,"data",null),e=i.__decorate([a.Directive({selector:"[kendoListViewBinding]"}),i.__metadata("design:paramtypes",[o.ListViewComponent])],e)}();t.DataBindingDirective=s},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7);t.ListViewComponent=i.ListViewComponent;var a=n(9);t.ItemTemplateDirective=a.ItemTemplateDirective;var r=n(10);t.HeaderTemplateDirective=r.HeaderTemplateDirective;var o=n(11);t.FooterTemplateDirective=o.FooterTemplateDirective;var s=n(12);t.LoaderTemplateDirective=s.LoaderTemplateDirective;var d=n(17);t.DataBindingDirective=d.DataBindingDirective;var c=n(13);t.EditTemplateDirective=c.EditTemplateDirective;var p=n(23);t.PageSizeChangeEvent=p.PageSizeChangeEvent;var l=n(24);t.ListViewModule=l.ListViewModule},function(e,t){e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-listview",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1642513091,version:"",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"}},function(e,t){e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(n(18).PageSizeChangeEvent);t.PageSizeChangeEvent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(25),o=n(18),s=n(6),d=n(7),c=n(15),p=n(9),l=n(10),u=n(11),m=n(26),g=n(12),v=n(17),h=n(13),f=n(27),_=n(28),y=n(29),b=n(30),x=n(31),I=[p.ItemTemplateDirective,l.HeaderTemplateDirective,u.FooterTemplateDirective,g.LoaderTemplateDirective],w=[v.DataBindingDirective],S=[h.EditTemplateDirective,f.EditCommandDirective,_.CancelCommandDirective,y.SaveCommandDirective,b.RemoveCommandDirective,x.AddCommandDirective],C=function(){function e(){}return e=i.__decorate([a.NgModule({declarations:[I,w,S,d.ListViewComponent,m.TemplateContextDirective,c.ListViewNavigableItemDirective],exports:[I,w,S,d.ListViewComponent,r.CommonModule,s.EventsModule],imports:[r.CommonModule,o.PagerModule,s.EventsModule]})],e)}();t.ListViewModule=C},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=function(){function e(e){this.viewContainerRef=e}return Object.defineProperty(e.prototype,"templateContext",{set:function(e){this.insertedViewRef&&(this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef)),this.insertedViewRef=void 0),e.templateRef&&(this.insertedViewRef=this.viewContainerRef.createEmbeddedView(e.templateRef,e))},enumerable:!0,configurable:!0}),i.__decorate([a.Input(),i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[Object])],e.prototype,"templateContext",null),e=i.__decorate([a.Directive({selector:"[templateContext]"}),i.__metadata("design:paramtypes",[a.ViewContainerRef])],e)}();t.TemplateContextDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(5),o=n(3),s=n(4),d=n(2),c=function(e){function t(t,n,i,a,r){var o=e.call(this,n,i,null,a,r)||this;return o.editService=t,o.elementRef=n,o}return i.__extends(t,e),t.prototype.clickHandler=function(e){e.preventDefault();var t=d.getClosestListItemIndex(this.elementRef.nativeElement);this.editService.beginEdit(t)},i.__decorate([a.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"clickHandler",null),t=i.__decorate([a.Directive({selector:"[kendoListViewEditCommand]"}),i.__metadata("design:paramtypes",[s.EditService,a.ElementRef,a.Renderer2,o.LocalizationService,a.NgZone])],t)}(r.Button);t.EditCommandDirective=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(5),o=n(3),s=n(4),d=n(2),c=function(e){function t(t,n,i,a,r){var o=e.call(this,n,i,null,a,r)||this;return o.editService=t,o.elementRef=n,o}return i.__extends(t,e),t.prototype.clickHandler=function(e){e.preventDefault();var t=d.getClosestListItemIndex(this.elementRef.nativeElement);this.editService.isEdited(t)&&this.editService.endEdit(t)},i.__decorate([a.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"clickHandler",null),t=i.__decorate([a.Directive({selector:"[kendoListViewCancelCommand]"}),i.__metadata("design:paramtypes",[s.EditService,a.ElementRef,a.Renderer2,o.LocalizationService,a.NgZone])],t)}(r.Button);t.CancelCommandDirective=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(5),o=n(3),s=n(4),d=n(2),c=function(e){function t(t,n,i,a,r){var o=e.call(this,n,i,null,a,r)||this;return o.editService=t,o.elementRef=n,o}return i.__extends(t,e),t.prototype.clickHandler=function(e){e.preventDefault();var t=d.getClosestListItemIndex(this.elementRef.nativeElement);this.editService.isEdited(t)&&this.editService.save(t)},i.__decorate([a.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"clickHandler",null),t=i.__decorate([a.Directive({selector:"[kendoListViewSaveCommand]"}),i.__metadata("design:paramtypes",[s.EditService,a.ElementRef,a.Renderer2,o.LocalizationService,a.NgZone])],t)}(r.Button);t.SaveCommandDirective=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(5),o=n(3),s=n(4),d=n(2),c=function(e){function t(t,n,i,a,r){var o=e.call(this,n,i,null,a,r)||this;return o.editService=t,o.elementRef=n,o}return i.__extends(t,e),t.prototype.clickHandler=function(e){e.preventDefault();var t=d.getClosestListItemIndex(this.elementRef.nativeElement);this.editService.remove(t)},i.__decorate([a.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"clickHandler",null),t=i.__decorate([a.Directive({selector:"[kendoListViewRemoveCommand]"}),i.__metadata("design:paramtypes",[s.EditService,a.ElementRef,a.Renderer2,o.LocalizationService,a.NgZone])],t)}(r.Button);t.RemoveCommandDirective=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(5),o=n(3),s=n(4),d=function(e){function t(t,n,i,a,r){var o=e.call(this,n,i,null,a,r)||this;return o.editService=t,o}return i.__extends(t,e),t.prototype.clickHandler=function(e){e.preventDefault(),this.editService.beginAdd()},i.__decorate([a.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"clickHandler",null),t=i.__decorate([a.Directive({selector:"[kendoListViewAddCommand]"}),i.__metadata("design:paramtypes",[s.EditService,a.ElementRef,a.Renderer2,o.LocalizationService,a.NgZone])],t)}(r.Button);t.AddCommandDirective=d}])}));
|
|
5
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-buttons"),require("@progress/kendo-angular-common"),require("rxjs"),require("@angular/forms"),require("@progress/kendo-angular-pager"),require("@progress/kendo-licensing"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define(["tslib","@angular/core","@progress/kendo-angular-l10n","@progress/kendo-angular-buttons","@progress/kendo-angular-common","rxjs","@angular/forms","@progress/kendo-angular-pager","@progress/kendo-licensing","rxjs/operators","@angular/common"],t):"object"==typeof exports?exports.KendoAngularListview=t(require("tslib"),require("@angular/core"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-buttons"),require("@progress/kendo-angular-common"),require("rxjs"),require("@angular/forms"),require("@progress/kendo-angular-pager"),require("@progress/kendo-licensing"),require("rxjs/operators"),require("@angular/common")):e.KendoAngularListview=t(e.tslib,e["@angular/core"],e["@progress/kendo-angular-l10n"],e["@progress/kendo-angular-buttons"],e["@progress/kendo-angular-common"],e.rxjs,e["@angular/forms"],e["@progress/kendo-angular-pager"],e["@progress/kendo-licensing"],e["rxjs/operators"],e["@angular/common"])}(window,(function(e,t,n,i,a,r,o,s,d,c,p){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=19)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(6);t.isPresent=function(e){return null!=e},t.isObject=function(e){return t.isPresent(e)&&"object"==typeof e},t.match=function(e,n){var i=e.matches||e.msMatchesSelector||e.webkitMatchesSelector;return!!t.isPresent(i)&&i.call(e,n)},t.isListViewItem=function(e){return!!t.isPresent(e)&&t.match(e,".k-listview-item")},t.getListItemIndex=function(e){return t.isPresent(e)?Number(e.getAttribute("data-kendo-listview-item-index")):null},t.relatedTarget=function(e){return t.isPresent(e.relatedTarget)&&i.isDocumentAvailable()?e.relatedTarget||document.activeElement:null},t.fitIntoRange=function(e,n,i){return!t.isPresent(e)||e<=n?n:e>=i?i:e},t.closestWithMatch=function(e,n){for(var i=e;null!==i&&1===i.nodeType;){if(t.match(i,n))return i;i=i.parentElement||i.parentNode}return null},t.getClosestListItemIndex=function(e){if(!t.isPresent(e))return null;var n=t.closestWithMatch(e,".k-listview-item");return t.getListItemIndex(n)}},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(16),o=n(2),s=n(8),d=n(22),c=function(e){return-1===e||void 0===e},p=function(){function e(e){var t=this;this.ngZone=e,this.changes=new a.EventEmitter,this.editedIndices=[],this.changedSource=new s.Subject,this.changed=this.changedSource.asObservable().pipe(d.switchMap((function(){return t.ngZone.onStable.asObservable().pipe(d.take(1))})))}return e.prototype.editItem=function(e,t){void 0===t&&(t=void 0),this.editedIndices.push({index:e,group:t}),this.onChanged()},e.prototype.addItem=function(e){this.newItem={group:e},this.onChanged()},e.prototype.isEditing=function(){return this.editedIndices.length>0},Object.defineProperty(e.prototype,"hasNewItem",{get:function(){return o.isPresent(this.newItem)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"newDataItem",{get:function(){return this.hasNewItem?this.newItem.group.value:{}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"newItemGroup",{get:function(){return this.hasNewItem?this.newItem.group:new r.FormGroup({})},enumerable:!0,configurable:!0}),e.prototype.editGroup=function(e){return this.context(e).group},e.prototype.close=function(e){c(e)?this.newItem=void 0:(this.editedIndices=this.editedIndices.filter(function(e){return function(t){return t.index!==e}}(e)),this.onChanged())},e.prototype.context=function(e){return c(e)?this.newItem:this.findByIndex(e)},e.prototype.isEdited=function(e){return!(!c(e)||!o.isPresent(this.newItem))||o.isPresent(this.findByIndex(e))},e.prototype.hasEdited=function(e){return o.isPresent(this.context(e))},e.prototype.beginEdit=function(e){this.changes.emit({action:"edit",itemIndex:e})},e.prototype.beginAdd=function(){this.changes.emit({action:"add"})},e.prototype.endEdit=function(e){var t=this.context(e).group;this.changes.emit({action:"cancel",itemIndex:e,formGroup:t,isNew:c(e)})},e.prototype.save=function(e){var t=this.context(e).group;this.changes.emit({action:"save",itemIndex:e,formGroup:t,isNew:c(e)})},e.prototype.remove=function(e){this.changes.emit({action:"remove",itemIndex:e})},e.prototype.findByIndex=function(e){return this.editedIndices.find(function(e){return function(t){return t.index===e}}(e))},e.prototype.onChanged=function(){var e=this;this.ngZone.runOutsideAngular((function(){e.changedSource.next()}))},e=i.__decorate([a.Injectable(),i.__metadata("design:paramtypes",[a.NgZone])],e)}();t.EditService=p},function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(6),o=n(20),s=n(21),d=n(3),c=n(14),p=n(15),l=n(9),u=n(10),m=n(11),g=n(12),v=n(13),h=n(4),f=n(2),_=n(16),y={position:"bottom",buttonCount:5,info:!0,previousNext:!0,type:"numeric",pageSizeValues:[5,10,20]},b=function(){function e(e,t,n,i,r){this.ngZone=e,this.element=t,this.renderer=n,this.editService=i,this.navigationService=r,this.className=!0,this.loading=!1,this.containerRole="listbox",this.listItemRole="option",this.scrollBottom=new a.EventEmitter,this.pageChange=new a.EventEmitter,this.pageSizeChange=new a.EventEmitter,this.edit=new a.EventEmitter,this.cancel=new a.EventEmitter,this.save=new a.EventEmitter,this.remove=new a.EventEmitter,this.add=new a.EventEmitter,this._skip=0,this._navigable=!1,o.validatePackage(s.packageMetadata),this.attachEditHandlers()}return Object.defineProperty(e.prototype,"navigable",{get:function(){return this._navigable},set:function(e){!e&&f.isPresent(this.removeNavigationListeners)?(this.removeNavigationListeners(),this.removeNavigationListeners=null,this.navigationService.isEnabled=!1):e&&!f.isPresent(this.removeNavigationListeners)&&(this.addNavigationListeners(),this.navigationService.isEnabled=!0),this._navigable=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"skip",{get:function(){return this._skip},set:function(e){var t=parseInt(e,10);this._skip=isNaN(t)?0:t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageable",{get:function(){return this._pageable},set:function(e){this._pageable=e,this.pagerSettings=e?Object.assign({},y,e):null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return f.isPresent(this.data)?Array.isArray(this.data)?this.data:this.data.data:[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"total",{get:function(){return f.isPresent(this.data)?Array.isArray(this.data)?this.data.length:this.data.total:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"containerTabindex",{get:function(){return this.navigable?-1:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"activeIndex",{get:function(){return this.navigationService.activeIndex},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(e){r.isChanged("height",e,!1)&&this.renderer.setStyle(this.element.nativeElement,"height",this.height+"px")},e.prototype.ngOnDestroy=function(){f.isPresent(this.editServiceSubscription)&&this.editServiceSubscription.unsubscribe()},e.prototype.templateContext=function(e){return{$implicit:this.items[e],isLast:e===this.items.length-1,isFirst:0===e,dataItem:this.items[e],index:e}},e.prototype.editTemplateContext=function(e){var t=-1===e,n=t?this.editService.newItemGroup:this.editService.editGroup(e);return{$implicit:n,formGroup:n,dataItem:t?this.editService.newDataItem:this.items[e],isNew:t,index:e}},e.prototype.focus=function(e){var t=this.listViewItems.length;this.navigationService.focusIndex(e,t)},e.prototype.addItem=function(e){var t;if(!(e instanceof _.FormGroup)){var n=Object.keys(e).reduce((t=e,function(e,n){return e[n]=new _.FormControl(t[n]),e}),{});e=new _.FormGroup(n)}this.editService.addItem(e)},e.prototype.editItem=function(e,t){this.editService.editItem(e,t)},e.prototype.closeItem=function(e){this.editService.close(e)},e.prototype.isEdited=function(e){return this.editService.isEdited(e)},e.prototype.handlePageChange=function(e){this.scrollToContainerTop();this.navigationService.setActiveIndex(0),this.pageChange.emit(e)},e.prototype.handleContentScroll=function(){var e=this;if(r.hasObservers(this.scrollBottom)){var t=this.contentContainer.nativeElement,n=t.scrollHeight,i=t.scrollTop;n-t.clientHeight-i<=2&&this.ngZone.run((function(){var t={sender:e};e.scrollBottom.emit(t)}))}},e.prototype.itemPosInSet=function(e){return this.skip+e+1},e.prototype.scrollToContainerTop=function(){var e=this.contentContainer.nativeElement;e.scrollTop=0,e.scrollLeft=0},e.prototype.addNavigationListeners=function(){var e=this;this.ngZone.runOutsideAngular((function(){var t=e.renderer.listen(e.contentContainer.nativeElement,"keydown",(function(t){return e.navigationService.handleKeyDown(t,e.listViewItems.length)})),n=e.renderer.listen(e.contentContainer.nativeElement,"focusin",(function(t){return e.navigationService.handleFocusIn(t)})),i=e.renderer.listen(e.contentContainer.nativeElement,"focusout",(function(t){return e.navigationService.handleFocusOut(t)}));e.removeNavigationListeners=function(){t(),n(),i()}}))},e.prototype.attachEditHandlers=function(){f.isPresent(this.editService)&&(this.editServiceSubscription=this.editService.changes.subscribe(this.emitCRUDEvent.bind(this)))},e.prototype.emitCRUDEvent=function(e){var t=e.action,n=e.itemIndex,i=e.formGroup,a=this.items[n];"add"!==t&&i&&(a=i.value),Object.assign(e,{dataItem:a,sender:this}),this[t].emit(e)},i.__decorate([a.HostBinding("class.k-widget"),a.HostBinding("class.k-listview"),a.HostBinding("class.k-listview-bordered"),a.HostBinding("class.k-d-flex"),i.__metadata("design:type",Boolean)],e.prototype,"className",void 0),i.__decorate([a.ContentChild(l.ItemTemplateDirective,{static:!1}),i.__metadata("design:type",l.ItemTemplateDirective)],e.prototype,"itemTemplate",void 0),i.__decorate([a.ContentChild(u.HeaderTemplateDirective,{static:!1}),i.__metadata("design:type",u.HeaderTemplateDirective)],e.prototype,"headerTemplate",void 0),i.__decorate([a.ContentChild(m.FooterTemplateDirective,{static:!1}),i.__metadata("design:type",m.FooterTemplateDirective)],e.prototype,"footerTemplate",void 0),i.__decorate([a.ContentChild(g.LoaderTemplateDirective,{static:!1}),i.__metadata("design:type",g.LoaderTemplateDirective)],e.prototype,"loaderTemplate",void 0),i.__decorate([a.ViewChild("contentContainer",{static:!0}),i.__metadata("design:type",a.ElementRef)],e.prototype,"contentContainer",void 0),i.__decorate([a.ContentChild(v.EditTemplateDirective,{static:!1}),i.__metadata("design:type",v.EditTemplateDirective)],e.prototype,"editTemplate",void 0),i.__decorate([a.ViewChildren(p.ListViewNavigableItemDirective),i.__metadata("design:type",a.QueryList)],e.prototype,"listViewItems",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Object)],e.prototype,"data",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Boolean)],e.prototype,"loading",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Object)],e.prototype,"containerStyle",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Object)],e.prototype,"itemStyle",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Object)],e.prototype,"containerClass",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Object)],e.prototype,"itemClass",void 0),i.__decorate([a.Input(),i.__metadata("design:type",String)],e.prototype,"containerLabel",void 0),i.__decorate([a.Input(),i.__metadata("design:type",String)],e.prototype,"containerRole",void 0),i.__decorate([a.Input(),i.__metadata("design:type",String)],e.prototype,"listItemRole",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[Boolean])],e.prototype,"navigable",null),i.__decorate([a.Input(),i.__metadata("design:type",Number)],e.prototype,"pageSize",void 0),i.__decorate([a.Input(),i.__metadata("design:type",Number),i.__metadata("design:paramtypes",[Number])],e.prototype,"skip",null),i.__decorate([a.Input(),i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[Object])],e.prototype,"pageable",null),i.__decorate([a.Input(),i.__metadata("design:type",Number)],e.prototype,"height",void 0),i.__decorate([a.Output(),i.__metadata("design:type",a.EventEmitter)],e.prototype,"scrollBottom",void 0),i.__decorate([a.Output(),i.__metadata("design:type",a.EventEmitter)],e.prototype,"pageChange",void 0),i.__decorate([a.Output(),i.__metadata("design:type",a.EventEmitter)],e.prototype,"pageSizeChange",void 0),i.__decorate([a.Output(),i.__metadata("design:type",a.EventEmitter)],e.prototype,"edit",void 0),i.__decorate([a.Output(),i.__metadata("design:type",a.EventEmitter)],e.prototype,"cancel",void 0),i.__decorate([a.Output(),i.__metadata("design:type",a.EventEmitter)],e.prototype,"save",void 0),i.__decorate([a.Output(),i.__metadata("design:type",a.EventEmitter)],e.prototype,"remove",void 0),i.__decorate([a.Output(),i.__metadata("design:type",a.EventEmitter)],e.prototype,"add",void 0),e=i.__decorate([a.Component({changeDetection:a.ChangeDetectionStrategy.OnPush,exportAs:"kendoListView",selector:"kendo-listview",providers:[h.EditService,c.NavigationService,d.LocalizationService,{provide:d.L10N_PREFIX,useValue:"kendo.listview"}],template:'\n \x3c!-- top pager --\x3e\n <ng-template\n *ngIf="pagerSettings?.position !== \'bottom\'"\n [ngTemplateOutlet]="pagerTemplate"\n [ngTemplateOutletContext]="{ pagerClass: \'k-listview-pager k-listview-pager-top\' }"\n >\n </ng-template>\n\n \x3c!-- header --\x3e\n <div\n *ngIf="headerTemplate"\n class="k-listview-header"\n >\n <ng-template\n [ngTemplateOutlet]="headerTemplate?.templateRef"\n >\n </ng-template>\n </div>\n\n \x3c!-- content --\x3e\n <div\n #contentContainer\n [attr.tabindex]="containerTabindex"\n class="k-listview-content"\n [ngClass]="containerClass"\n [ngStyle]="containerStyle"\n [kendoEventsOutsideAngular]="{\n scroll: handleContentScroll\n }"\n [scope]="this"\n [attr.role]="containerRole"\n [attr.aria-label]="containerLabel"\n >\n \x3c!-- new item edit template --\x3e\n <div\n *ngIf="editService.hasNewItem"\n class="k-listview-item"\n [attr.role]="listItemRole"\n kendoListViewNavigableItem\n [index]="-1"\n [attr.data-kendo-listview-item-index]="-1"\n [ngClass]="itemClass"\n [ngStyle]="itemStyle"\n >\n <ng-template\n *ngIf="editTemplate"\n [ngTemplateOutlet]="editTemplate?.templateRef"\n [ngTemplateOutletContext]="editTemplateContext(-1)"\n >\n </ng-template>\n </div>\n\n \x3c!-- items --\x3e\n <div\n *ngFor="let dataItem of items; let index = index; let first = first; let last = last;"\n class="k-listview-item"\n [attr.role]="listItemRole"\n [attr.aria-posinset]="itemPosInSet(index)"\n [attr.aria-setsize]="total"\n kendoListViewNavigableItem\n [index]="index"\n [attr.data-kendo-listview-item-index]="index"\n [ngClass]="itemClass"\n [ngStyle]="itemStyle"\n >\n <ng-template\n [ngTemplateOutlet]="isEdited(index) ? editTemplate?.templateRef : itemTemplate?.templateRef"\n [ngTemplateOutletContext]="isEdited(index) ? editTemplateContext(index) : templateContext(index)"\n >\n </ng-template>\n </div>\n\n \x3c!-- loading indicator --\x3e\n <div\n *ngIf="loading && !loaderTemplate"\n class="k-loading-mask"\n >\n \x3c!-- TODO: the k-loading-text is hidden with css but read by readers - review when implementing accessibility + possible localization case --\x3e\n <span class="k-loading-text">Loading</span>\n <div class="k-loading-image"></div>\n <div class="k-loading-color"></div>\n </div>\n <ng-template\n *ngIf="loading && loaderTemplate"\n [ngTemplateOutlet]="loaderTemplate.templateRef"\n >\n </ng-template>\n </div>\n\n \x3c!-- footer --\x3e\n <div\n *ngIf="footerTemplate"\n class="k-listview-footer"\n >\n <ng-template\n [ngTemplateOutlet]="footerTemplate?.templateRef"\n >\n </ng-template>\n </div>\n\n \x3c!-- bottom pager --\x3e\n <ng-template\n *ngIf="pagerSettings?.position !== \'top\'"\n [ngTemplateOutlet]="pagerTemplate"\n [ngTemplateOutletContext]="{ pagerClass: \'k-listview-pager\' }"\n >\n </ng-template>\n\n \x3c!-- pager template --\x3e\n <ng-template #pagerTemplate let-pagerClass="pagerClass">\n <kendo-datapager\n *ngIf="pageable"\n [class]="pagerClass"\n [total]="total"\n [pageSize]="pageSize"\n [skip]="skip"\n [buttonCount]="pagerSettings.buttonCount"\n [info]="pagerSettings.info"\n [previousNext]="pagerSettings.previousNext"\n [type]="pagerSettings.type"\n [pageSizeValues]="pagerSettings.pageSizeValues"\n (pageChange)="handlePageChange($event)"\n (pageSizeChange)="pageSizeChange.emit($event)"\n >\n </kendo-datapager>\n </ng-template>\n '}),i.__metadata("design:paramtypes",[a.NgZone,a.ElementRef,a.Renderer2,h.EditService,c.NavigationService])],e)}();t.ListViewComponent=b},function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=i.__decorate([a.Directive({selector:"[kendoListViewItemTemplate]"}),i.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.ItemTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=i.__decorate([a.Directive({selector:"[kendoListViewHeaderTemplate]"}),i.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.HeaderTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=i.__decorate([a.Directive({selector:"[kendoListViewFooterTemplate]"}),i.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.FooterTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=i.__decorate([a.Directive({selector:"[kendoListViewLoaderTemplate]"}),i.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.LoaderTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=function(){function e(e){this.templateRef=e}return e=i.__decorate([a.Directive({selector:"[kendoListViewEditTemplate]"}),i.__param(0,a.Optional()),i.__metadata("design:paramtypes",[a.TemplateRef])],e)}();t.EditTemplateDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(8),o=n(6),s=n(2),d=function(){function e(){this.changes=new r.Subject,this.isFocused=!1,this.activeIndex=null}return Object.defineProperty(e.prototype,"isEnabled",{get:function(){return s.isPresent(this.activeIndex)},set:function(e){this.activeIndex=e?0:null,this.changes.next()},enumerable:!0,configurable:!0}),e.prototype.isActive=function(e){return e===this.activeIndex},e.prototype.handleKeyDown=function(e,t){switch(e.keyCode){case o.Keys.ArrowLeft:case o.Keys.ArrowUp:this.navigateToPrevious();break;case o.Keys.ArrowRight:case o.Keys.ArrowDown:this.navigateToNext(t);break;case o.Keys.Home:this.navigateTo(0);break;case o.Keys.End:var n=t-1;this.navigateTo(n);break;default:return}e.preventDefault()},e.prototype.handleFocusIn=function(e){var t=e.target;if(s.isListViewItem(t)){var n=s.getListItemIndex(t);this.isFocused&&n===this.activeIndex||(this.activeIndex=n,this.isFocused=!0,this.changes.next())}else{var i=s.closestWithMatch(t,".k-listview-item");if(s.isPresent(i)){var a=s.getListItemIndex(i);this.setActiveIndex(a)}}},e.prototype.handleFocusOut=function(e){s.isListViewItem(e.target)&&!s.isListViewItem(s.relatedTarget(e))&&(this.isFocused=!1,this.changes.next())},e.prototype.setActiveIndex=function(e){this.isEnabled&&e!==this.activeIndex&&(this.activeIndex=e,this.changes.next())},e.prototype.focusIndex=function(e,t){if(this.isEnabled){var n=parseInt(e,10),i=t-1,a=isNaN(n)?this.activeIndex:s.fitIntoRange(n,0,i);this.navigateTo(a)}},e.prototype.navigateTo=function(e){this.isFocused&&this.activeIndex===e||(this.isFocused=!0,this.activeIndex=e,this.changes.next())},e.prototype.navigateToPrevious=function(){var e=Math.max(this.activeIndex-1,0);this.navigateTo(e)},e.prototype.navigateToNext=function(e){var t=e-1,n=Math.min(this.activeIndex+1,t);this.navigateTo(n)},e=i.__decorate([a.Injectable()],e)}();t.NavigationService=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(14),o=n(2),s=function(){function e(e,t,n){this.hostElement=e,this.renderer=t,this.navigationService=n}return e.prototype.ngOnChanges=function(){this.updateNavigationState()},e.prototype.ngOnInit=function(){this.navigationSubscription=this.navigationService.changes.subscribe(this.updateNavigationState.bind(this))},e.prototype.ngOnDestroy=function(){o.isPresent(this.navigationSubscription)&&this.navigationSubscription.unsubscribe()},e.prototype.updateNavigationState=function(){this.updateTabIndex(),this.updateFocusedState()},e.prototype.updateFocusedState=function(){this.navigationService.isActive(this.index)&&this.navigationService.isFocused?(this.renderer.addClass(this.hostElement.nativeElement,"k-state-focused"),this.hostElement.nativeElement.focus()):this.renderer.removeClass(this.hostElement.nativeElement,"k-state-focused")},e.prototype.updateTabIndex=function(){this.navigationService.isEnabled?this.navigationService.isActive(this.index)?this.renderer.setAttribute(this.hostElement.nativeElement,"tabindex","0"):this.renderer.setAttribute(this.hostElement.nativeElement,"tabindex","-1"):this.renderer.removeAttribute(this.hostElement.nativeElement,"tabindex")},i.__decorate([a.Input(),i.__metadata("design:type",Number)],e.prototype,"index",void 0),e=i.__decorate([a.Directive({selector:"[kendoListViewNavigableItem]"}),i.__metadata("design:paramtypes",[a.ElementRef,a.Renderer2,r.NavigationService])],e)}();t.ListViewNavigableItemDirective=s},function(e,t){e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(8),o=n(7),s=function(){function e(e){this.listView=e,this.subscriptions=new r.Subscription}return Object.defineProperty(e.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e||[],this.updateListViewData()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.subscriptions.add(this.listView.pageChange.subscribe(this.handlePageChange.bind(this))),this.subscriptions.add(this.listView.pageSizeChange.subscribe(this.handlePageSizeChange.bind(this))),this.updateListViewData()},e.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},e.prototype.handlePageChange=function(e){this.listView.skip=e.skip,this.listView.pageSize=e.take,this.updateListViewData()},e.prototype.handlePageSizeChange=function(e){this.listView.pageSize=Number(e.newPageSize)},e.prototype.updateListViewData=function(){var e=this.listView.skip||0,t=e+(this.listView.pageSize||this.data.length);this.listView.data={data:this.data.slice(e,t),total:this.data.length}},i.__decorate([a.Input("kendoListViewBinding"),i.__metadata("design:type",Array),i.__metadata("design:paramtypes",[Array])],e.prototype,"data",null),e=i.__decorate([a.Directive({selector:"[kendoListViewBinding]"}),i.__metadata("design:paramtypes",[o.ListViewComponent])],e)}();t.DataBindingDirective=s},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(7);t.ListViewComponent=i.ListViewComponent;var a=n(9);t.ItemTemplateDirective=a.ItemTemplateDirective;var r=n(10);t.HeaderTemplateDirective=r.HeaderTemplateDirective;var o=n(11);t.FooterTemplateDirective=o.FooterTemplateDirective;var s=n(12);t.LoaderTemplateDirective=s.LoaderTemplateDirective;var d=n(17);t.DataBindingDirective=d.DataBindingDirective;var c=n(13);t.EditTemplateDirective=c.EditTemplateDirective;var p=n(23);t.PageSizeChangeEvent=p.PageSizeChangeEvent;var l=n(24);t.ListViewModule=l.ListViewModule},function(e,t){e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-listview",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1642689464,version:"",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"}},function(e,t){e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(n(18).PageSizeChangeEvent);t.PageSizeChangeEvent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(25),o=n(18),s=n(6),d=n(7),c=n(15),p=n(9),l=n(10),u=n(11),m=n(26),g=n(12),v=n(17),h=n(13),f=n(27),_=n(28),y=n(29),b=n(30),x=n(31),I=[p.ItemTemplateDirective,l.HeaderTemplateDirective,u.FooterTemplateDirective,g.LoaderTemplateDirective],w=[v.DataBindingDirective],S=[h.EditTemplateDirective,f.EditCommandDirective,_.CancelCommandDirective,y.SaveCommandDirective,b.RemoveCommandDirective,x.AddCommandDirective],C=function(){function e(){}return e=i.__decorate([a.NgModule({declarations:[I,w,S,d.ListViewComponent,m.TemplateContextDirective,c.ListViewNavigableItemDirective],exports:[I,w,S,d.ListViewComponent,r.CommonModule,s.EventsModule],imports:[r.CommonModule,o.PagerModule,s.EventsModule]})],e)}();t.ListViewModule=C},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=function(){function e(e){this.viewContainerRef=e}return Object.defineProperty(e.prototype,"templateContext",{set:function(e){this.insertedViewRef&&(this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef)),this.insertedViewRef=void 0),e.templateRef&&(this.insertedViewRef=this.viewContainerRef.createEmbeddedView(e.templateRef,e))},enumerable:!0,configurable:!0}),i.__decorate([a.Input(),i.__metadata("design:type",Object),i.__metadata("design:paramtypes",[Object])],e.prototype,"templateContext",null),e=i.__decorate([a.Directive({selector:"[templateContext]"}),i.__metadata("design:paramtypes",[a.ViewContainerRef])],e)}();t.TemplateContextDirective=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(5),o=n(3),s=n(4),d=n(2),c=function(e){function t(t,n,i,a,r){var o=e.call(this,n,i,null,a,r)||this;return o.editService=t,o.elementRef=n,o}return i.__extends(t,e),t.prototype.clickHandler=function(e){e.preventDefault();var t=d.getClosestListItemIndex(this.elementRef.nativeElement);this.editService.beginEdit(t)},i.__decorate([a.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"clickHandler",null),t=i.__decorate([a.Directive({selector:"[kendoListViewEditCommand]"}),i.__metadata("design:paramtypes",[s.EditService,a.ElementRef,a.Renderer2,o.LocalizationService,a.NgZone])],t)}(r.Button);t.EditCommandDirective=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(5),o=n(3),s=n(4),d=n(2),c=function(e){function t(t,n,i,a,r){var o=e.call(this,n,i,null,a,r)||this;return o.editService=t,o.elementRef=n,o}return i.__extends(t,e),t.prototype.clickHandler=function(e){e.preventDefault();var t=d.getClosestListItemIndex(this.elementRef.nativeElement);this.editService.isEdited(t)&&this.editService.endEdit(t)},i.__decorate([a.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"clickHandler",null),t=i.__decorate([a.Directive({selector:"[kendoListViewCancelCommand]"}),i.__metadata("design:paramtypes",[s.EditService,a.ElementRef,a.Renderer2,o.LocalizationService,a.NgZone])],t)}(r.Button);t.CancelCommandDirective=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(5),o=n(3),s=n(4),d=n(2),c=function(e){function t(t,n,i,a,r){var o=e.call(this,n,i,null,a,r)||this;return o.editService=t,o.elementRef=n,o}return i.__extends(t,e),t.prototype.clickHandler=function(e){e.preventDefault();var t=d.getClosestListItemIndex(this.elementRef.nativeElement);this.editService.isEdited(t)&&this.editService.save(t)},i.__decorate([a.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"clickHandler",null),t=i.__decorate([a.Directive({selector:"[kendoListViewSaveCommand]"}),i.__metadata("design:paramtypes",[s.EditService,a.ElementRef,a.Renderer2,o.LocalizationService,a.NgZone])],t)}(r.Button);t.SaveCommandDirective=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(5),o=n(3),s=n(4),d=n(2),c=function(e){function t(t,n,i,a,r){var o=e.call(this,n,i,null,a,r)||this;return o.editService=t,o.elementRef=n,o}return i.__extends(t,e),t.prototype.clickHandler=function(e){e.preventDefault();var t=d.getClosestListItemIndex(this.elementRef.nativeElement);this.editService.remove(t)},i.__decorate([a.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"clickHandler",null),t=i.__decorate([a.Directive({selector:"[kendoListViewRemoveCommand]"}),i.__metadata("design:paramtypes",[s.EditService,a.ElementRef,a.Renderer2,o.LocalizationService,a.NgZone])],t)}(r.Button);t.RemoveCommandDirective=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),a=n(1),r=n(5),o=n(3),s=n(4),d=function(e){function t(t,n,i,a,r){var o=e.call(this,n,i,null,a,r)||this;return o.editService=t,o}return i.__extends(t,e),t.prototype.clickHandler=function(e){e.preventDefault(),this.editService.beginAdd()},i.__decorate([a.HostListener("click",["$event"]),i.__metadata("design:type",Function),i.__metadata("design:paramtypes",[Object]),i.__metadata("design:returntype",void 0)],t.prototype,"clickHandler",null),t=i.__decorate([a.Directive({selector:"[kendoListViewAddCommand]"}),i.__metadata("design:paramtypes",[s.EditService,a.ElementRef,a.Renderer2,o.LocalizationService,a.NgZone])],t)}(r.Button);t.AddCommandDirective=d}])}));
|
|
@@ -33,7 +33,7 @@ var ListViewNavigableItemDirective = /** @class */ (function () {
|
|
|
33
33
|
};
|
|
34
34
|
ListViewNavigableItemDirective.prototype.updateFocusedState = function () {
|
|
35
35
|
var shouldFocus = this.navigationService.isActive(this.index) && this.navigationService.isFocused;
|
|
36
|
-
var focusedCssClass = 'k-
|
|
36
|
+
var focusedCssClass = 'k-state-focused';
|
|
37
37
|
if (shouldFocus) {
|
|
38
38
|
this.renderer.addClass(this.hostElement.nativeElement, focusedCssClass);
|
|
39
39
|
this.hostElement.nativeElement.focus();
|
|
@@ -9,7 +9,7 @@ export var packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-listview',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1642689464,
|
|
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
|
};
|
|
@@ -33,7 +33,7 @@ let ListViewNavigableItemDirective = class ListViewNavigableItemDirective {
|
|
|
33
33
|
}
|
|
34
34
|
updateFocusedState() {
|
|
35
35
|
const shouldFocus = this.navigationService.isActive(this.index) && this.navigationService.isFocused;
|
|
36
|
-
const focusedCssClass = 'k-
|
|
36
|
+
const focusedCssClass = 'k-state-focused';
|
|
37
37
|
if (shouldFocus) {
|
|
38
38
|
this.renderer.addClass(this.hostElement.nativeElement, focusedCssClass);
|
|
39
39
|
this.hostElement.nativeElement.focus();
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-listview',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1642689464,
|
|
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
|
};
|
package/dist/fesm2015/index.js
CHANGED
|
@@ -21,7 +21,7 @@ const packageMetadata = {
|
|
|
21
21
|
name: '@progress/kendo-angular-listview',
|
|
22
22
|
productName: 'Kendo UI for Angular',
|
|
23
23
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
24
|
-
publishDate:
|
|
24
|
+
publishDate: 1642689464,
|
|
25
25
|
version: '',
|
|
26
26
|
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'
|
|
27
27
|
};
|
|
@@ -302,7 +302,7 @@ let ListViewNavigableItemDirective = class ListViewNavigableItemDirective {
|
|
|
302
302
|
}
|
|
303
303
|
updateFocusedState() {
|
|
304
304
|
const shouldFocus = this.navigationService.isActive(this.index) && this.navigationService.isFocused;
|
|
305
|
-
const focusedCssClass = 'k-
|
|
305
|
+
const focusedCssClass = 'k-state-focused';
|
|
306
306
|
if (shouldFocus) {
|
|
307
307
|
this.renderer.addClass(this.hostElement.nativeElement, focusedCssClass);
|
|
308
308
|
this.hostElement.nativeElement.focus();
|
package/dist/fesm5/index.js
CHANGED
|
@@ -21,7 +21,7 @@ var packageMetadata = {
|
|
|
21
21
|
name: '@progress/kendo-angular-listview',
|
|
22
22
|
productName: 'Kendo UI for Angular',
|
|
23
23
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
24
|
-
publishDate:
|
|
24
|
+
publishDate: 1642689464,
|
|
25
25
|
version: '',
|
|
26
26
|
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'
|
|
27
27
|
};
|
|
@@ -301,7 +301,7 @@ var ListViewNavigableItemDirective = /** @class */ (function () {
|
|
|
301
301
|
};
|
|
302
302
|
ListViewNavigableItemDirective.prototype.updateFocusedState = function () {
|
|
303
303
|
var shouldFocus = this.navigationService.isActive(this.index) && this.navigationService.isFocused;
|
|
304
|
-
var focusedCssClass = 'k-
|
|
304
|
+
var focusedCssClass = 'k-state-focused';
|
|
305
305
|
if (shouldFocus) {
|
|
306
306
|
this.renderer.addClass(this.hostElement.nativeElement, focusedCssClass);
|
|
307
307
|
this.hostElement.nativeElement.focus();
|
|
@@ -35,7 +35,7 @@ var ListViewNavigableItemDirective = /** @class */ (function () {
|
|
|
35
35
|
};
|
|
36
36
|
ListViewNavigableItemDirective.prototype.updateFocusedState = function () {
|
|
37
37
|
var shouldFocus = this.navigationService.isActive(this.index) && this.navigationService.isFocused;
|
|
38
|
-
var focusedCssClass = 'k-
|
|
38
|
+
var focusedCssClass = 'k-state-focused';
|
|
39
39
|
if (shouldFocus) {
|
|
40
40
|
this.renderer.addClass(this.hostElement.nativeElement, focusedCssClass);
|
|
41
41
|
this.hostElement.nativeElement.focus();
|
|
@@ -11,7 +11,7 @@ exports.packageMetadata = {
|
|
|
11
11
|
name: '@progress/kendo-angular-listview',
|
|
12
12
|
productName: 'Kendo UI for Angular',
|
|
13
13
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
14
|
-
publishDate:
|
|
14
|
+
publishDate: 1642689464,
|
|
15
15
|
version: '',
|
|
16
16
|
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'
|
|
17
17
|
};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Copyright © 2021 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
|
-
System.register("@progress/kendo-angular-listview",["tslib","@angular/core","@angular/common","@progress/kendo-angular-pager","@progress/kendo-angular-common","rxjs","@progress/kendo-licensing","@progress/kendo-angular-l10n","@angular/forms","@progress/kendo-angular-buttons","rxjs/operators"],function(o){var r,s,d,c,p,l,u,m,v,g,h;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){r=t(e)},function(e){s=t(e)},function(e){d=t(e)},function(e){c=t(e)},function(e){p=t(e)},function(e){l=t(e)},function(e){u=t(e)},function(e){m=t(e)},function(e){v=t(e)},function(e){g=t(e)},function(e){h=t(e)}],execute:function(){function n(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}var i,a;a={},n.m=i=[function(e,t){e.exports=r},function(e,t){e.exports=s},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t(6);n.isPresent=function(e){return null!=e},n.isObject=function(e){return n.isPresent(e)&&"object"==typeof e},n.match=function(e,t){var i=e.matches||e.msMatchesSelector||e.webkitMatchesSelector;return!!n.isPresent(i)&&i.call(e,t)},n.isListViewItem=function(e){return!!n.isPresent(e)&&n.match(e,".k-listview-item")},n.getListItemIndex=function(e){return n.isPresent(e)?Number(e.getAttribute("data-kendo-listview-item-index")):null},n.relatedTarget=function(e){return n.isPresent(e.relatedTarget)&&i.isDocumentAvailable()?e.relatedTarget||document.activeElement:null},n.fitIntoRange=function(e,t,i){return!n.isPresent(e)||e<=t?t:i<=e?i:e},n.closestWithMatch=function(e,t){for(var i=e;null!==i&&1===i.nodeType;){if(n.match(i,t))return i;i=i.parentElement||i.parentNode}return null},n.getClosestListItemIndex=function(e){if(!n.isPresent(e))return null;e=n.closestWithMatch(e,".k-listview-item");return n.getListItemIndex(e)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function n(e){return-1===e||void 0===e}var a=i(0),o=i(1),r=i(16),s=i(2),d=i(12),c=i(28),a=(p.prototype.editItem=function(e,t){this.editedIndices.push({index:e,group:t=void 0===t?void 0:t}),this.onChanged()},p.prototype.addItem=function(e){this.newItem={group:e},this.onChanged()},p.prototype.isEditing=function(){return 0<this.editedIndices.length},Object.defineProperty(p.prototype,"hasNewItem",{get:function(){return s.isPresent(this.newItem)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"newDataItem",{get:function(){return this.hasNewItem?this.newItem.group.value:{}},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"newItemGroup",{get:function(){return this.hasNewItem?this.newItem.group:new r.FormGroup({})},enumerable:!0,configurable:!0}),p.prototype.editGroup=function(e){return this.context(e).group},p.prototype.close=function(e){var t;n(e)?this.newItem=void 0:(this.editedIndices=this.editedIndices.filter((t=e,function(e){return e.index!==t})),this.onChanged())},p.prototype.context=function(e){return n(e)?this.newItem:this.findByIndex(e)},p.prototype.isEdited=function(e){return!(!n(e)||!s.isPresent(this.newItem))||s.isPresent(this.findByIndex(e))},p.prototype.hasEdited=function(e){return s.isPresent(this.context(e))},p.prototype.beginEdit=function(e){this.changes.emit({action:"edit",itemIndex:e})},p.prototype.beginAdd=function(){this.changes.emit({action:"add"})},p.prototype.endEdit=function(e){var t=this.context(e).group;this.changes.emit({action:"cancel",itemIndex:e,formGroup:t,isNew:n(e)})},p.prototype.save=function(e){var t=this.context(e).group;this.changes.emit({action:"save",itemIndex:e,formGroup:t,isNew:n(e)})},p.prototype.remove=function(e){this.changes.emit({action:"remove",itemIndex:e})},p.prototype.findByIndex=function(e){return this.editedIndices.find((t=e,function(e){return e.index===t}));var t},p.prototype.onChanged=function(){var e=this;this.ngZone.runOutsideAngular(function(){e.changedSource.next()})},a.__decorate([o.Injectable(),a.__metadata("design:paramtypes",[o.NgZone])],p));function p(e){var t=this;this.ngZone=e,this.changes=new o.EventEmitter,this.editedIndices=[],this.changedSource=new d.Subject,this.changed=this.changedSource.asObservable().pipe(c.switchMap(function(){return t.ngZone.onStable.asObservable().pipe(c.take(1))}))}t.EditService=a},function(e,t){e.exports=m},function(e,t){e.exports=g},function(e,t){e.exports=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),i=i(1),i=n.__decorate([i.Directive({selector:"[kendoListViewEditTemplate]"}),n.__param(0,i.Optional()),n.__metadata("design:paramtypes",[i.TemplateRef])],a);function a(e){this.templateRef=e}t.EditTemplateDirective=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),i=i(1),i=n.__decorate([i.Directive({selector:"[kendoListViewLoaderTemplate]"}),n.__metadata("design:paramtypes",[i.TemplateRef])],a);function a(e){this.templateRef=e}t.LoaderTemplateDirective=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),i=i(1),i=n.__decorate([i.Directive({selector:"[kendoListViewFooterTemplate]"}),n.__metadata("design:paramtypes",[i.TemplateRef])],a);function a(e){this.templateRef=e}t.FooterTemplateDirective=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),i=i(1),i=n.__decorate([i.Directive({selector:"[kendoListViewHeaderTemplate]"}),n.__metadata("design:paramtypes",[i.TemplateRef])],a);function a(e){this.templateRef=e}t.HeaderTemplateDirective=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),i=i(1),i=n.__decorate([i.Directive({selector:"[kendoListViewItemTemplate]"}),n.__metadata("design:paramtypes",[i.TemplateRef])],a);function a(e){this.templateRef=e}t.ItemTemplateDirective=i},function(e,t){e.exports=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(6),r=i(30),s=i(29),d=i(4),c=i(18),p=i(17),l=i(11),u=i(10),m=i(9),v=i(8),g=i(7),h=i(3),f=i(2),_=i(16),y={position:"bottom",buttonCount:5,info:!0,previousNext:!0,type:"numeric",pageSizeValues:[5,10,20]},c=(Object.defineProperty(b.prototype,"navigable",{get:function(){return this._navigable},set:function(e){!e&&f.isPresent(this.removeNavigationListeners)?(this.removeNavigationListeners(),this.removeNavigationListeners=null,this.navigationService.isEnabled=!1):e&&!f.isPresent(this.removeNavigationListeners)&&(this.addNavigationListeners(),this.navigationService.isEnabled=!0),this._navigable=e},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"skip",{get:function(){return this._skip},set:function(e){e=parseInt(e,10);this._skip=isNaN(e)?0:e},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"pageable",{get:function(){return this._pageable},set:function(e){this._pageable=e,this.pagerSettings=e?Object.assign({},y,e):null},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"items",{get:function(){return f.isPresent(this.data)?(Array.isArray(this.data)?this:this.data).data:[]},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"total",{get:function(){return f.isPresent(this.data)?Array.isArray(this.data)?this.data.length:this.data.total:0},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"containerTabindex",{get:function(){return this.navigable?-1:null},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"activeIndex",{get:function(){return this.navigationService.activeIndex},enumerable:!0,configurable:!0}),b.prototype.ngOnChanges=function(e){a.isChanged("height",e,!1)&&this.renderer.setStyle(this.element.nativeElement,"height",this.height+"px")},b.prototype.ngOnDestroy=function(){f.isPresent(this.editServiceSubscription)&&this.editServiceSubscription.unsubscribe()},b.prototype.templateContext=function(e){return{$implicit:this.items[e],isLast:e===this.items.length-1,isFirst:0===e,dataItem:this.items[e],index:e}},b.prototype.editTemplateContext=function(e){var t=-1===e,i=t?this.editService.newItemGroup:this.editService.editGroup(e);return{$implicit:i,formGroup:i,dataItem:t?this.editService.newDataItem:this.items[e],isNew:t,index:e}},b.prototype.focus=function(e){var t=this.listViewItems.length;this.navigationService.focusIndex(e,t)},b.prototype.addItem=function(e){var t,i;e instanceof _.FormGroup||(t=Object.keys(e).reduce((i=e,function(e,t){return e[t]=new _.FormControl(i[t]),e}),{}),e=new _.FormGroup(t)),this.editService.addItem(e)},b.prototype.editItem=function(e,t){this.editService.editItem(e,t)},b.prototype.closeItem=function(e){this.editService.close(e)},b.prototype.isEdited=function(e){return this.editService.isEdited(e)},b.prototype.handlePageChange=function(e){this.scrollToContainerTop(),this.navigationService.setActiveIndex(0),this.pageChange.emit(e)},b.prototype.handleContentScroll=function(){var e,t,i,n=this;a.hasObservers(this.scrollBottom)&&(t=(e=this.contentContainer.nativeElement).scrollHeight,i=e.scrollTop,t-e.clientHeight-i<=2&&this.ngZone.run(function(){n.scrollBottom.emit({sender:n})}))},b.prototype.itemPosInSet=function(e){return this.skip+e+1},b.prototype.scrollToContainerTop=function(){var e=this.contentContainer.nativeElement;e.scrollTop=0,e.scrollLeft=0},b.prototype.addNavigationListeners=function(){var n=this;this.ngZone.runOutsideAngular(function(){var e=n.renderer.listen(n.contentContainer.nativeElement,"keydown",function(e){return n.navigationService.handleKeyDown(e,n.listViewItems.length)}),t=n.renderer.listen(n.contentContainer.nativeElement,"focusin",function(e){return n.navigationService.handleFocusIn(e)}),i=n.renderer.listen(n.contentContainer.nativeElement,"focusout",function(e){return n.navigationService.handleFocusOut(e)});n.removeNavigationListeners=function(){e(),t(),i()}})},b.prototype.attachEditHandlers=function(){f.isPresent(this.editService)&&(this.editServiceSubscription=this.editService.changes.subscribe(this.emitCRUDEvent.bind(this)))},b.prototype.emitCRUDEvent=function(e){var t=e.action,i=e.itemIndex,n=e.formGroup,i=this.items[i];"add"!==t&&n&&(i=n.value),Object.assign(e,{dataItem:i,sender:this}),this[t].emit(e)},n.__decorate([o.HostBinding("class.k-widget"),o.HostBinding("class.k-listview"),o.HostBinding("class.k-listview-bordered"),o.HostBinding("class.k-d-flex"),n.__metadata("design:type",Boolean)],b.prototype,"className",void 0),n.__decorate([o.ContentChild(l.ItemTemplateDirective,{static:!1}),n.__metadata("design:type",l.ItemTemplateDirective)],b.prototype,"itemTemplate",void 0),n.__decorate([o.ContentChild(u.HeaderTemplateDirective,{static:!1}),n.__metadata("design:type",u.HeaderTemplateDirective)],b.prototype,"headerTemplate",void 0),n.__decorate([o.ContentChild(m.FooterTemplateDirective,{static:!1}),n.__metadata("design:type",m.FooterTemplateDirective)],b.prototype,"footerTemplate",void 0),n.__decorate([o.ContentChild(v.LoaderTemplateDirective,{static:!1}),n.__metadata("design:type",v.LoaderTemplateDirective)],b.prototype,"loaderTemplate",void 0),n.__decorate([o.ViewChild("contentContainer",{static:!0}),n.__metadata("design:type",o.ElementRef)],b.prototype,"contentContainer",void 0),n.__decorate([o.ContentChild(g.EditTemplateDirective,{static:!1}),n.__metadata("design:type",g.EditTemplateDirective)],b.prototype,"editTemplate",void 0),n.__decorate([o.ViewChildren(p.ListViewNavigableItemDirective),n.__metadata("design:type",o.QueryList)],b.prototype,"listViewItems",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],b.prototype,"data",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],b.prototype,"loading",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],b.prototype,"containerStyle",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],b.prototype,"itemStyle",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],b.prototype,"containerClass",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],b.prototype,"itemClass",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],b.prototype,"containerLabel",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],b.prototype,"containerRole",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],b.prototype,"listItemRole",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],b.prototype,"navigable",null),n.__decorate([o.Input(),n.__metadata("design:type",Number)],b.prototype,"pageSize",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Number),n.__metadata("design:paramtypes",[Number])],b.prototype,"skip",null),n.__decorate([o.Input(),n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[Object])],b.prototype,"pageable",null),n.__decorate([o.Input(),n.__metadata("design:type",Number)],b.prototype,"height",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],b.prototype,"scrollBottom",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],b.prototype,"pageChange",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],b.prototype,"pageSizeChange",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],b.prototype,"edit",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],b.prototype,"cancel",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],b.prototype,"save",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],b.prototype,"remove",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],b.prototype,"add",void 0),n.__decorate([o.Component({changeDetection:o.ChangeDetectionStrategy.OnPush,exportAs:"kendoListView",selector:"kendo-listview",providers:[h.EditService,c.NavigationService,d.LocalizationService,{provide:d.L10N_PREFIX,useValue:"kendo.listview"}],template:'\n \x3c!-- top pager --\x3e\n <ng-template\n *ngIf="pagerSettings?.position !== \'bottom\'"\n [ngTemplateOutlet]="pagerTemplate"\n [ngTemplateOutletContext]="{ pagerClass: \'k-listview-pager k-listview-pager-top\' }"\n >\n </ng-template>\n\n \x3c!-- header --\x3e\n <div\n *ngIf="headerTemplate"\n class="k-listview-header"\n >\n <ng-template\n [ngTemplateOutlet]="headerTemplate?.templateRef"\n >\n </ng-template>\n </div>\n\n \x3c!-- content --\x3e\n <div\n #contentContainer\n [attr.tabindex]="containerTabindex"\n class="k-listview-content"\n [ngClass]="containerClass"\n [ngStyle]="containerStyle"\n [kendoEventsOutsideAngular]="{\n scroll: handleContentScroll\n }"\n [scope]="this"\n [attr.role]="containerRole"\n [attr.aria-label]="containerLabel"\n >\n \x3c!-- new item edit template --\x3e\n <div\n *ngIf="editService.hasNewItem"\n class="k-listview-item"\n [attr.role]="listItemRole"\n kendoListViewNavigableItem\n [index]="-1"\n [attr.data-kendo-listview-item-index]="-1"\n [ngClass]="itemClass"\n [ngStyle]="itemStyle"\n >\n <ng-template\n *ngIf="editTemplate"\n [ngTemplateOutlet]="editTemplate?.templateRef"\n [ngTemplateOutletContext]="editTemplateContext(-1)"\n >\n </ng-template>\n </div>\n\n \x3c!-- items --\x3e\n <div\n *ngFor="let dataItem of items; let index = index; let first = first; let last = last;"\n class="k-listview-item"\n [attr.role]="listItemRole"\n [attr.aria-posinset]="itemPosInSet(index)"\n [attr.aria-setsize]="total"\n kendoListViewNavigableItem\n [index]="index"\n [attr.data-kendo-listview-item-index]="index"\n [ngClass]="itemClass"\n [ngStyle]="itemStyle"\n >\n <ng-template\n [ngTemplateOutlet]="isEdited(index) ? editTemplate?.templateRef : itemTemplate?.templateRef"\n [ngTemplateOutletContext]="isEdited(index) ? editTemplateContext(index) : templateContext(index)"\n >\n </ng-template>\n </div>\n\n \x3c!-- loading indicator --\x3e\n <div\n *ngIf="loading && !loaderTemplate"\n class="k-loading-mask"\n >\n \x3c!-- TODO: the k-loading-text is hidden with css but read by readers - review when implementing accessibility + possible localization case --\x3e\n <span class="k-loading-text">Loading</span>\n <div class="k-loading-image"></div>\n <div class="k-loading-color"></div>\n </div>\n <ng-template\n *ngIf="loading && loaderTemplate"\n [ngTemplateOutlet]="loaderTemplate.templateRef"\n >\n </ng-template>\n </div>\n\n \x3c!-- footer --\x3e\n <div\n *ngIf="footerTemplate"\n class="k-listview-footer"\n >\n <ng-template\n [ngTemplateOutlet]="footerTemplate?.templateRef"\n >\n </ng-template>\n </div>\n\n \x3c!-- bottom pager --\x3e\n <ng-template\n *ngIf="pagerSettings?.position !== \'top\'"\n [ngTemplateOutlet]="pagerTemplate"\n [ngTemplateOutletContext]="{ pagerClass: \'k-listview-pager\' }"\n >\n </ng-template>\n\n \x3c!-- pager template --\x3e\n <ng-template #pagerTemplate let-pagerClass="pagerClass">\n <kendo-datapager\n *ngIf="pageable"\n [class]="pagerClass"\n [total]="total"\n [pageSize]="pageSize"\n [skip]="skip"\n [buttonCount]="pagerSettings.buttonCount"\n [info]="pagerSettings.info"\n [previousNext]="pagerSettings.previousNext"\n [type]="pagerSettings.type"\n [pageSizeValues]="pagerSettings.pageSizeValues"\n (pageChange)="handlePageChange($event)"\n (pageSizeChange)="pageSizeChange.emit($event)"\n >\n </kendo-datapager>\n </ng-template>\n '}),n.__metadata("design:paramtypes",[o.NgZone,o.ElementRef,o.Renderer2,h.EditService,c.NavigationService])],b));function b(e,t,i,n,a){this.ngZone=e,this.element=t,this.renderer=i,this.editService=n,this.navigationService=a,this.className=!0,this.loading=!1,this.containerRole="listbox",this.listItemRole="option",this.scrollBottom=new o.EventEmitter,this.pageChange=new o.EventEmitter,this.pageSizeChange=new o.EventEmitter,this.edit=new o.EventEmitter,this.cancel=new o.EventEmitter,this.save=new o.EventEmitter,this.remove=new o.EventEmitter,this.add=new o.EventEmitter,this._skip=0,this._navigable=!1,r.validatePackage(s.packageMetadata),this.attachEditHandlers()}t.ListViewComponent=c},function(e,t){e.exports=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),a=i(1),o=i(12),i=i(13),i=(Object.defineProperty(r.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e||[],this.updateListViewData()},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){this.subscriptions.add(this.listView.pageChange.subscribe(this.handlePageChange.bind(this))),this.subscriptions.add(this.listView.pageSizeChange.subscribe(this.handlePageSizeChange.bind(this))),this.updateListViewData()},r.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},r.prototype.handlePageChange=function(e){this.listView.skip=e.skip,this.listView.pageSize=e.take,this.updateListViewData()},r.prototype.handlePageSizeChange=function(e){this.listView.pageSize=Number(e.newPageSize)},r.prototype.updateListViewData=function(){var e=this.listView.skip||0,t=e+(this.listView.pageSize||this.data.length);this.listView.data={data:this.data.slice(e,t),total:this.data.length}},n.__decorate([a.Input("kendoListViewBinding"),n.__metadata("design:type",Array),n.__metadata("design:paramtypes",[Array])],r.prototype,"data",null),n.__decorate([a.Directive({selector:"[kendoListViewBinding]"}),n.__metadata("design:paramtypes",[i.ListViewComponent])],r));function r(e){this.listView=e,this.subscriptions=new o.Subscription}t.DataBindingDirective=i},function(e,t){e.exports=v},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),a=i(1),o=i(18),r=i(2),o=(s.prototype.ngOnChanges=function(){this.updateNavigationState()},s.prototype.ngOnInit=function(){this.navigationSubscription=this.navigationService.changes.subscribe(this.updateNavigationState.bind(this))},s.prototype.ngOnDestroy=function(){r.isPresent(this.navigationSubscription)&&this.navigationSubscription.unsubscribe()},s.prototype.updateNavigationState=function(){this.updateTabIndex(),this.updateFocusedState()},s.prototype.updateFocusedState=function(){this.navigationService.isActive(this.index)&&this.navigationService.isFocused?(this.renderer.addClass(this.hostElement.nativeElement,"k-focus"),this.hostElement.nativeElement.focus()):this.renderer.removeClass(this.hostElement.nativeElement,"k-focus")},s.prototype.updateTabIndex=function(){this.navigationService.isEnabled?this.navigationService.isActive(this.index)?this.renderer.setAttribute(this.hostElement.nativeElement,"tabindex","0"):this.renderer.setAttribute(this.hostElement.nativeElement,"tabindex","-1"):this.renderer.removeAttribute(this.hostElement.nativeElement,"tabindex")},n.__decorate([a.Input(),n.__metadata("design:type",Number)],s.prototype,"index",void 0),n.__decorate([a.Directive({selector:"[kendoListViewNavigableItem]"}),n.__metadata("design:paramtypes",[a.ElementRef,a.Renderer2,o.NavigationService])],s));function s(e,t,i){this.hostElement=e,this.renderer=t,this.navigationService=i}t.ListViewNavigableItemDirective=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),a=i(1),o=i(12),r=i(6),s=i(2),a=(Object.defineProperty(d.prototype,"isEnabled",{get:function(){return s.isPresent(this.activeIndex)},set:function(e){this.activeIndex=e?0:null,this.changes.next()},enumerable:!0,configurable:!0}),d.prototype.isActive=function(e){return e===this.activeIndex},d.prototype.handleKeyDown=function(e,t){switch(e.keyCode){case r.Keys.ArrowLeft:case r.Keys.ArrowUp:this.navigateToPrevious();break;case r.Keys.ArrowRight:case r.Keys.ArrowDown:this.navigateToNext(t);break;case r.Keys.Home:this.navigateTo(0);break;case r.Keys.End:this.navigateTo(t-1);break;default:return}e.preventDefault()},d.prototype.handleFocusIn=function(e){var t=e.target;s.isListViewItem(t)?(e=s.getListItemIndex(t),this.isFocused&&e===this.activeIndex||(this.activeIndex=e,this.isFocused=!0,this.changes.next())):(t=s.closestWithMatch(t,".k-listview-item"),s.isPresent(t)&&(t=s.getListItemIndex(t),this.setActiveIndex(t)))},d.prototype.handleFocusOut=function(e){s.isListViewItem(e.target)&&!s.isListViewItem(s.relatedTarget(e))&&(this.isFocused=!1,this.changes.next())},d.prototype.setActiveIndex=function(e){this.isEnabled&&e!==this.activeIndex&&(this.activeIndex=e,this.changes.next())},d.prototype.focusIndex=function(e,t){this.isEnabled&&(e=parseInt(e,10),t=t-1,t=isNaN(e)?this.activeIndex:s.fitIntoRange(e,0,t),this.navigateTo(t))},d.prototype.navigateTo=function(e){this.isFocused&&this.activeIndex===e||(this.isFocused=!0,this.activeIndex=e,this.changes.next())},d.prototype.navigateToPrevious=function(){var e=Math.max(this.activeIndex-1,0);this.navigateTo(e)},d.prototype.navigateToNext=function(e){e=Math.min(this.activeIndex+1,e-1);this.navigateTo(e)},n.__decorate([a.Injectable()],d));function d(){this.changes=new o.Subject,this.isFocused=!1,this.activeIndex=null}t.NavigationService=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=i(0),a=i(1),r=i(5),s=i(4),i=i(3),a=(o=r.Button,n.__extends(d,o),d.prototype.clickHandler=function(e){e.preventDefault(),this.editService.beginAdd()},n.__decorate([a.HostListener("click",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],d.prototype,"clickHandler",null),n.__decorate([a.Directive({selector:"[kendoListViewAddCommand]"}),n.__metadata("design:paramtypes",[i.EditService,a.ElementRef,a.Renderer2,s.LocalizationService,a.NgZone])],d));function d(e,t,i,n,a){a=o.call(this,t,i,null,n,a)||this;return a.editService=e,a}t.AddCommandDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=i(0),a=i(1),r=i(5),s=i(4),d=i(3),c=i(2),a=(o=r.Button,n.__extends(p,o),p.prototype.clickHandler=function(e){e.preventDefault();e=c.getClosestListItemIndex(this.elementRef.nativeElement);this.editService.remove(e)},n.__decorate([a.HostListener("click",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],p.prototype,"clickHandler",null),n.__decorate([a.Directive({selector:"[kendoListViewRemoveCommand]"}),n.__metadata("design:paramtypes",[d.EditService,a.ElementRef,a.Renderer2,s.LocalizationService,a.NgZone])],p));function p(e,t,i,n,a){a=o.call(this,t,i,null,n,a)||this;return a.editService=e,a.elementRef=t,a}t.RemoveCommandDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=i(0),a=i(1),r=i(5),s=i(4),d=i(3),c=i(2),a=(o=r.Button,n.__extends(p,o),p.prototype.clickHandler=function(e){e.preventDefault();e=c.getClosestListItemIndex(this.elementRef.nativeElement);this.editService.isEdited(e)&&this.editService.save(e)},n.__decorate([a.HostListener("click",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],p.prototype,"clickHandler",null),n.__decorate([a.Directive({selector:"[kendoListViewSaveCommand]"}),n.__metadata("design:paramtypes",[d.EditService,a.ElementRef,a.Renderer2,s.LocalizationService,a.NgZone])],p));function p(e,t,i,n,a){a=o.call(this,t,i,null,n,a)||this;return a.editService=e,a.elementRef=t,a}t.SaveCommandDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=i(0),a=i(1),r=i(5),s=i(4),d=i(3),c=i(2),a=(o=r.Button,n.__extends(p,o),p.prototype.clickHandler=function(e){e.preventDefault();e=c.getClosestListItemIndex(this.elementRef.nativeElement);this.editService.isEdited(e)&&this.editService.endEdit(e)},n.__decorate([a.HostListener("click",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],p.prototype,"clickHandler",null),n.__decorate([a.Directive({selector:"[kendoListViewCancelCommand]"}),n.__metadata("design:paramtypes",[d.EditService,a.ElementRef,a.Renderer2,s.LocalizationService,a.NgZone])],p));function p(e,t,i,n,a){a=o.call(this,t,i,null,n,a)||this;return a.editService=e,a.elementRef=t,a}t.CancelCommandDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=i(0),a=i(1),r=i(5),s=i(4),d=i(3),c=i(2),a=(o=r.Button,n.__extends(p,o),p.prototype.clickHandler=function(e){e.preventDefault();e=c.getClosestListItemIndex(this.elementRef.nativeElement);this.editService.beginEdit(e)},n.__decorate([a.HostListener("click",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],p.prototype,"clickHandler",null),n.__decorate([a.Directive({selector:"[kendoListViewEditCommand]"}),n.__metadata("design:paramtypes",[d.EditService,a.ElementRef,a.Renderer2,s.LocalizationService,a.NgZone])],p));function p(e,t,i,n,a){a=o.call(this,t,i,null,n,a)||this;return a.editService=e,a.elementRef=t,a}t.EditCommandDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),i=i(1),i=(Object.defineProperty(a.prototype,"templateContext",{set:function(e){this.insertedViewRef&&(this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef)),this.insertedViewRef=void 0),e.templateRef&&(this.insertedViewRef=this.viewContainerRef.createEmbeddedView(e.templateRef,e))},enumerable:!0,configurable:!0}),n.__decorate([i.Input(),n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[Object])],a.prototype,"templateContext",null),n.__decorate([i.Directive({selector:"[templateContext]"}),n.__metadata("design:paramtypes",[i.ViewContainerRef])],a));function a(e){this.viewContainerRef=e}t.TemplateContextDirective=i},function(e,t){e.exports=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),a=i(1),o=i(25),r=i(14),s=i(6),d=i(13),c=i(17),p=i(11),l=i(10),u=i(9),m=i(24),v=i(8),g=i(15),h=i(7),f=i(23),_=i(22),y=i(21),b=i(20),i=i(19),v=[p.ItemTemplateDirective,l.HeaderTemplateDirective,u.FooterTemplateDirective,v.LoaderTemplateDirective],g=[g.DataBindingDirective],i=[h.EditTemplateDirective,f.EditCommandDirective,_.CancelCommandDirective,y.SaveCommandDirective,b.RemoveCommandDirective,i.AddCommandDirective],s=n.__decorate([a.NgModule({declarations:[v,g,i,d.ListViewComponent,m.TemplateContextDirective,c.ListViewNavigableItemDirective],exports:[v,g,i,d.ListViewComponent,o.CommonModule,s.EventsModule],imports:[o.CommonModule,r.PagerModule,s.EventsModule]})],I);function I(){}t.ListViewModule=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,a=i(0),a=(n=i(14).PageSizeChangeEvent,a.__extends(o,n),o);function o(){return null!==n&&n.apply(this,arguments)||this}t.PageSizeChangeEvent=a},function(e,t){e.exports=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-listview",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1642513091,version:"",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"}},function(e,t){e.exports=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(13);t.ListViewComponent=n.ListViewComponent;n=i(11);t.ItemTemplateDirective=n.ItemTemplateDirective;n=i(10);t.HeaderTemplateDirective=n.HeaderTemplateDirective;n=i(9);t.FooterTemplateDirective=n.FooterTemplateDirective;n=i(8);t.LoaderTemplateDirective=n.LoaderTemplateDirective;n=i(15);t.DataBindingDirective=n.DataBindingDirective;n=i(7);t.EditTemplateDirective=n.EditTemplateDirective;n=i(27);t.PageSizeChangeEvent=n.PageSizeChangeEvent;i=i(26);t.ListViewModule=i.ListViewModule,function(e){for(var t in e)o(t,e[t])}(t)}],n.c=a,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=31)}}});
|
|
5
|
+
System.register("@progress/kendo-angular-listview",["tslib","@angular/core","@progress/kendo-angular-pager","@progress/kendo-angular-common","@angular/common","rxjs","@angular/forms","@progress/kendo-angular-l10n","@progress/kendo-licensing","@progress/kendo-angular-buttons","rxjs/operators"],function(o){var r,s,d,c,p,l,u,m,v,g,h;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){r=t(e)},function(e){s=t(e)},function(e){d=t(e)},function(e){c=t(e)},function(e){p=t(e)},function(e){l=t(e)},function(e){u=t(e)},function(e){m=t(e)},function(e){v=t(e)},function(e){g=t(e)},function(e){h=t(e)}],execute:function(){function n(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return i[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}var i,a;a={},n.m=i=[function(e,t){e.exports=r},function(e,t){e.exports=s},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=t(6);n.isPresent=function(e){return null!=e},n.isObject=function(e){return n.isPresent(e)&&"object"==typeof e},n.match=function(e,t){var i=e.matches||e.msMatchesSelector||e.webkitMatchesSelector;return!!n.isPresent(i)&&i.call(e,t)},n.isListViewItem=function(e){return!!n.isPresent(e)&&n.match(e,".k-listview-item")},n.getListItemIndex=function(e){return n.isPresent(e)?Number(e.getAttribute("data-kendo-listview-item-index")):null},n.relatedTarget=function(e){return n.isPresent(e.relatedTarget)&&i.isDocumentAvailable()?e.relatedTarget||document.activeElement:null},n.fitIntoRange=function(e,t,i){return!n.isPresent(e)||e<=t?t:i<=e?i:e},n.closestWithMatch=function(e,t){for(var i=e;null!==i&&1===i.nodeType;){if(n.match(i,t))return i;i=i.parentElement||i.parentNode}return null},n.getClosestListItemIndex=function(e){if(!n.isPresent(e))return null;e=n.closestWithMatch(e,".k-listview-item");return n.getListItemIndex(e)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function n(e){return-1===e||void 0===e}var a=i(0),o=i(1),r=i(16),s=i(2),d=i(12),c=i(28),a=(p.prototype.editItem=function(e,t){this.editedIndices.push({index:e,group:t=void 0===t?void 0:t}),this.onChanged()},p.prototype.addItem=function(e){this.newItem={group:e},this.onChanged()},p.prototype.isEditing=function(){return 0<this.editedIndices.length},Object.defineProperty(p.prototype,"hasNewItem",{get:function(){return s.isPresent(this.newItem)},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"newDataItem",{get:function(){return this.hasNewItem?this.newItem.group.value:{}},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"newItemGroup",{get:function(){return this.hasNewItem?this.newItem.group:new r.FormGroup({})},enumerable:!0,configurable:!0}),p.prototype.editGroup=function(e){return this.context(e).group},p.prototype.close=function(e){var t;n(e)?this.newItem=void 0:(this.editedIndices=this.editedIndices.filter((t=e,function(e){return e.index!==t})),this.onChanged())},p.prototype.context=function(e){return n(e)?this.newItem:this.findByIndex(e)},p.prototype.isEdited=function(e){return!(!n(e)||!s.isPresent(this.newItem))||s.isPresent(this.findByIndex(e))},p.prototype.hasEdited=function(e){return s.isPresent(this.context(e))},p.prototype.beginEdit=function(e){this.changes.emit({action:"edit",itemIndex:e})},p.prototype.beginAdd=function(){this.changes.emit({action:"add"})},p.prototype.endEdit=function(e){var t=this.context(e).group;this.changes.emit({action:"cancel",itemIndex:e,formGroup:t,isNew:n(e)})},p.prototype.save=function(e){var t=this.context(e).group;this.changes.emit({action:"save",itemIndex:e,formGroup:t,isNew:n(e)})},p.prototype.remove=function(e){this.changes.emit({action:"remove",itemIndex:e})},p.prototype.findByIndex=function(e){return this.editedIndices.find((t=e,function(e){return e.index===t}));var t},p.prototype.onChanged=function(){var e=this;this.ngZone.runOutsideAngular(function(){e.changedSource.next()})},a.__decorate([o.Injectable(),a.__metadata("design:paramtypes",[o.NgZone])],p));function p(e){var t=this;this.ngZone=e,this.changes=new o.EventEmitter,this.editedIndices=[],this.changedSource=new d.Subject,this.changed=this.changedSource.asObservable().pipe(c.switchMap(function(){return t.ngZone.onStable.asObservable().pipe(c.take(1))}))}t.EditService=a},function(e,t){e.exports=m},function(e,t){e.exports=g},function(e,t){e.exports=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),i=i(1),i=n.__decorate([i.Directive({selector:"[kendoListViewEditTemplate]"}),n.__param(0,i.Optional()),n.__metadata("design:paramtypes",[i.TemplateRef])],a);function a(e){this.templateRef=e}t.EditTemplateDirective=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),i=i(1),i=n.__decorate([i.Directive({selector:"[kendoListViewLoaderTemplate]"}),n.__metadata("design:paramtypes",[i.TemplateRef])],a);function a(e){this.templateRef=e}t.LoaderTemplateDirective=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),i=i(1),i=n.__decorate([i.Directive({selector:"[kendoListViewFooterTemplate]"}),n.__metadata("design:paramtypes",[i.TemplateRef])],a);function a(e){this.templateRef=e}t.FooterTemplateDirective=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),i=i(1),i=n.__decorate([i.Directive({selector:"[kendoListViewHeaderTemplate]"}),n.__metadata("design:paramtypes",[i.TemplateRef])],a);function a(e){this.templateRef=e}t.HeaderTemplateDirective=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),i=i(1),i=n.__decorate([i.Directive({selector:"[kendoListViewItemTemplate]"}),n.__metadata("design:paramtypes",[i.TemplateRef])],a);function a(e){this.templateRef=e}t.ItemTemplateDirective=i},function(e,t){e.exports=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),o=i(1),a=i(6),r=i(30),s=i(29),d=i(4),c=i(18),p=i(17),l=i(11),u=i(10),m=i(9),v=i(8),g=i(7),h=i(3),f=i(2),_=i(16),y={position:"bottom",buttonCount:5,info:!0,previousNext:!0,type:"numeric",pageSizeValues:[5,10,20]},c=(Object.defineProperty(b.prototype,"navigable",{get:function(){return this._navigable},set:function(e){!e&&f.isPresent(this.removeNavigationListeners)?(this.removeNavigationListeners(),this.removeNavigationListeners=null,this.navigationService.isEnabled=!1):e&&!f.isPresent(this.removeNavigationListeners)&&(this.addNavigationListeners(),this.navigationService.isEnabled=!0),this._navigable=e},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"skip",{get:function(){return this._skip},set:function(e){e=parseInt(e,10);this._skip=isNaN(e)?0:e},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"pageable",{get:function(){return this._pageable},set:function(e){this._pageable=e,this.pagerSettings=e?Object.assign({},y,e):null},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"items",{get:function(){return f.isPresent(this.data)?(Array.isArray(this.data)?this:this.data).data:[]},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"total",{get:function(){return f.isPresent(this.data)?Array.isArray(this.data)?this.data.length:this.data.total:0},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"containerTabindex",{get:function(){return this.navigable?-1:null},enumerable:!0,configurable:!0}),Object.defineProperty(b.prototype,"activeIndex",{get:function(){return this.navigationService.activeIndex},enumerable:!0,configurable:!0}),b.prototype.ngOnChanges=function(e){a.isChanged("height",e,!1)&&this.renderer.setStyle(this.element.nativeElement,"height",this.height+"px")},b.prototype.ngOnDestroy=function(){f.isPresent(this.editServiceSubscription)&&this.editServiceSubscription.unsubscribe()},b.prototype.templateContext=function(e){return{$implicit:this.items[e],isLast:e===this.items.length-1,isFirst:0===e,dataItem:this.items[e],index:e}},b.prototype.editTemplateContext=function(e){var t=-1===e,i=t?this.editService.newItemGroup:this.editService.editGroup(e);return{$implicit:i,formGroup:i,dataItem:t?this.editService.newDataItem:this.items[e],isNew:t,index:e}},b.prototype.focus=function(e){var t=this.listViewItems.length;this.navigationService.focusIndex(e,t)},b.prototype.addItem=function(e){var t,i;e instanceof _.FormGroup||(t=Object.keys(e).reduce((i=e,function(e,t){return e[t]=new _.FormControl(i[t]),e}),{}),e=new _.FormGroup(t)),this.editService.addItem(e)},b.prototype.editItem=function(e,t){this.editService.editItem(e,t)},b.prototype.closeItem=function(e){this.editService.close(e)},b.prototype.isEdited=function(e){return this.editService.isEdited(e)},b.prototype.handlePageChange=function(e){this.scrollToContainerTop(),this.navigationService.setActiveIndex(0),this.pageChange.emit(e)},b.prototype.handleContentScroll=function(){var e,t,i,n=this;a.hasObservers(this.scrollBottom)&&(t=(e=this.contentContainer.nativeElement).scrollHeight,i=e.scrollTop,t-e.clientHeight-i<=2&&this.ngZone.run(function(){n.scrollBottom.emit({sender:n})}))},b.prototype.itemPosInSet=function(e){return this.skip+e+1},b.prototype.scrollToContainerTop=function(){var e=this.contentContainer.nativeElement;e.scrollTop=0,e.scrollLeft=0},b.prototype.addNavigationListeners=function(){var n=this;this.ngZone.runOutsideAngular(function(){var e=n.renderer.listen(n.contentContainer.nativeElement,"keydown",function(e){return n.navigationService.handleKeyDown(e,n.listViewItems.length)}),t=n.renderer.listen(n.contentContainer.nativeElement,"focusin",function(e){return n.navigationService.handleFocusIn(e)}),i=n.renderer.listen(n.contentContainer.nativeElement,"focusout",function(e){return n.navigationService.handleFocusOut(e)});n.removeNavigationListeners=function(){e(),t(),i()}})},b.prototype.attachEditHandlers=function(){f.isPresent(this.editService)&&(this.editServiceSubscription=this.editService.changes.subscribe(this.emitCRUDEvent.bind(this)))},b.prototype.emitCRUDEvent=function(e){var t=e.action,i=e.itemIndex,n=e.formGroup,i=this.items[i];"add"!==t&&n&&(i=n.value),Object.assign(e,{dataItem:i,sender:this}),this[t].emit(e)},n.__decorate([o.HostBinding("class.k-widget"),o.HostBinding("class.k-listview"),o.HostBinding("class.k-listview-bordered"),o.HostBinding("class.k-d-flex"),n.__metadata("design:type",Boolean)],b.prototype,"className",void 0),n.__decorate([o.ContentChild(l.ItemTemplateDirective,{static:!1}),n.__metadata("design:type",l.ItemTemplateDirective)],b.prototype,"itemTemplate",void 0),n.__decorate([o.ContentChild(u.HeaderTemplateDirective,{static:!1}),n.__metadata("design:type",u.HeaderTemplateDirective)],b.prototype,"headerTemplate",void 0),n.__decorate([o.ContentChild(m.FooterTemplateDirective,{static:!1}),n.__metadata("design:type",m.FooterTemplateDirective)],b.prototype,"footerTemplate",void 0),n.__decorate([o.ContentChild(v.LoaderTemplateDirective,{static:!1}),n.__metadata("design:type",v.LoaderTemplateDirective)],b.prototype,"loaderTemplate",void 0),n.__decorate([o.ViewChild("contentContainer",{static:!0}),n.__metadata("design:type",o.ElementRef)],b.prototype,"contentContainer",void 0),n.__decorate([o.ContentChild(g.EditTemplateDirective,{static:!1}),n.__metadata("design:type",g.EditTemplateDirective)],b.prototype,"editTemplate",void 0),n.__decorate([o.ViewChildren(p.ListViewNavigableItemDirective),n.__metadata("design:type",o.QueryList)],b.prototype,"listViewItems",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],b.prototype,"data",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean)],b.prototype,"loading",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],b.prototype,"containerStyle",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],b.prototype,"itemStyle",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],b.prototype,"containerClass",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Object)],b.prototype,"itemClass",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],b.prototype,"containerLabel",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],b.prototype,"containerRole",void 0),n.__decorate([o.Input(),n.__metadata("design:type",String)],b.prototype,"listItemRole",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Boolean),n.__metadata("design:paramtypes",[Boolean])],b.prototype,"navigable",null),n.__decorate([o.Input(),n.__metadata("design:type",Number)],b.prototype,"pageSize",void 0),n.__decorate([o.Input(),n.__metadata("design:type",Number),n.__metadata("design:paramtypes",[Number])],b.prototype,"skip",null),n.__decorate([o.Input(),n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[Object])],b.prototype,"pageable",null),n.__decorate([o.Input(),n.__metadata("design:type",Number)],b.prototype,"height",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],b.prototype,"scrollBottom",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],b.prototype,"pageChange",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],b.prototype,"pageSizeChange",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],b.prototype,"edit",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],b.prototype,"cancel",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],b.prototype,"save",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],b.prototype,"remove",void 0),n.__decorate([o.Output(),n.__metadata("design:type",o.EventEmitter)],b.prototype,"add",void 0),n.__decorate([o.Component({changeDetection:o.ChangeDetectionStrategy.OnPush,exportAs:"kendoListView",selector:"kendo-listview",providers:[h.EditService,c.NavigationService,d.LocalizationService,{provide:d.L10N_PREFIX,useValue:"kendo.listview"}],template:'\n \x3c!-- top pager --\x3e\n <ng-template\n *ngIf="pagerSettings?.position !== \'bottom\'"\n [ngTemplateOutlet]="pagerTemplate"\n [ngTemplateOutletContext]="{ pagerClass: \'k-listview-pager k-listview-pager-top\' }"\n >\n </ng-template>\n\n \x3c!-- header --\x3e\n <div\n *ngIf="headerTemplate"\n class="k-listview-header"\n >\n <ng-template\n [ngTemplateOutlet]="headerTemplate?.templateRef"\n >\n </ng-template>\n </div>\n\n \x3c!-- content --\x3e\n <div\n #contentContainer\n [attr.tabindex]="containerTabindex"\n class="k-listview-content"\n [ngClass]="containerClass"\n [ngStyle]="containerStyle"\n [kendoEventsOutsideAngular]="{\n scroll: handleContentScroll\n }"\n [scope]="this"\n [attr.role]="containerRole"\n [attr.aria-label]="containerLabel"\n >\n \x3c!-- new item edit template --\x3e\n <div\n *ngIf="editService.hasNewItem"\n class="k-listview-item"\n [attr.role]="listItemRole"\n kendoListViewNavigableItem\n [index]="-1"\n [attr.data-kendo-listview-item-index]="-1"\n [ngClass]="itemClass"\n [ngStyle]="itemStyle"\n >\n <ng-template\n *ngIf="editTemplate"\n [ngTemplateOutlet]="editTemplate?.templateRef"\n [ngTemplateOutletContext]="editTemplateContext(-1)"\n >\n </ng-template>\n </div>\n\n \x3c!-- items --\x3e\n <div\n *ngFor="let dataItem of items; let index = index; let first = first; let last = last;"\n class="k-listview-item"\n [attr.role]="listItemRole"\n [attr.aria-posinset]="itemPosInSet(index)"\n [attr.aria-setsize]="total"\n kendoListViewNavigableItem\n [index]="index"\n [attr.data-kendo-listview-item-index]="index"\n [ngClass]="itemClass"\n [ngStyle]="itemStyle"\n >\n <ng-template\n [ngTemplateOutlet]="isEdited(index) ? editTemplate?.templateRef : itemTemplate?.templateRef"\n [ngTemplateOutletContext]="isEdited(index) ? editTemplateContext(index) : templateContext(index)"\n >\n </ng-template>\n </div>\n\n \x3c!-- loading indicator --\x3e\n <div\n *ngIf="loading && !loaderTemplate"\n class="k-loading-mask"\n >\n \x3c!-- TODO: the k-loading-text is hidden with css but read by readers - review when implementing accessibility + possible localization case --\x3e\n <span class="k-loading-text">Loading</span>\n <div class="k-loading-image"></div>\n <div class="k-loading-color"></div>\n </div>\n <ng-template\n *ngIf="loading && loaderTemplate"\n [ngTemplateOutlet]="loaderTemplate.templateRef"\n >\n </ng-template>\n </div>\n\n \x3c!-- footer --\x3e\n <div\n *ngIf="footerTemplate"\n class="k-listview-footer"\n >\n <ng-template\n [ngTemplateOutlet]="footerTemplate?.templateRef"\n >\n </ng-template>\n </div>\n\n \x3c!-- bottom pager --\x3e\n <ng-template\n *ngIf="pagerSettings?.position !== \'top\'"\n [ngTemplateOutlet]="pagerTemplate"\n [ngTemplateOutletContext]="{ pagerClass: \'k-listview-pager\' }"\n >\n </ng-template>\n\n \x3c!-- pager template --\x3e\n <ng-template #pagerTemplate let-pagerClass="pagerClass">\n <kendo-datapager\n *ngIf="pageable"\n [class]="pagerClass"\n [total]="total"\n [pageSize]="pageSize"\n [skip]="skip"\n [buttonCount]="pagerSettings.buttonCount"\n [info]="pagerSettings.info"\n [previousNext]="pagerSettings.previousNext"\n [type]="pagerSettings.type"\n [pageSizeValues]="pagerSettings.pageSizeValues"\n (pageChange)="handlePageChange($event)"\n (pageSizeChange)="pageSizeChange.emit($event)"\n >\n </kendo-datapager>\n </ng-template>\n '}),n.__metadata("design:paramtypes",[o.NgZone,o.ElementRef,o.Renderer2,h.EditService,c.NavigationService])],b));function b(e,t,i,n,a){this.ngZone=e,this.element=t,this.renderer=i,this.editService=n,this.navigationService=a,this.className=!0,this.loading=!1,this.containerRole="listbox",this.listItemRole="option",this.scrollBottom=new o.EventEmitter,this.pageChange=new o.EventEmitter,this.pageSizeChange=new o.EventEmitter,this.edit=new o.EventEmitter,this.cancel=new o.EventEmitter,this.save=new o.EventEmitter,this.remove=new o.EventEmitter,this.add=new o.EventEmitter,this._skip=0,this._navigable=!1,r.validatePackage(s.packageMetadata),this.attachEditHandlers()}t.ListViewComponent=c},function(e,t){e.exports=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),a=i(1),o=i(12),i=i(13),i=(Object.defineProperty(r.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e||[],this.updateListViewData()},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){this.subscriptions.add(this.listView.pageChange.subscribe(this.handlePageChange.bind(this))),this.subscriptions.add(this.listView.pageSizeChange.subscribe(this.handlePageSizeChange.bind(this))),this.updateListViewData()},r.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},r.prototype.handlePageChange=function(e){this.listView.skip=e.skip,this.listView.pageSize=e.take,this.updateListViewData()},r.prototype.handlePageSizeChange=function(e){this.listView.pageSize=Number(e.newPageSize)},r.prototype.updateListViewData=function(){var e=this.listView.skip||0,t=e+(this.listView.pageSize||this.data.length);this.listView.data={data:this.data.slice(e,t),total:this.data.length}},n.__decorate([a.Input("kendoListViewBinding"),n.__metadata("design:type",Array),n.__metadata("design:paramtypes",[Array])],r.prototype,"data",null),n.__decorate([a.Directive({selector:"[kendoListViewBinding]"}),n.__metadata("design:paramtypes",[i.ListViewComponent])],r));function r(e){this.listView=e,this.subscriptions=new o.Subscription}t.DataBindingDirective=i},function(e,t){e.exports=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),a=i(1),o=i(18),r=i(2),o=(s.prototype.ngOnChanges=function(){this.updateNavigationState()},s.prototype.ngOnInit=function(){this.navigationSubscription=this.navigationService.changes.subscribe(this.updateNavigationState.bind(this))},s.prototype.ngOnDestroy=function(){r.isPresent(this.navigationSubscription)&&this.navigationSubscription.unsubscribe()},s.prototype.updateNavigationState=function(){this.updateTabIndex(),this.updateFocusedState()},s.prototype.updateFocusedState=function(){this.navigationService.isActive(this.index)&&this.navigationService.isFocused?(this.renderer.addClass(this.hostElement.nativeElement,"k-state-focused"),this.hostElement.nativeElement.focus()):this.renderer.removeClass(this.hostElement.nativeElement,"k-state-focused")},s.prototype.updateTabIndex=function(){this.navigationService.isEnabled?this.navigationService.isActive(this.index)?this.renderer.setAttribute(this.hostElement.nativeElement,"tabindex","0"):this.renderer.setAttribute(this.hostElement.nativeElement,"tabindex","-1"):this.renderer.removeAttribute(this.hostElement.nativeElement,"tabindex")},n.__decorate([a.Input(),n.__metadata("design:type",Number)],s.prototype,"index",void 0),n.__decorate([a.Directive({selector:"[kendoListViewNavigableItem]"}),n.__metadata("design:paramtypes",[a.ElementRef,a.Renderer2,o.NavigationService])],s));function s(e,t,i){this.hostElement=e,this.renderer=t,this.navigationService=i}t.ListViewNavigableItemDirective=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),a=i(1),o=i(12),r=i(6),s=i(2),a=(Object.defineProperty(d.prototype,"isEnabled",{get:function(){return s.isPresent(this.activeIndex)},set:function(e){this.activeIndex=e?0:null,this.changes.next()},enumerable:!0,configurable:!0}),d.prototype.isActive=function(e){return e===this.activeIndex},d.prototype.handleKeyDown=function(e,t){switch(e.keyCode){case r.Keys.ArrowLeft:case r.Keys.ArrowUp:this.navigateToPrevious();break;case r.Keys.ArrowRight:case r.Keys.ArrowDown:this.navigateToNext(t);break;case r.Keys.Home:this.navigateTo(0);break;case r.Keys.End:this.navigateTo(t-1);break;default:return}e.preventDefault()},d.prototype.handleFocusIn=function(e){var t=e.target;s.isListViewItem(t)?(e=s.getListItemIndex(t),this.isFocused&&e===this.activeIndex||(this.activeIndex=e,this.isFocused=!0,this.changes.next())):(t=s.closestWithMatch(t,".k-listview-item"),s.isPresent(t)&&(t=s.getListItemIndex(t),this.setActiveIndex(t)))},d.prototype.handleFocusOut=function(e){s.isListViewItem(e.target)&&!s.isListViewItem(s.relatedTarget(e))&&(this.isFocused=!1,this.changes.next())},d.prototype.setActiveIndex=function(e){this.isEnabled&&e!==this.activeIndex&&(this.activeIndex=e,this.changes.next())},d.prototype.focusIndex=function(e,t){this.isEnabled&&(e=parseInt(e,10),t=t-1,t=isNaN(e)?this.activeIndex:s.fitIntoRange(e,0,t),this.navigateTo(t))},d.prototype.navigateTo=function(e){this.isFocused&&this.activeIndex===e||(this.isFocused=!0,this.activeIndex=e,this.changes.next())},d.prototype.navigateToPrevious=function(){var e=Math.max(this.activeIndex-1,0);this.navigateTo(e)},d.prototype.navigateToNext=function(e){e=Math.min(this.activeIndex+1,e-1);this.navigateTo(e)},n.__decorate([a.Injectable()],d));function d(){this.changes=new o.Subject,this.isFocused=!1,this.activeIndex=null}t.NavigationService=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=i(0),a=i(1),r=i(5),s=i(4),i=i(3),a=(o=r.Button,n.__extends(d,o),d.prototype.clickHandler=function(e){e.preventDefault(),this.editService.beginAdd()},n.__decorate([a.HostListener("click",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],d.prototype,"clickHandler",null),n.__decorate([a.Directive({selector:"[kendoListViewAddCommand]"}),n.__metadata("design:paramtypes",[i.EditService,a.ElementRef,a.Renderer2,s.LocalizationService,a.NgZone])],d));function d(e,t,i,n,a){a=o.call(this,t,i,null,n,a)||this;return a.editService=e,a}t.AddCommandDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=i(0),a=i(1),r=i(5),s=i(4),d=i(3),c=i(2),a=(o=r.Button,n.__extends(p,o),p.prototype.clickHandler=function(e){e.preventDefault();e=c.getClosestListItemIndex(this.elementRef.nativeElement);this.editService.remove(e)},n.__decorate([a.HostListener("click",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],p.prototype,"clickHandler",null),n.__decorate([a.Directive({selector:"[kendoListViewRemoveCommand]"}),n.__metadata("design:paramtypes",[d.EditService,a.ElementRef,a.Renderer2,s.LocalizationService,a.NgZone])],p));function p(e,t,i,n,a){a=o.call(this,t,i,null,n,a)||this;return a.editService=e,a.elementRef=t,a}t.RemoveCommandDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=i(0),a=i(1),r=i(5),s=i(4),d=i(3),c=i(2),a=(o=r.Button,n.__extends(p,o),p.prototype.clickHandler=function(e){e.preventDefault();e=c.getClosestListItemIndex(this.elementRef.nativeElement);this.editService.isEdited(e)&&this.editService.save(e)},n.__decorate([a.HostListener("click",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],p.prototype,"clickHandler",null),n.__decorate([a.Directive({selector:"[kendoListViewSaveCommand]"}),n.__metadata("design:paramtypes",[d.EditService,a.ElementRef,a.Renderer2,s.LocalizationService,a.NgZone])],p));function p(e,t,i,n,a){a=o.call(this,t,i,null,n,a)||this;return a.editService=e,a.elementRef=t,a}t.SaveCommandDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=i(0),a=i(1),r=i(5),s=i(4),d=i(3),c=i(2),a=(o=r.Button,n.__extends(p,o),p.prototype.clickHandler=function(e){e.preventDefault();e=c.getClosestListItemIndex(this.elementRef.nativeElement);this.editService.isEdited(e)&&this.editService.endEdit(e)},n.__decorate([a.HostListener("click",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],p.prototype,"clickHandler",null),n.__decorate([a.Directive({selector:"[kendoListViewCancelCommand]"}),n.__metadata("design:paramtypes",[d.EditService,a.ElementRef,a.Renderer2,s.LocalizationService,a.NgZone])],p));function p(e,t,i,n,a){a=o.call(this,t,i,null,n,a)||this;return a.editService=e,a.elementRef=t,a}t.CancelCommandDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,n=i(0),a=i(1),r=i(5),s=i(4),d=i(3),c=i(2),a=(o=r.Button,n.__extends(p,o),p.prototype.clickHandler=function(e){e.preventDefault();e=c.getClosestListItemIndex(this.elementRef.nativeElement);this.editService.beginEdit(e)},n.__decorate([a.HostListener("click",["$event"]),n.__metadata("design:type",Function),n.__metadata("design:paramtypes",[Object]),n.__metadata("design:returntype",void 0)],p.prototype,"clickHandler",null),n.__decorate([a.Directive({selector:"[kendoListViewEditCommand]"}),n.__metadata("design:paramtypes",[d.EditService,a.ElementRef,a.Renderer2,s.LocalizationService,a.NgZone])],p));function p(e,t,i,n,a){a=o.call(this,t,i,null,n,a)||this;return a.editService=e,a.elementRef=t,a}t.EditCommandDirective=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),i=i(1),i=(Object.defineProperty(a.prototype,"templateContext",{set:function(e){this.insertedViewRef&&(this.viewContainerRef.remove(this.viewContainerRef.indexOf(this.insertedViewRef)),this.insertedViewRef=void 0),e.templateRef&&(this.insertedViewRef=this.viewContainerRef.createEmbeddedView(e.templateRef,e))},enumerable:!0,configurable:!0}),n.__decorate([i.Input(),n.__metadata("design:type",Object),n.__metadata("design:paramtypes",[Object])],a.prototype,"templateContext",null),n.__decorate([i.Directive({selector:"[templateContext]"}),n.__metadata("design:paramtypes",[i.ViewContainerRef])],a));function a(e){this.viewContainerRef=e}t.TemplateContextDirective=i},function(e,t){e.exports=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),a=i(1),o=i(25),r=i(14),s=i(6),d=i(13),c=i(17),p=i(11),l=i(10),u=i(9),m=i(24),v=i(8),g=i(15),h=i(7),f=i(23),_=i(22),y=i(21),b=i(20),i=i(19),v=[p.ItemTemplateDirective,l.HeaderTemplateDirective,u.FooterTemplateDirective,v.LoaderTemplateDirective],g=[g.DataBindingDirective],i=[h.EditTemplateDirective,f.EditCommandDirective,_.CancelCommandDirective,y.SaveCommandDirective,b.RemoveCommandDirective,i.AddCommandDirective],s=n.__decorate([a.NgModule({declarations:[v,g,i,d.ListViewComponent,m.TemplateContextDirective,c.ListViewNavigableItemDirective],exports:[v,g,i,d.ListViewComponent,o.CommonModule,s.EventsModule],imports:[o.CommonModule,r.PagerModule,s.EventsModule]})],I);function I(){}t.ListViewModule=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,a=i(0),a=(n=i(14).PageSizeChangeEvent,a.__extends(o,n),o);function o(){return null!==n&&n.apply(this,arguments)||this}t.PageSizeChangeEvent=a},function(e,t){e.exports=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-listview",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1642689464,version:"",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"}},function(e,t){e.exports=v},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(13);t.ListViewComponent=n.ListViewComponent;n=i(11);t.ItemTemplateDirective=n.ItemTemplateDirective;n=i(10);t.HeaderTemplateDirective=n.HeaderTemplateDirective;n=i(9);t.FooterTemplateDirective=n.FooterTemplateDirective;n=i(8);t.LoaderTemplateDirective=n.LoaderTemplateDirective;n=i(15);t.DataBindingDirective=n.DataBindingDirective;n=i(7);t.EditTemplateDirective=n.EditTemplateDirective;n=i(27);t.PageSizeChangeEvent=n.PageSizeChangeEvent;i=i(26);t.ListViewModule=i.ListViewModule,function(e){for(var t in e)o(t,e[t])}(t)}],n.c=a,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=31)}}});
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Kendo UI ListView component for Angular",
|
|
4
4
|
"author": "Progress",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
|
-
"version": "3.0.
|
|
6
|
+
"version": "3.0.1-dev.202201201439",
|
|
7
7
|
"main": "dist/npm/index.js",
|
|
8
8
|
"module": "dist/fesm5/index.js",
|
|
9
9
|
"es2015": "dist/fesm2015/index.js",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"@angular/common": "8 - 13",
|
|
36
36
|
"@angular/core": "8 - 13",
|
|
37
37
|
"@angular/forms": "8 - 13",
|
|
38
|
-
"@progress/kendo-angular-buttons": "^
|
|
38
|
+
"@progress/kendo-angular-buttons": "^7.0.0",
|
|
39
39
|
"@progress/kendo-angular-common": "^2.0.0",
|
|
40
40
|
"@progress/kendo-angular-l10n": "^3.0.0",
|
|
41
|
-
"@progress/kendo-angular-pager": "^
|
|
41
|
+
"@progress/kendo-angular-pager": "^3.0.0",
|
|
42
42
|
"@progress/kendo-licensing": "^1.0.2",
|
|
43
43
|
"rxjs": "^6.4.0 || ^7.0.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@progress/kendo-schematics": "^
|
|
46
|
+
"@progress/kendo-schematics": "^2.0.0",
|
|
47
47
|
"tslib": "^1.9.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
"@progress/kendo-data-query": "^1.5.2",
|
|
78
78
|
"@progress/kendo-drawing": "^1.9.0",
|
|
79
79
|
"@progress/kendo-licensing": "^1.0.2",
|
|
80
|
-
"@progress/kendo-theme-bootstrap": "
|
|
81
|
-
"@progress/kendo-theme-default": "
|
|
82
|
-
"@progress/kendo-theme-material": "
|
|
80
|
+
"@progress/kendo-theme-bootstrap": "^5.0.0",
|
|
81
|
+
"@progress/kendo-theme-default": "^5.0.0",
|
|
82
|
+
"@progress/kendo-theme-material": "^5.0.0",
|
|
83
83
|
"@telerik/semantic-prerelease": "^1.0.0",
|
|
84
84
|
"@types/jest": "^21.1.8",
|
|
85
85
|
"@types/node": "ts3.4",
|
|
@@ -4,9 +4,9 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
4
4
|
function default_1(options) {
|
|
5
5
|
const finalOptions = Object.assign({}, options, { mainNgModule: 'ListViewModule', package: 'listview', peerDependencies: {
|
|
6
6
|
// Peers of pager
|
|
7
|
-
"@progress/kendo-angular-dropdowns": "^
|
|
8
|
-
"@progress/kendo-angular-treeview": "^
|
|
9
|
-
"@progress/kendo-angular-inputs": "^
|
|
7
|
+
"@progress/kendo-angular-dropdowns": "^6.0.0",
|
|
8
|
+
"@progress/kendo-angular-treeview": "^6.0.0",
|
|
9
|
+
"@progress/kendo-angular-inputs": "^8.0.0",
|
|
10
10
|
"@progress/kendo-angular-intl": "^3.0.0",
|
|
11
11
|
"@progress/kendo-angular-l10n": "^3.0.0",
|
|
12
12
|
"@progress/kendo-angular-popup": "^4.0.0",
|