@progress/kendo-angular-listview 3.0.2 → 4.0.0-next.202204010900
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/bundles/kendo-angular-listview.umd.js +5 -0
- package/{dist/es2015/data-binding → data-binding}/data-binding.directive.d.ts +5 -1
- package/{dist/es2015/editing → editing}/commands/add-command.directive.d.ts +3 -0
- package/{dist/es2015/editing → editing}/commands/cancel-command.directive.d.ts +3 -0
- package/{dist/es2015/editing → editing}/commands/edit-command.directive.d.ts +3 -0
- package/{dist/es2015/editing → editing}/commands/remove-command.directive.d.ts +3 -0
- package/{dist/es2015/editing → editing}/commands/save-command.directive.d.ts +3 -0
- package/{dist/es2015/editing → editing}/edit-template.directive.d.ts +3 -0
- package/{dist/es2015/editing → editing}/edit.service.d.ts +6 -3
- package/{dist/es2015/editing → editing}/events/add-event-args.interface.d.ts +0 -0
- package/{dist/es2015/editing → editing}/events/cancel-event-args.interface.d.ts +0 -0
- package/{dist/es2015/editing → editing}/events/edit-event-args.interface.d.ts +0 -0
- package/{dist/es2015/editing → editing}/events/remove-event-args.interface.d.ts +0 -0
- package/{dist/es2015/editing → editing}/events/save-event-args.interface.d.ts +0 -0
- package/{dist/es2015 → esm2015}/data-binding/data-binding.directive.js +15 -16
- package/esm2015/editing/commands/add-command.directive.js +49 -0
- package/{dist/es2015 → esm2015}/editing/commands/cancel-command.directive.js +17 -23
- package/{dist/es2015 → esm2015}/editing/commands/edit-command.directive.js +17 -23
- package/{dist/es2015 → esm2015}/editing/commands/remove-command.directive.js +17 -23
- package/{dist/es2015 → esm2015}/editing/commands/save-command.directive.js +17 -23
- package/{dist/es2015 → esm2015}/editing/edit-template.directive.js +14 -12
- package/{dist/es2015 → esm2015}/editing/edit.service.js +9 -13
- package/{dist/es → esm2015}/editing/events/add-event-args.interface.js +1 -0
- package/{dist/es2015 → esm2015}/editing/events/cancel-event-args.interface.js +1 -0
- package/{dist/es2015 → esm2015}/editing/events/edit-event-args.interface.js +1 -0
- package/{dist/es2015 → esm2015}/editing/events/remove-event-args.interface.js +1 -0
- package/{dist/es → esm2015}/editing/events/save-event-args.interface.js +1 -0
- package/{dist/es/editing/events/remove-event-args.interface.js → esm2015/kendo-angular-listview.js} +4 -0
- package/{dist/es2015 → esm2015}/listview.component.js +242 -155
- package/{dist/es2015 → esm2015}/listview.module.js +56 -26
- package/{dist/es → esm2015}/main.js +5 -0
- package/{dist/es → esm2015}/models/listview-data-result.js +1 -0
- package/{dist/es → esm2015}/models/page-change-event.js +1 -0
- package/{dist/es2015 → esm2015}/models/page-size-change-event.js +0 -0
- package/{dist/es → esm2015}/models/page-size-item.js +1 -0
- package/{dist/es → esm2015}/models/pager-position.js +1 -0
- package/{dist/es → esm2015}/models/pager-settings.js +1 -0
- package/{dist/es → esm2015}/models/pager-type.js +1 -0
- package/{dist/es → esm2015}/models/scroll-bottom-event.js +1 -0
- package/{dist/es2015 → esm2015}/navigation/listview-navigable-item.directive.js +15 -18
- package/{dist/es2015 → esm2015}/navigation/navigation.service.js +8 -13
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/esm2015/templates/footer-template.directive.js +24 -0
- package/esm2015/templates/header-template.directive.js +24 -0
- package/{dist/es2015 → esm2015}/templates/item-template.directive.js +12 -11
- package/esm2015/templates/loader-template.directive.js +24 -0
- package/esm2015/templates/template-context.directive.js +33 -0
- package/{dist/es2015 → esm2015}/utils.js +0 -0
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-listview.js} +521 -417
- package/{dist/es/editing/events/cancel-event-args.interface.js → kendo-angular-listview.d.ts} +5 -0
- package/{dist/es2015/listview.component.d.ts → listview.component.d.ts} +13 -7
- package/listview.module.d.ts +39 -0
- package/{dist/es2015/main.d.ts → main.d.ts} +5 -0
- package/{dist/es2015/models → models}/listview-data-result.d.ts +0 -0
- package/{dist/es2015/models → models}/page-change-event.d.ts +0 -0
- package/{dist/es2015/models → models}/page-size-change-event.d.ts +0 -0
- package/{dist/es2015/models → models}/page-size-item.d.ts +0 -0
- package/{dist/es2015/models → models}/pager-position.d.ts +0 -0
- package/{dist/es2015/models → models}/pager-settings.d.ts +0 -0
- package/{dist/es2015/models → models}/pager-type.d.ts +0 -0
- package/{dist/es2015/models → models}/scroll-bottom-event.d.ts +0 -0
- package/{dist/es2015/navigation → navigation}/listview-navigable-item.directive.d.ts +3 -0
- package/{dist/es2015/navigation → navigation}/navigation.service.d.ts +5 -1
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +36 -108
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/{dist/es2015/templates → templates}/footer-template.directive.d.ts +3 -0
- package/{dist/es2015/templates → templates}/header-template.directive.d.ts +3 -0
- package/{dist/es2015/templates → templates}/item-template.directive.d.ts +3 -0
- package/{dist/es2015/templates → templates}/loader-template.directive.d.ts +3 -0
- package/{dist/es2015/templates → templates}/template-context.directive.d.ts +4 -1
- package/{dist/es2015/utils.d.ts → utils.d.ts} +0 -0
- package/dist/cdn/js/kendo-angular-listview.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/data-binding/data-binding.directive.js +0 -69
- package/dist/es/editing/commands/add-command.directive.js +0 -58
- package/dist/es/editing/commands/cancel-command.directive.js +0 -74
- package/dist/es/editing/commands/edit-command.directive.js +0 -62
- package/dist/es/editing/commands/remove-command.directive.js +0 -61
- package/dist/es/editing/commands/save-command.directive.js +0 -74
- package/dist/es/editing/edit-template.directive.js +0 -32
- package/dist/es/editing/edit.service.js +0 -136
- package/dist/es/editing/events/edit-event-args.interface.js +0 -4
- package/dist/es/index.js +0 -17
- package/dist/es/listview.component.js +0 -534
- package/dist/es/listview.module.js +0 -83
- package/dist/es/models/page-size-change-event.js +0 -18
- package/dist/es/navigation/listview-navigable-item.directive.js +0 -70
- package/dist/es/navigation/navigation.service.js +0 -162
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/templates/footer-template.directive.js +0 -24
- package/dist/es/templates/header-template.directive.js +0 -24
- package/dist/es/templates/item-template.directive.js +0 -30
- package/dist/es/templates/loader-template.directive.js +0 -24
- package/dist/es/templates/template-context.directive.js +0 -40
- package/dist/es/utils.js +0 -103
- package/dist/es2015/editing/commands/add-command.directive.js +0 -55
- package/dist/es2015/editing/events/add-event-args.interface.js +0 -4
- package/dist/es2015/editing/events/save-event-args.interface.js +0 -4
- package/dist/es2015/index.d.ts +0 -17
- package/dist/es2015/index.js +0 -17
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/listview.module.d.ts +0 -18
- package/dist/es2015/main.js +0 -13
- package/dist/es2015/models/listview-data-result.js +0 -4
- package/dist/es2015/models/page-change-event.js +0 -4
- package/dist/es2015/models/page-size-item.js +0 -4
- package/dist/es2015/models/pager-position.js +0 -4
- package/dist/es2015/models/pager-settings.js +0 -4
- package/dist/es2015/models/pager-type.js +0 -4
- package/dist/es2015/models/scroll-bottom-event.js +0 -4
- package/dist/es2015/templates/footer-template.directive.js +0 -23
- package/dist/es2015/templates/header-template.directive.js +0 -23
- package/dist/es2015/templates/loader-template.directive.js +0 -23
- package/dist/es2015/templates/template-context.directive.js +0 -35
- package/dist/fesm5/index.js +0 -1528
- package/dist/npm/data-binding/data-binding.directive.js +0 -71
- package/dist/npm/editing/commands/add-command.directive.js +0 -60
- package/dist/npm/editing/commands/cancel-command.directive.js +0 -76
- package/dist/npm/editing/commands/edit-command.directive.js +0 -64
- package/dist/npm/editing/commands/remove-command.directive.js +0 -63
- package/dist/npm/editing/commands/save-command.directive.js +0 -76
- package/dist/npm/editing/edit-template.directive.js +0 -34
- package/dist/npm/editing/edit.service.js +0 -140
- package/dist/npm/editing/events/add-event-args.interface.js +0 -6
- package/dist/npm/editing/events/cancel-event-args.interface.js +0 -6
- package/dist/npm/editing/events/edit-event-args.interface.js +0 -6
- package/dist/npm/editing/events/remove-event-args.interface.js +0 -6
- package/dist/npm/editing/events/save-event-args.interface.js +0 -6
- package/dist/npm/index.js +0 -29
- package/dist/npm/listview.component.js +0 -536
- package/dist/npm/listview.module.js +0 -85
- package/dist/npm/main.js +0 -24
- package/dist/npm/models/listview-data-result.js +0 -6
- package/dist/npm/models/page-change-event.js +0 -6
- package/dist/npm/models/page-size-change-event.js +0 -20
- package/dist/npm/models/page-size-item.js +0 -6
- package/dist/npm/models/pager-position.js +0 -6
- package/dist/npm/models/pager-settings.js +0 -6
- package/dist/npm/models/pager-type.js +0 -6
- package/dist/npm/models/scroll-bottom-event.js +0 -6
- package/dist/npm/navigation/listview-navigable-item.directive.js +0 -72
- package/dist/npm/navigation/navigation.service.js +0 -164
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/templates/footer-template.directive.js +0 -26
- package/dist/npm/templates/header-template.directive.js +0 -26
- package/dist/npm/templates/item-template.directive.js +0 -32
- package/dist/npm/templates/loader-template.directive.js +0 -26
- package/dist/npm/templates/template-context.directive.js +0 -42
- package/dist/npm/utils.js +0 -105
- package/dist/systemjs/kendo-angular-listview.js +0 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@progress/kendo-angular-common"),require("@progress/kendo-licensing"),require("@progress/kendo-angular-l10n"),require("rxjs"),require("@angular/forms"),require("rxjs/operators"),require("@progress/kendo-angular-pager"),require("@angular/common"),require("@progress/kendo-angular-buttons")):"function"==typeof define&&define.amd?define("KendoAngularListview",["exports","@angular/core","@progress/kendo-angular-common","@progress/kendo-licensing","@progress/kendo-angular-l10n","rxjs","@angular/forms","rxjs/operators","@progress/kendo-angular-pager","@angular/common","@progress/kendo-angular-buttons"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularListview={},e.ng.core,e.KendoAngularCommon,e.KendoLicensing,e.KendoAngularL10N,e.rxjs,e.ng.forms,e.rxjs.operators,e.KendoAngularPager,e.ng.common,e.KendoAngularButtons)}(this,function(e,r,a,z,t,n,i,j,o,s,l){"use strict";function p(n){if(n&&n.__esModule)return n;var i=Object.create(null);return n&&Object.keys(n).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(n,e),Object.defineProperty(i,e,t.get?t:{enumerable:!0,get:function(){return n[e]}}))}),i.default=n,Object.freeze(i)}function A(e,t){var n=e.matches||e.msMatchesSelector||e.webkitMatchesSelector;return!!v(n)&&n.call(e,t)}function M(e){return!!v(e)&&A(e,K)}function H(e){return v(e)?Number(e.getAttribute("data-kendo-listview-item-index")):null}function _(e,t){for(var n=e;null!==n&&1===n.nodeType;){if(A(n,t))return n;n=n.parentElement||n.parentNode}return null}function c(e){return v(e)?(e=_(e,K),H(e)):null}var d=p(r),B=p(a),g=p(t),m=p(o),u=p(s),Z={name:"@progress/kendo-angular-listview",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1648803587,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"},K=".k-listview-item",v=function(e){return null!=e},h=(Object.defineProperty(y.prototype,"isEnabled",{get:function(){return v(this.activeIndex)},set:function(e){this.activeIndex=e?0:null,this.changes.next()},enumerable:!1,configurable:!0}),y.prototype.isActive=function(e){return e===this.activeIndex},y.prototype.handleKeyDown=function(e,t){switch(e.keyCode){case a.Keys.ArrowLeft:case a.Keys.ArrowUp:this.navigateToPrevious();break;case a.Keys.ArrowRight:case a.Keys.ArrowDown:this.navigateToNext(t);break;case a.Keys.Home:this.navigateTo(0);break;case a.Keys.End:this.navigateTo(t-1);break;default:return}e.preventDefault()},y.prototype.handleFocusIn=function(e){e=e.target;if(!M(e))return t=_(e,".k-listview-item"),void(v(t)&&(t=H(t),this.setActiveIndex(t)));var t=H(e);this.isFocused&&t===this.activeIndex||(this.activeIndex=t,this.isFocused=!0,this.changes.next())},y.prototype.handleFocusOut=function(e){M(e.target)&&!M(v((e=e).relatedTarget)&&a.isDocumentAvailable()?e.relatedTarget||document.activeElement:null)&&(this.isFocused=!1,this.changes.next())},y.prototype.setActiveIndex=function(e){this.isEnabled&&e!==this.activeIndex&&(this.activeIndex=e,this.changes.next())},y.prototype.focusIndex=function(e,t){var n;this.isEnabled&&(e=parseInt(e,10),t=t-1,n=isNaN(e)?this.activeIndex:(n=0,t=t,!v(e=e)||e<=n?n:t<=e?t:e),this.navigateTo(n))},y.prototype.navigateTo=function(e){this.isFocused&&this.activeIndex===e||(this.isFocused=!0,this.activeIndex=e,this.changes.next())},y.prototype.navigateToPrevious=function(){var e=Math.max(this.activeIndex-1,0);this.navigateTo(e)},y.prototype.navigateToNext=function(e){e=Math.min(this.activeIndex+1,e-1);this.navigateTo(e)},y);function y(){this.changes=new n.Subject,this.isFocused=!1,this.activeIndex=null}h.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:h,deps:[],target:d.ɵɵFactoryTarget.Injectable}),h.ɵprov=d.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:h}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:h,decorators:[{type:r.Injectable}]});I.prototype.ngOnChanges=function(){this.updateNavigationState()},I.prototype.ngOnInit=function(){this.navigationSubscription=this.navigationService.changes.subscribe(this.updateNavigationState.bind(this))},I.prototype.ngOnDestroy=function(){v(this.navigationSubscription)&&this.navigationSubscription.unsubscribe()},I.prototype.updateNavigationState=function(){this.updateTabIndex(),this.updateFocusedState()},I.prototype.updateFocusedState=function(){var e="k-state-focused";this.navigationService.isActive(this.index)&&this.navigationService.isFocused?(this.renderer.addClass(this.hostElement.nativeElement,e),this.hostElement.nativeElement.focus()):this.renderer.removeClass(this.hostElement.nativeElement,e)},I.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")};var f=I;function I(e,t,n){this.hostElement=e,this.renderer=t,this.navigationService=n}f.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:f,deps:[{token:d.ElementRef},{token:d.Renderer2},{token:h}],target:d.ɵɵFactoryTarget.Directive}),f.ɵdir=d.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:f,selector:"[kendoListViewNavigableItem]",inputs:{index:"index"},usesOnChanges:!0,ngImport:d}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:f,decorators:[{type:r.Directive,args:[{selector:"[kendoListViewNavigableItem]"}]}],ctorParameters:function(){return[{type:d.ElementRef},{type:d.Renderer2},{type:h}]},propDecorators:{index:[{type:r.Input}]}});function k(e){return-1===e||void 0===e}var C=function(e){this.templateRef=e},b=(C.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:C,deps:[{token:d.TemplateRef}],target:d.ɵɵFactoryTarget.Directive}),C.ɵdir=d.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:C,selector:"[kendoListViewItemTemplate]",ngImport:d}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:C,decorators:[{type:r.Directive,args:[{selector:"[kendoListViewItemTemplate]"}]}],ctorParameters:function(){return[{type:d.TemplateRef}]}}),function(e){this.templateRef=e}),w=(b.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:b,deps:[{token:d.TemplateRef}],target:d.ɵɵFactoryTarget.Directive}),b.ɵdir=d.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:b,selector:"[kendoListViewHeaderTemplate]",ngImport:d}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:b,decorators:[{type:r.Directive,args:[{selector:"[kendoListViewHeaderTemplate]"}]}],ctorParameters:function(){return[{type:d.TemplateRef}]}}),function(e){this.templateRef=e}),S=(w.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:w,deps:[{token:d.TemplateRef}],target:d.ɵɵFactoryTarget.Directive}),w.ɵdir=d.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:w,selector:"[kendoListViewFooterTemplate]",ngImport:d}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:w,decorators:[{type:r.Directive,args:[{selector:"[kendoListViewFooterTemplate]"}]}],ctorParameters:function(){return[{type:d.TemplateRef}]}}),function(e){this.templateRef=e}),D=(S.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:S,deps:[{token:d.TemplateRef}],target:d.ɵɵFactoryTarget.Directive}),S.ɵdir=d.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:S,selector:"[kendoListViewLoaderTemplate]",ngImport:d}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:S,decorators:[{type:r.Directive,args:[{selector:"[kendoListViewLoaderTemplate]"}]}],ctorParameters:function(){return[{type:d.TemplateRef}]}}),function(e){this.templateRef=e}),T=(D.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:D,deps:[{token:d.TemplateRef,optional:!0}],target:d.ɵɵFactoryTarget.Directive}),D.ɵdir=d.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:D,selector:"[kendoListViewEditTemplate]",ngImport:d}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:D,decorators:[{type:r.Directive,args:[{selector:"[kendoListViewEditTemplate]"}]}],ctorParameters:function(){return[{type:d.TemplateRef,decorators:[{type:r.Optional}]}]}}),x.prototype.editItem=function(e,t){this.editedIndices.push({index:e,group:t=void 0===t?void 0:t}),this.onChanged()},x.prototype.addItem=function(e){this.newItem={group:e},this.onChanged()},x.prototype.isEditing=function(){return 0<this.editedIndices.length},Object.defineProperty(x.prototype,"hasNewItem",{get:function(){return v(this.newItem)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"newDataItem",{get:function(){return this.hasNewItem?this.newItem.group.value:{}},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"newItemGroup",{get:function(){return this.hasNewItem?this.newItem.group:new i.FormGroup({})},enumerable:!1,configurable:!0}),x.prototype.editGroup=function(e){return this.context(e).group},x.prototype.close=function(e){var t;k(e)?this.newItem=void 0:(this.editedIndices=this.editedIndices.filter((t=e,function(e){return e.index!==t})),this.onChanged())},x.prototype.context=function(e){return k(e)?this.newItem:this.findByIndex(e)},x.prototype.isEdited=function(e){return!(!k(e)||!v(this.newItem))||v(this.findByIndex(e))},x.prototype.hasEdited=function(e){return v(this.context(e))},x.prototype.beginEdit=function(e){this.changes.emit({action:"edit",itemIndex:e})},x.prototype.beginAdd=function(){this.changes.emit({action:"add"})},x.prototype.endEdit=function(e){var t=this.context(e).group;this.changes.emit({action:"cancel",itemIndex:e,formGroup:t,isNew:k(e)})},x.prototype.save=function(e){var t=this.context(e).group;this.changes.emit({action:"save",itemIndex:e,formGroup:t,isNew:k(e)})},x.prototype.remove=function(e){this.changes.emit({action:"remove",itemIndex:e})},x.prototype.findByIndex=function(e){return this.editedIndices.find((t=e,function(e){return e.index===t}));var t},x.prototype.onChanged=function(){var e=this;this.ngZone.runOutsideAngular(function(){e.changedSource.next()})},x);function x(e){var t=this;this.ngZone=e,this.changes=new r.EventEmitter,this.editedIndices=[],this.changedSource=new n.Subject,this.changed=this.changedSource.asObservable().pipe(j.switchMap(function(){return t.ngZone.onStable.asObservable().pipe(j.take(1))}))}T.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:T,deps:[{token:d.NgZone}],target:d.ɵɵFactoryTarget.Injectable}),T.ɵprov=d.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:T}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:T,decorators:[{type:r.Injectable}],ctorParameters:function(){return[{type:d.NgZone}]}});var $={position:"bottom",buttonCount:5,info:!0,previousNext:!0,type:"numeric",pageSizeValues:[5,10,20]},V=(Object.defineProperty(E.prototype,"navigable",{get:function(){return this._navigable},set:function(e){!e&&v(this.removeNavigationListeners)?(this.removeNavigationListeners(),this.removeNavigationListeners=null,this.navigationService.isEnabled=!1):e&&!v(this.removeNavigationListeners)&&(this.addNavigationListeners(),this.navigationService.isEnabled=!0),this._navigable=e},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"skip",{get:function(){return this._skip},set:function(e){e=parseInt(e,10);this._skip=isNaN(e)?0:e},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"pageable",{get:function(){return this._pageable},set:function(e){this._pageable=e,this.pagerSettings=e?Object.assign({},$,e):null},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"items",{get:function(){return v(this.data)?(Array.isArray(this.data)?this:this.data).data:[]},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"total",{get:function(){return v(this.data)?Array.isArray(this.data)?this.data.length:this.data.total:0},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"containerTabindex",{get:function(){return this.navigable?-1:null},enumerable:!1,configurable:!0}),Object.defineProperty(E.prototype,"activeIndex",{get:function(){return this.navigationService.activeIndex},enumerable:!1,configurable:!0}),E.prototype.ngOnChanges=function(e){a.isChanged("height",e,!1)&&this.renderer.setStyle(this.element.nativeElement,"height",this.height+"px")},E.prototype.ngOnDestroy=function(){v(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,n;e instanceof i.FormGroup||(t=Object.keys(e).reduce((n=e,function(e,t){return e[t]=new i.FormControl(n[t]),e}),{}),e=new i.FormGroup(t)),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,t,n,i=this;a.hasObservers(this.scrollBottom)&&(t=(e=this.contentContainer.nativeElement).scrollHeight,n=e.scrollTop,t-e.clientHeight-n<=2&&this.ngZone.run(function(){i.scrollBottom.emit({sender:i})}))},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 i=this;this.ngZone.runOutsideAngular(function(){var e=i.renderer.listen(i.contentContainer.nativeElement,"keydown",function(e){return i.navigationService.handleKeyDown(e,i.listViewItems.length)}),t=i.renderer.listen(i.contentContainer.nativeElement,"focusin",function(e){return i.navigationService.handleFocusIn(e)}),n=i.renderer.listen(i.contentContainer.nativeElement,"focusout",function(e){return i.navigationService.handleFocusOut(e)});i.removeNavigationListeners=function(){e(),t(),n()}})},E.prototype.attachEditHandlers=function(){v(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,n=this.items[n];"add"!==t&&i&&(n=i.value),Object.assign(e,{dataItem:n,sender:this}),this[t].emit(e)},E);function E(e,t,n,i,a){this.ngZone=e,this.element=t,this.renderer=n,this.editService=i,this.navigationService=a,this.className=!0,this.loading=!1,this.containerRole="listbox",this.listItemRole="option",this.scrollBottom=new r.EventEmitter,this.pageChange=new r.EventEmitter,this.pageSizeChange=new r.EventEmitter,this.edit=new r.EventEmitter,this.cancel=new r.EventEmitter,this.save=new r.EventEmitter,this.remove=new r.EventEmitter,this.add=new r.EventEmitter,this._skip=0,this._navigable=!1,z.validatePackage(Z),this.attachEditHandlers()}V.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:V,deps:[{token:d.NgZone},{token:d.ElementRef},{token:d.Renderer2},{token:T},{token:h}],target:d.ɵɵFactoryTarget.Component}),V.ɵcmp=d.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:V,selector:"kendo-listview",inputs:{data:"data",loading:"loading",containerStyle:"containerStyle",itemStyle:"itemStyle",containerClass:"containerClass",itemClass:"itemClass",containerLabel:"containerLabel",containerRole:"containerRole",listItemRole:"listItemRole",navigable:"navigable",pageSize:"pageSize",skip:"skip",pageable:"pageable",height:"height"},outputs:{scrollBottom:"scrollBottom",pageChange:"pageChange",pageSizeChange:"pageSizeChange",edit:"edit",cancel:"cancel",save:"save",remove:"remove",add:"add"},host:{properties:{"class.k-widget":"this.className","class.k-listview":"this.className","class.k-listview-bordered":"this.className","class.k-d-flex":"this.className"}},providers:[T,h,t.LocalizationService,{provide:t.L10N_PREFIX,useValue:"kendo.listview"}],queries:[{propertyName:"itemTemplate",first:!0,predicate:C,descendants:!0},{propertyName:"headerTemplate",first:!0,predicate:b,descendants:!0},{propertyName:"footerTemplate",first:!0,predicate:w,descendants:!0},{propertyName:"loaderTemplate",first:!0,predicate:S,descendants:!0},{propertyName:"editTemplate",first:!0,predicate:D,descendants:!0}],viewQueries:[{propertyName:"contentContainer",first:!0,predicate:["contentContainer"],descendants:!0,static:!0},{propertyName:"listViewItems",predicate:f,descendants:!0}],exportAs:["kendoListView"],usesOnChanges:!0,ngImport:d,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 ',isInline:!0,components:[{type:m.PagerComponent,selector:"kendo-datapager",inputs:["total","skip","pageSize","buttonCount","info","type","pageSizeValues","previousNext"],outputs:["pageChange","pageSizeChange"],exportAs:["kendoDataPager"]}],directives:[{type:u.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:u.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet"]},{type:u.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:u.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{type:B.EventsOutsideAngularDirective,selector:"[kendoEventsOutsideAngular]",inputs:["kendoEventsOutsideAngular","scope"]},{type:f,selector:"[kendoListViewNavigableItem]",inputs:["index"]},{type:u.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]}],changeDetection:d.ChangeDetectionStrategy.OnPush}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:V,decorators:[{type:r.Component,args:[{changeDetection:r.ChangeDetectionStrategy.OnPush,exportAs:"kendoListView",selector:"kendo-listview",providers:[T,h,t.LocalizationService,{provide:t.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 '}]}],ctorParameters:function(){return[{type:d.NgZone},{type:d.ElementRef},{type:d.Renderer2},{type:T},{type:h}]},propDecorators:{className:[{type:r.HostBinding,args:["class.k-widget"]},{type:r.HostBinding,args:["class.k-listview"]},{type:r.HostBinding,args:["class.k-listview-bordered"]},{type:r.HostBinding,args:["class.k-d-flex"]}],itemTemplate:[{type:r.ContentChild,args:[C,{static:!1}]}],headerTemplate:[{type:r.ContentChild,args:[b,{static:!1}]}],footerTemplate:[{type:r.ContentChild,args:[w,{static:!1}]}],loaderTemplate:[{type:r.ContentChild,args:[S,{static:!1}]}],contentContainer:[{type:r.ViewChild,args:["contentContainer",{static:!0}]}],editTemplate:[{type:r.ContentChild,args:[D,{static:!1}]}],listViewItems:[{type:r.ViewChildren,args:[f]}],data:[{type:r.Input}],loading:[{type:r.Input}],containerStyle:[{type:r.Input}],itemStyle:[{type:r.Input}],containerClass:[{type:r.Input}],itemClass:[{type:r.Input}],containerLabel:[{type:r.Input}],containerRole:[{type:r.Input}],listItemRole:[{type:r.Input}],navigable:[{type:r.Input}],pageSize:[{type:r.Input}],skip:[{type:r.Input}],pageable:[{type:r.Input}],height:[{type:r.Input}],scrollBottom:[{type:r.Output}],pageChange:[{type:r.Output}],pageSizeChange:[{type:r.Output}],edit:[{type:r.Output}],cancel:[{type:r.Output}],save:[{type:r.Output}],remove:[{type:r.Output}],add:[{type:r.Output}]}});Object.defineProperty(O.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e||[],this.updateListViewData()},enumerable:!1,configurable:!0}),O.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()},O.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},O.prototype.handlePageChange=function(e){this.listView.skip=e.skip,this.listView.pageSize=e.take,this.updateListViewData()},O.prototype.handlePageSizeChange=function(e){this.listView.pageSize=Number(e.newPageSize)},O.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}};m=O;function O(e){this.listView=e,this.subscriptions=new n.Subscription}m.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:m,deps:[{token:V}],target:d.ɵɵFactoryTarget.Directive}),m.ɵdir=d.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:m,selector:"[kendoListViewBinding]",inputs:{data:["kendoListViewBinding","data"]},ngImport:d}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:m,decorators:[{type:r.Directive,args:[{selector:"[kendoListViewBinding]"}]}],ctorParameters:function(){return[{type:V}]},propDecorators:{data:[{type:r.Input,args:["kendoListViewBinding"]}]}});var G=function(e,t){return(G=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function R(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}G(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create;Object.create;R(U,q=o.PageSizeChangeEvent);var q,B=U;function U(){return null!==q&&q.apply(this,arguments)||this}R(Q,X=l.Button),Q.prototype.clickHandler=function(e){e.preventDefault();e=c(this.elementRef.nativeElement);this.editService.beginEdit(e)};var X,u=Q;function Q(e,t,n,i,a){n=X.call(this,t,n,null,i,a)||this;return n.editService=e,n.elementRef=t,n}u.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:u,deps:[{token:T},{token:d.ElementRef},{token:d.Renderer2},{token:g.LocalizationService},{token:d.NgZone}],target:d.ɵɵFactoryTarget.Directive}),u.ɵdir=d.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:u,selector:"[kendoListViewEditCommand]",host:{listeners:{click:"clickHandler($event)"}},usesInheritance:!0,ngImport:d}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:u,decorators:[{type:r.Directive,args:[{selector:"[kendoListViewEditCommand]"}]}],ctorParameters:function(){return[{type:T},{type:d.ElementRef},{type:d.Renderer2},{type:g.LocalizationService},{type:d.NgZone}]},propDecorators:{clickHandler:[{type:r.HostListener,args:["click",["$event"]]}]}});R(W,J=l.Button),W.prototype.clickHandler=function(e){e.preventDefault(),this.editService.beginAdd()};var J,t=W;function W(e,t,n,i,a){t=J.call(this,t,n,null,i,a)||this;return t.editService=e,t}t.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:t,deps:[{token:T},{token:d.ElementRef},{token:d.Renderer2},{token:g.LocalizationService},{token:d.NgZone}],target:d.ɵɵFactoryTarget.Directive}),t.ɵdir=d.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:t,selector:"[kendoListViewAddCommand]",host:{listeners:{click:"clickHandler($event)"}},usesInheritance:!0,ngImport:d}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:t,decorators:[{type:r.Directive,args:[{selector:"[kendoListViewAddCommand]"}]}],ctorParameters:function(){return[{type:T},{type:d.ElementRef},{type:d.Renderer2},{type:g.LocalizationService},{type:d.NgZone}]},propDecorators:{clickHandler:[{type:r.HostListener,args:["click",["$event"]]}]}});R(ee,Y=l.Button),ee.prototype.clickHandler=function(e){e.preventDefault();e=c(this.elementRef.nativeElement);this.editService.isEdited(e)&&this.editService.save(e)};var Y,L=ee;function ee(e,t,n,i,a){n=Y.call(this,t,n,null,i,a)||this;return n.editService=e,n.elementRef=t,n}L.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:L,deps:[{token:T},{token:d.ElementRef},{token:d.Renderer2},{token:g.LocalizationService},{token:d.NgZone}],target:d.ɵɵFactoryTarget.Directive}),L.ɵdir=d.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:L,selector:"[kendoListViewSaveCommand]",host:{listeners:{click:"clickHandler($event)"}},usesInheritance:!0,ngImport:d}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:L,decorators:[{type:r.Directive,args:[{selector:"[kendoListViewSaveCommand]"}]}],ctorParameters:function(){return[{type:T},{type:d.ElementRef},{type:d.Renderer2},{type:g.LocalizationService},{type:d.NgZone}]},propDecorators:{clickHandler:[{type:r.HostListener,args:["click",["$event"]]}]}});R(ne,te=l.Button),ne.prototype.clickHandler=function(e){e.preventDefault();e=c(this.elementRef.nativeElement);this.editService.isEdited(e)&&this.editService.endEdit(e)};var te,N=ne;function ne(e,t,n,i,a){n=te.call(this,t,n,null,i,a)||this;return n.editService=e,n.elementRef=t,n}N.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:N,deps:[{token:T},{token:d.ElementRef},{token:d.Renderer2},{token:g.LocalizationService},{token:d.NgZone}],target:d.ɵɵFactoryTarget.Directive}),N.ɵdir=d.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:N,selector:"[kendoListViewCancelCommand]",host:{listeners:{click:"clickHandler($event)"}},usesInheritance:!0,ngImport:d}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:N,decorators:[{type:r.Directive,args:[{selector:"[kendoListViewCancelCommand]"}]}],ctorParameters:function(){return[{type:T},{type:d.ElementRef},{type:d.Renderer2},{type:g.LocalizationService},{type:d.NgZone}]},propDecorators:{clickHandler:[{type:r.HostListener,args:["click",["$event"]]}]}});R(ae,ie=l.Button),ae.prototype.clickHandler=function(e){e.preventDefault();e=c(this.elementRef.nativeElement);this.editService.remove(e)};var ie,l=ae;function ae(e,t,n,i,a){n=ie.call(this,t,n,null,i,a)||this;return n.editService=e,n.elementRef=t,n}l.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:l,deps:[{token:T},{token:d.ElementRef},{token:d.Renderer2},{token:g.LocalizationService},{token:d.NgZone}],target:d.ɵɵFactoryTarget.Directive}),l.ɵdir=d.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:l,selector:"[kendoListViewRemoveCommand]",host:{listeners:{click:"clickHandler($event)"}},usesInheritance:!0,ngImport:d}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:l,decorators:[{type:r.Directive,args:[{selector:"[kendoListViewRemoveCommand]"}]}],ctorParameters:function(){return[{type:T},{type:d.ElementRef},{type:d.Renderer2},{type:g.LocalizationService},{type:d.NgZone}]},propDecorators:{clickHandler:[{type:r.HostListener,args:["click",["$event"]]}]}});Object.defineProperty(re.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:!1,configurable:!0});var F=re;function re(e){this.viewContainerRef=e}F.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:F,deps:[{token:d.ViewContainerRef}],target:d.ɵɵFactoryTarget.Directive}),F.ɵdir=d.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:F,selector:"[templateContext]",inputs:{templateContext:"templateContext"},ngImport:d}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:F,decorators:[{type:r.Directive,args:[{selector:"[templateContext]"}]}],ctorParameters:function(){return[{type:d.ViewContainerRef}]},propDecorators:{templateContext:[{type:r.Input}]}});var oe=[C,b,w,S],se=[m],le=[D,u,N,L,l,t],P=function(){};P.ɵfac=d.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:P,deps:[],target:d.ɵɵFactoryTarget.NgModule}),P.ɵmod=d.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:P,declarations:[C,b,w,S,m,D,u,N,L,l,t,V,F,f],imports:[s.CommonModule,o.PagerModule,a.EventsModule],exports:[C,b,w,S,m,D,u,N,L,l,t,V,s.CommonModule,a.EventsModule]}),P.ɵinj=d.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:P,imports:[[s.CommonModule,o.PagerModule,a.EventsModule],s.CommonModule,a.EventsModule]}),d.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:d,type:P,decorators:[{type:r.NgModule,args:[{declarations:[oe,se,le,V,F,f],exports:[oe,se,le,V,s.CommonModule,a.EventsModule],imports:[s.CommonModule,o.PagerModule,a.EventsModule]}]}]}),e.AddCommandDirective=t,e.CancelCommandDirective=N,e.DataBindingDirective=m,e.EditCommandDirective=u,e.EditTemplateDirective=D,e.FooterTemplateDirective=w,e.HeaderTemplateDirective=b,e.ItemTemplateDirective=C,e.ListViewComponent=V,e.ListViewModule=P,e.LoaderTemplateDirective=S,e.PageSizeChangeEvent=B,e.RemoveCommandDirective=l,e.SaveCommandDirective=L,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { ListViewComponent } from '../listview.component';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* A directive that encapsulates the in-memory handling of paging
|
|
8
9
|
* ([see example]({% slug paging_listview %}#toc-binding-directive)).
|
|
@@ -12,7 +13,8 @@ export declare class DataBindingDirective {
|
|
|
12
13
|
/**
|
|
13
14
|
* The array of data which will be used to populate the ListView.
|
|
14
15
|
*/
|
|
15
|
-
data: any[];
|
|
16
|
+
set data(data: any[]);
|
|
17
|
+
get data(): any[];
|
|
16
18
|
private _data;
|
|
17
19
|
private subscriptions;
|
|
18
20
|
constructor(listView: ListViewComponent);
|
|
@@ -21,4 +23,6 @@ export declare class DataBindingDirective {
|
|
|
21
23
|
private handlePageChange;
|
|
22
24
|
private handlePageSizeChange;
|
|
23
25
|
private updateListViewData;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataBindingDirective, never>;
|
|
27
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DataBindingDirective, "[kendoListViewBinding]", never, { "data": "kendoListViewBinding"; }, {}, never>;
|
|
24
28
|
}
|
|
@@ -6,6 +6,7 @@ import { ElementRef, Renderer2 as Renderer, NgZone } from '@angular/core';
|
|
|
6
6
|
import { Button } from '@progress/kendo-angular-buttons';
|
|
7
7
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { EditService } from '../edit.service';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
9
10
|
/**
|
|
10
11
|
* Represents the command for adding a new item to the ListView. You can apply this directive to any
|
|
11
12
|
* `button` element inside a [`HeaderTemplate`]({% slug api_listview_headertemplatedirective %}).
|
|
@@ -29,4 +30,6 @@ export declare class AddCommandDirective extends Button {
|
|
|
29
30
|
*/
|
|
30
31
|
clickHandler(e: any): void;
|
|
31
32
|
constructor(editService: EditService, element: ElementRef, renderer: Renderer, localization: LocalizationService, ngZone: NgZone);
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AddCommandDirective, never>;
|
|
34
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AddCommandDirective, "[kendoListViewAddCommand]", never, {}, {}, never>;
|
|
32
35
|
}
|
|
@@ -6,6 +6,7 @@ import { ElementRef, Renderer2 as Renderer, NgZone } from '@angular/core';
|
|
|
6
6
|
import { Button } from '@progress/kendo-angular-buttons';
|
|
7
7
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { EditService } from '../edit.service';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
9
10
|
/**
|
|
10
11
|
* Represents the `cancel` command of the ListView. You can apply this directive to any `button`
|
|
11
12
|
* element inside a [`EditTemplateDirective`]({% slug api_listview_edittemplatedirective %}) template.
|
|
@@ -41,4 +42,6 @@ export declare class CancelCommandDirective extends Button {
|
|
|
41
42
|
*/
|
|
42
43
|
clickHandler(e: any): void;
|
|
43
44
|
constructor(editService: EditService, element: ElementRef, renderer: Renderer, localization: LocalizationService, ngZone: NgZone);
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CancelCommandDirective, never>;
|
|
46
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CancelCommandDirective, "[kendoListViewCancelCommand]", never, {}, {}, never>;
|
|
44
47
|
}
|
|
@@ -6,6 +6,7 @@ import { ElementRef, Renderer2 as Renderer, NgZone } from '@angular/core';
|
|
|
6
6
|
import { Button } from '@progress/kendo-angular-buttons';
|
|
7
7
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { EditService } from '../edit.service';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
9
10
|
/**
|
|
10
11
|
* Represents the `edit` command of the ListView. You can apply this directive to any `button`
|
|
11
12
|
* element inside a [`EditTemplateDirective`]({% slug api_listview_edittemplatedirective %}) template.
|
|
@@ -31,4 +32,6 @@ export declare class EditCommandDirective extends Button {
|
|
|
31
32
|
*/
|
|
32
33
|
clickHandler(e: any): void;
|
|
33
34
|
constructor(editService: EditService, element: ElementRef, renderer: Renderer, localization: LocalizationService, ngZone: NgZone);
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditCommandDirective, never>;
|
|
36
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditCommandDirective, "[kendoListViewEditCommand]", never, {}, {}, never>;
|
|
34
37
|
}
|
|
@@ -6,6 +6,7 @@ import { ElementRef, Renderer2 as Renderer, NgZone } from '@angular/core';
|
|
|
6
6
|
import { Button } from '@progress/kendo-angular-buttons';
|
|
7
7
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { EditService } from '../edit.service';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
9
10
|
/**
|
|
10
11
|
* Represents the `remove` command of the ListView. You can apply this directive to any `button` element
|
|
11
12
|
* inside a [`EditTemplateDirective`]({% slug api_listview_edittemplatedirective %}) template.
|
|
@@ -30,4 +31,6 @@ export declare class RemoveCommandDirective extends Button {
|
|
|
30
31
|
*/
|
|
31
32
|
clickHandler(e: any): void;
|
|
32
33
|
constructor(editService: EditService, element: ElementRef, renderer: Renderer, localization: LocalizationService, ngZone: NgZone);
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RemoveCommandDirective, never>;
|
|
35
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RemoveCommandDirective, "[kendoListViewRemoveCommand]", never, {}, {}, never>;
|
|
33
36
|
}
|
|
@@ -6,6 +6,7 @@ import { ElementRef, Renderer2 as Renderer, NgZone } from '@angular/core';
|
|
|
6
6
|
import { Button } from '@progress/kendo-angular-buttons';
|
|
7
7
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { EditService } from '../edit.service';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
9
10
|
/**
|
|
10
11
|
* Represents the `save` command of the ListView. You can apply this directive to any `button`
|
|
11
12
|
* element inside a [`EditTemplateDirective`]({% slug api_listview_edittemplatedirective %}) template.
|
|
@@ -41,4 +42,6 @@ export declare class SaveCommandDirective extends Button {
|
|
|
41
42
|
*/
|
|
42
43
|
clickHandler(e: any): void;
|
|
43
44
|
constructor(editService: EditService, element: ElementRef, renderer: Renderer, localization: LocalizationService, ngZone: NgZone);
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SaveCommandDirective, never>;
|
|
46
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SaveCommandDirective, "[kendoListViewSaveCommand]", never, {}, {}, never>;
|
|
44
47
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { TemplateRef } from '@angular/core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* Represents the edit template of the ListView ([see example]({% slug editing_template_forms_listview %})).
|
|
8
9
|
* Helps to customize the content of the edited items. To define the template, nest an `<ng-template>`
|
|
@@ -18,4 +19,6 @@ import { TemplateRef } from '@angular/core';
|
|
|
18
19
|
export declare class EditTemplateDirective {
|
|
19
20
|
templateRef: TemplateRef<any>;
|
|
20
21
|
constructor(templateRef: TemplateRef<any>);
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditTemplateDirective, [{ optional: true; }]>;
|
|
23
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EditTemplateDirective, "[kendoListViewEditTemplate]", never, {}, {}, never>;
|
|
21
24
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { EventEmitter, NgZone } from '@angular/core';
|
|
6
6
|
import { FormGroup } from '@angular/forms';
|
|
7
7
|
import { Observable } from 'rxjs';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
8
9
|
/**
|
|
9
10
|
* @hidden
|
|
10
11
|
*/
|
|
@@ -39,9 +40,9 @@ export declare class EditService {
|
|
|
39
40
|
editItem(index: number, group?: any): void;
|
|
40
41
|
addItem(group: any): void;
|
|
41
42
|
isEditing(): boolean;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
get hasNewItem(): boolean;
|
|
44
|
+
get newDataItem(): any;
|
|
45
|
+
get newItemGroup(): FormGroup;
|
|
45
46
|
editGroup(index: number): any;
|
|
46
47
|
close(index?: number): void;
|
|
47
48
|
context(index?: number): Entity;
|
|
@@ -54,4 +55,6 @@ export declare class EditService {
|
|
|
54
55
|
remove(itemIndex: number): void;
|
|
55
56
|
private findByIndex;
|
|
56
57
|
private onChanged;
|
|
58
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EditService, never>;
|
|
59
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EditService>;
|
|
57
60
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,15 +2,15 @@
|
|
|
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
|
-
import * as tslib_1 from "tslib";
|
|
6
5
|
import { Directive, Input } from '@angular/core';
|
|
7
6
|
import { Subscription } from 'rxjs';
|
|
8
|
-
import
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "../listview.component";
|
|
9
9
|
/**
|
|
10
10
|
* A directive that encapsulates the in-memory handling of paging
|
|
11
11
|
* ([see example]({% slug paging_listview %}#toc-binding-directive)).
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
export class DataBindingDirective {
|
|
14
14
|
constructor(listView) {
|
|
15
15
|
this.listView = listView;
|
|
16
16
|
this.subscriptions = new Subscription();
|
|
@@ -49,16 +49,15 @@ let DataBindingDirective = class DataBindingDirective {
|
|
|
49
49
|
total: this.data.length
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
]
|
|
64
|
-
export { DataBindingDirective };
|
|
52
|
+
}
|
|
53
|
+
DataBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DataBindingDirective, deps: [{ token: i1.ListViewComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
54
|
+
DataBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DataBindingDirective, selector: "[kendoListViewBinding]", inputs: { data: ["kendoListViewBinding", "data"] }, ngImport: i0 });
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DataBindingDirective, decorators: [{
|
|
56
|
+
type: Directive,
|
|
57
|
+
args: [{
|
|
58
|
+
selector: '[kendoListViewBinding]'
|
|
59
|
+
}]
|
|
60
|
+
}], ctorParameters: function () { return [{ type: i1.ListViewComponent }]; }, propDecorators: { data: [{
|
|
61
|
+
type: Input,
|
|
62
|
+
args: ['kendoListViewBinding']
|
|
63
|
+
}] } });
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive, HostListener } from '@angular/core';
|
|
6
|
+
import { Button } from '@progress/kendo-angular-buttons';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import * as i1 from "../edit.service";
|
|
9
|
+
import * as i2 from "@progress/kendo-angular-l10n";
|
|
10
|
+
/**
|
|
11
|
+
* Represents the command for adding a new item to the ListView. You can apply this directive to any
|
|
12
|
+
* `button` element inside a [`HeaderTemplate`]({% slug api_listview_headertemplatedirective %}).
|
|
13
|
+
* When an associated button with the directive is clicked, the
|
|
14
|
+
* [`add`]({% slug api_listview_listviewcomponent %}#toc-add) event is triggered
|
|
15
|
+
* ([see example]({% slug editing_listview %})).
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```html-no-run
|
|
19
|
+
* <kendo-listview>
|
|
20
|
+
* <ng-template kendoListViewHeaderTemplate>
|
|
21
|
+
* <button kendoListViewAddCommand>Add new</button>
|
|
22
|
+
* </ng-template>
|
|
23
|
+
* </kendo-listview>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export class AddCommandDirective extends Button {
|
|
27
|
+
constructor(editService, element, renderer, localization, ngZone) {
|
|
28
|
+
super(element, renderer, null, localization, ngZone);
|
|
29
|
+
this.editService = editService;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @hidden
|
|
33
|
+
*/
|
|
34
|
+
clickHandler(e) {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
this.editService.beginAdd();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
AddCommandDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AddCommandDirective, deps: [{ token: i1.EditService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
40
|
+
AddCommandDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: AddCommandDirective, selector: "[kendoListViewAddCommand]", host: { listeners: { "click": "clickHandler($event)" } }, usesInheritance: true, ngImport: i0 });
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AddCommandDirective, decorators: [{
|
|
42
|
+
type: Directive,
|
|
43
|
+
args: [{
|
|
44
|
+
selector: '[kendoListViewAddCommand]'
|
|
45
|
+
}]
|
|
46
|
+
}], ctorParameters: function () { return [{ type: i1.EditService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i2.LocalizationService }, { type: i0.NgZone }]; }, propDecorators: { clickHandler: [{
|
|
47
|
+
type: HostListener,
|
|
48
|
+
args: ['click', ['$event']]
|
|
49
|
+
}] } });
|
|
@@ -2,12 +2,12 @@
|
|
|
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
|
-
import
|
|
6
|
-
import { Directive, HostListener, ElementRef, Renderer2 as Renderer, NgZone } from '@angular/core';
|
|
5
|
+
import { Directive, HostListener } from '@angular/core';
|
|
7
6
|
import { Button } from '@progress/kendo-angular-buttons';
|
|
8
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
-
import { EditService } from '../edit.service';
|
|
10
7
|
import { getClosestListItemIndex } from '../../utils';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "../edit.service";
|
|
10
|
+
import * as i2 from "@progress/kendo-angular-l10n";
|
|
11
11
|
/**
|
|
12
12
|
* Represents the `cancel` command of the ListView. You can apply this directive to any `button`
|
|
13
13
|
* element inside a [`EditTemplateDirective`]({% slug api_listview_edittemplatedirective %}) template.
|
|
@@ -35,7 +35,7 @@ import { getClosestListItemIndex } from '../../utils';
|
|
|
35
35
|
* </kendo-listview>
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
export class CancelCommandDirective extends Button {
|
|
39
39
|
constructor(editService, element, renderer, localization, ngZone) {
|
|
40
40
|
super(element, renderer, null, localization, ngZone);
|
|
41
41
|
this.editService = editService;
|
|
@@ -51,21 +51,15 @@ let CancelCommandDirective = class CancelCommandDirective extends Button {
|
|
|
51
51
|
this.editService.endEdit(index);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
]
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
ElementRef,
|
|
67
|
-
Renderer,
|
|
68
|
-
LocalizationService,
|
|
69
|
-
NgZone])
|
|
70
|
-
], CancelCommandDirective);
|
|
71
|
-
export { CancelCommandDirective };
|
|
54
|
+
}
|
|
55
|
+
CancelCommandDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CancelCommandDirective, deps: [{ token: i1.EditService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
56
|
+
CancelCommandDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: CancelCommandDirective, selector: "[kendoListViewCancelCommand]", host: { listeners: { "click": "clickHandler($event)" } }, usesInheritance: true, ngImport: i0 });
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CancelCommandDirective, decorators: [{
|
|
58
|
+
type: Directive,
|
|
59
|
+
args: [{
|
|
60
|
+
selector: '[kendoListViewCancelCommand]'
|
|
61
|
+
}]
|
|
62
|
+
}], ctorParameters: function () { return [{ type: i1.EditService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i2.LocalizationService }, { type: i0.NgZone }]; }, propDecorators: { clickHandler: [{
|
|
63
|
+
type: HostListener,
|
|
64
|
+
args: ['click', ['$event']]
|
|
65
|
+
}] } });
|
|
@@ -2,12 +2,12 @@
|
|
|
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
|
-
import
|
|
6
|
-
import { Directive, HostListener, ElementRef, Renderer2 as Renderer, NgZone } from '@angular/core';
|
|
5
|
+
import { Directive, HostListener } from '@angular/core';
|
|
7
6
|
import { Button } from '@progress/kendo-angular-buttons';
|
|
8
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
-
import { EditService } from '../edit.service';
|
|
10
7
|
import { getClosestListItemIndex } from '../../utils';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "../edit.service";
|
|
10
|
+
import * as i2 from "@progress/kendo-angular-l10n";
|
|
11
11
|
/**
|
|
12
12
|
* Represents the `edit` command of the ListView. You can apply this directive to any `button`
|
|
13
13
|
* element inside a [`EditTemplateDirective`]({% slug api_listview_edittemplatedirective %}) template.
|
|
@@ -25,7 +25,7 @@ import { getClosestListItemIndex } from '../../utils';
|
|
|
25
25
|
* ```
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
export class EditCommandDirective extends Button {
|
|
29
29
|
constructor(editService, element, renderer, localization, ngZone) {
|
|
30
30
|
super(element, renderer, null, localization, ngZone);
|
|
31
31
|
this.editService = editService;
|
|
@@ -39,21 +39,15 @@ let EditCommandDirective = class EditCommandDirective extends Button {
|
|
|
39
39
|
const index = getClosestListItemIndex(this.elementRef.nativeElement);
|
|
40
40
|
this.editService.beginEdit(index);
|
|
41
41
|
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
]
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
ElementRef,
|
|
55
|
-
Renderer,
|
|
56
|
-
LocalizationService,
|
|
57
|
-
NgZone])
|
|
58
|
-
], EditCommandDirective);
|
|
59
|
-
export { EditCommandDirective };
|
|
42
|
+
}
|
|
43
|
+
EditCommandDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditCommandDirective, deps: [{ token: i1.EditService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
44
|
+
EditCommandDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: EditCommandDirective, selector: "[kendoListViewEditCommand]", host: { listeners: { "click": "clickHandler($event)" } }, usesInheritance: true, ngImport: i0 });
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditCommandDirective, decorators: [{
|
|
46
|
+
type: Directive,
|
|
47
|
+
args: [{
|
|
48
|
+
selector: '[kendoListViewEditCommand]'
|
|
49
|
+
}]
|
|
50
|
+
}], ctorParameters: function () { return [{ type: i1.EditService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i2.LocalizationService }, { type: i0.NgZone }]; }, propDecorators: { clickHandler: [{
|
|
51
|
+
type: HostListener,
|
|
52
|
+
args: ['click', ['$event']]
|
|
53
|
+
}] } });
|
|
@@ -2,12 +2,12 @@
|
|
|
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
|
-
import
|
|
6
|
-
import { Directive, HostListener, ElementRef, Renderer2 as Renderer, NgZone } from '@angular/core';
|
|
5
|
+
import { Directive, HostListener } from '@angular/core';
|
|
7
6
|
import { Button } from '@progress/kendo-angular-buttons';
|
|
8
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
-
import { EditService } from '../edit.service';
|
|
10
7
|
import { getClosestListItemIndex } from '../../utils';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "../edit.service";
|
|
10
|
+
import * as i2 from "@progress/kendo-angular-l10n";
|
|
11
11
|
/**
|
|
12
12
|
* Represents the `remove` command of the ListView. You can apply this directive to any `button` element
|
|
13
13
|
* inside a [`EditTemplateDirective`]({% slug api_listview_edittemplatedirective %}) template.
|
|
@@ -24,7 +24,7 @@ import { getClosestListItemIndex } from '../../utils';
|
|
|
24
24
|
* </kendo-listview>
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
|
|
27
|
+
export class RemoveCommandDirective extends Button {
|
|
28
28
|
constructor(editService, element, renderer, localization, ngZone) {
|
|
29
29
|
super(element, renderer, null, localization, ngZone);
|
|
30
30
|
this.editService = editService;
|
|
@@ -38,21 +38,15 @@ let RemoveCommandDirective = class RemoveCommandDirective extends Button {
|
|
|
38
38
|
const index = getClosestListItemIndex(this.elementRef.nativeElement);
|
|
39
39
|
this.editService.remove(index);
|
|
40
40
|
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
]
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
ElementRef,
|
|
54
|
-
Renderer,
|
|
55
|
-
LocalizationService,
|
|
56
|
-
NgZone])
|
|
57
|
-
], RemoveCommandDirective);
|
|
58
|
-
export { RemoveCommandDirective };
|
|
41
|
+
}
|
|
42
|
+
RemoveCommandDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RemoveCommandDirective, deps: [{ token: i1.EditService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
43
|
+
RemoveCommandDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: RemoveCommandDirective, selector: "[kendoListViewRemoveCommand]", host: { listeners: { "click": "clickHandler($event)" } }, usesInheritance: true, ngImport: i0 });
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RemoveCommandDirective, decorators: [{
|
|
45
|
+
type: Directive,
|
|
46
|
+
args: [{
|
|
47
|
+
selector: '[kendoListViewRemoveCommand]'
|
|
48
|
+
}]
|
|
49
|
+
}], ctorParameters: function () { return [{ type: i1.EditService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i2.LocalizationService }, { type: i0.NgZone }]; }, propDecorators: { clickHandler: [{
|
|
50
|
+
type: HostListener,
|
|
51
|
+
args: ['click', ['$event']]
|
|
52
|
+
}] } });
|
|
@@ -2,12 +2,12 @@
|
|
|
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
|
-
import
|
|
6
|
-
import { Directive, HostListener, ElementRef, Renderer2 as Renderer, NgZone } from '@angular/core';
|
|
5
|
+
import { Directive, HostListener } from '@angular/core';
|
|
7
6
|
import { Button } from '@progress/kendo-angular-buttons';
|
|
8
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
-
import { EditService } from '../edit.service';
|
|
10
7
|
import { getClosestListItemIndex } from '../../utils';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "../edit.service";
|
|
10
|
+
import * as i2 from "@progress/kendo-angular-l10n";
|
|
11
11
|
/**
|
|
12
12
|
* Represents the `save` command of the ListView. You can apply this directive to any `button`
|
|
13
13
|
* element inside a [`EditTemplateDirective`]({% slug api_listview_edittemplatedirective %}) template.
|
|
@@ -35,7 +35,7 @@ import { getClosestListItemIndex } from '../../utils';
|
|
|
35
35
|
* </kendo-listview>
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
export class SaveCommandDirective extends Button {
|
|
39
39
|
constructor(editService, element, renderer, localization, ngZone) {
|
|
40
40
|
super(element, renderer, null, localization, ngZone);
|
|
41
41
|
this.editService = editService;
|
|
@@ -51,21 +51,15 @@ let SaveCommandDirective = class SaveCommandDirective extends Button {
|
|
|
51
51
|
this.editService.save(index);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
]
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
ElementRef,
|
|
67
|
-
Renderer,
|
|
68
|
-
LocalizationService,
|
|
69
|
-
NgZone])
|
|
70
|
-
], SaveCommandDirective);
|
|
71
|
-
export { SaveCommandDirective };
|
|
54
|
+
}
|
|
55
|
+
SaveCommandDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SaveCommandDirective, deps: [{ token: i1.EditService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
56
|
+
SaveCommandDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SaveCommandDirective, selector: "[kendoListViewSaveCommand]", host: { listeners: { "click": "clickHandler($event)" } }, usesInheritance: true, ngImport: i0 });
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SaveCommandDirective, decorators: [{
|
|
58
|
+
type: Directive,
|
|
59
|
+
args: [{
|
|
60
|
+
selector: '[kendoListViewSaveCommand]'
|
|
61
|
+
}]
|
|
62
|
+
}], ctorParameters: function () { return [{ type: i1.EditService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i2.LocalizationService }, { type: i0.NgZone }]; }, propDecorators: { clickHandler: [{
|
|
63
|
+
type: HostListener,
|
|
64
|
+
args: ['click', ['$event']]
|
|
65
|
+
}] } });
|