@progress/kendo-angular-listbox 1.0.0-dev.202204141101 → 1.0.1-dev.202205120821
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-listbox.umd.js +1 -1
- package/data-binding.directive.d.ts +1 -5
- package/esm2015/data-binding.directive.js +2 -12
- package/esm2015/package-metadata.js +1 -1
- package/fesm2015/kendo-angular-listbox.js +3 -13
- package/package.json +9 -11
- package/schematics/ngAdd/index.js +4 -4
|
@@ -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&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@progress/kendo-licensing"),require("rxjs"),require("@progress/kendo-common"),require("@angular/common"),require("@progress/kendo-angular-buttons"),require("@progress/kendo-angular-common")):"function"==typeof define&&define.amd?define("KendoAngularListbox",["exports","@angular/core","@progress/kendo-licensing","rxjs","@progress/kendo-common","@angular/common","@progress/kendo-angular-buttons","@progress/kendo-angular-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularListbox={},e.ng.core,e.KendoLicensing,e.rxjs,e.KendoCommon,e.ng.common,e.KendoAngularButtons,e.KendoAngularCommon)}(this,function(e,i,s,r,o,t,n,l){"use strict";function a(n){if(n&&n.__esModule)return n;var o=Object.create(null);return n&&Object.keys(n).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(n,e),Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return n[e]}}))}),o.default=n,Object.freeze(o)}var c=a(i),d=a(t),p=a(n),m={name:"@progress/kendo-angular-listbox",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1649934053,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"},u=(g.prototype.select=function(e){this.selectedIndex=e,this.onSelect.next({index:this.selectedIndex})},g.prototype.isSelected=function(e){return e===this.selectedIndex},g.prototype.clearSelection=function(){this.selectedIndex=null},g);function g(){this.onSelect=new i.EventEmitter,this.selectedIndex=null}u.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:u,deps:[],target:c.ɵɵFactoryTarget.Injectable}),u.ɵprov=c.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:u}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:u,decorators:[{type:i.Injectable}]});function f(e,t){return I(e)?I(t)&&I(n=e)&&"object"==typeof n?o.getter(t)(e):e:null;var n}function b(){return!1}var h=function(e){this.templateRef=e},y=(h.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:h,deps:[{token:c.TemplateRef}],target:c.ɵɵFactoryTarget.Directive}),h.ɵdir=c.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:h,selector:"[kendoListBoxItemTemplate]",ngImport:c}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:h,decorators:[{type:i.Directive,args:[{selector:"[kendoListBoxItemTemplate]"}]}],ctorParameters:function(){return[{type:c.TemplateRef}]}}),"right"),v=[{name:"moveUp",label:"Move Up",icon:"arrow-n"},{name:"moveDown",label:"Move Down",icon:"arrow-s"},{name:"transferTo",label:"Transfer From",icon:"arrow-w"},{name:"transferFrom",label:"Transfer To",icon:"arrow-e"},{name:"transferAllTo",label:"Transfer All To",icon:"arrow-double-60-right"},{name:"transferAllFrom",label:"Transfer All From",icon:"arrow-double-60-left"},{name:"remove",label:"Remove",icon:"x"}],x={small:"sm",medium:"md",large:"lg"},k={left:"k-listbox-toolbar-left",right:"k-listbox-toolbar-right",top:"k-listbox-toolbar-top",bottom:"k-listbox-toolbar-bottom"},I=function(e){return null!=e},C=(Object.defineProperty(D.prototype,"selectedClassName",{get:function(){return this.selectionService.isSelected(this.index)},enumerable:!1,configurable:!0}),D.prototype.onClick=function(e){e.stopPropagation(),this.selectionService.select(this.index)},D);function D(e){this.selectionService=e}C.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:C,deps:[{token:u}],target:c.ɵɵFactoryTarget.Directive}),C.ɵdir=c.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:C,selector:"[kendoListBoxItemSelectable]",inputs:{index:"index"},host:{listeners:{click:"onClick($event)"},properties:{"class.k-selected":"this.selectedClassName"}},ngImport:c}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:C,decorators:[{type:i.Directive,args:[{selector:"[kendoListBoxItemSelectable]"}]}],ctorParameters:function(){return[{type:u}]},propDecorators:{index:[{type:i.Input}],selectedClassName:[{type:i.HostBinding,args:["class.k-selected"]}],onClick:[{type:i.HostListener,args:["click",["$event"]]}]}});Object.defineProperty(B.prototype,"toolbar",{set:function(e){var t=y;"boolean"==typeof e?this.selectedTools=e?v:[]:(this.selectedTools=e.tools?e.tools.map(function(t){return v.find(function(e){return e.name===t})}):v,e.position&&(t=e.position)),this.setToolbarClass(t)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"listClasses",{get:function(){return"k-list k-list-"+x[this.size]},enumerable:!1,configurable:!0}),B.prototype.ngOnDestroy=function(){this.sub.unsubscribe()},B.prototype.performAction=function(e){this.actionClick.next(e)},B.prototype.selectItem=function(e){this.selectionService.selectedIndex=e},B.prototype.clearSelection=function(){this.selectionService.clearSelection()},Object.defineProperty(B.prototype,"selectedIndex",{get:function(){return this.selectionService.selectedIndex},enumerable:!1,configurable:!0}),B.prototype.getText=function(e){if("string"!=typeof e&&!this.textField&&i.isDevMode())throw new Error("Missing textField input. When passing an array of objects as data, please set the textField input of the ListBox accordingly.");return f(e,this.textField)},B.prototype.setToolbarClass=function(t){var n=this;Object.keys(k).forEach(function(e){t===e?n.renderer.addClass(n.hostElement.nativeElement,k[e]):n.renderer.removeClass(n.hostElement.nativeElement,k[e])})};var T=B;function B(e,t,n){var o=this;this.selectionService=e,this.renderer=t,this.hostElement=n,this.listboxClassName=!0,this.data=[],this.size="medium",this.itemDisabled=b,this.selectionChange=new i.EventEmitter,this.actionClick=new i.EventEmitter,this.selectedTools=v,this.sub=new r.Subscription,s.validatePackage(m),this.setToolbarClass(y),this.sub.add(this.selectionService.onSelect.subscribe(function(e){o.selectionChange.next(e)}))}T.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:T,deps:[{token:u},{token:c.Renderer2},{token:c.ElementRef}],target:c.ɵɵFactoryTarget.Component}),T.ɵcmp=c.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:T,selector:"kendo-listbox",inputs:{textField:"textField",data:"data",size:"size",toolbar:"toolbar",itemDisabled:"itemDisabled"},outputs:{selectionChange:"selectionChange",actionClick:"actionClick"},host:{properties:{"class.k-listbox":"this.listboxClassName"}},providers:[u],queries:[{propertyName:"itemTemplate",first:!0,predicate:h,descendants:!0}],ngImport:c,template:'\n <div class="k-listbox-toolbar" *ngIf="selectedTools.length > 0">\n <ul class="k-reset">\n <li *ngFor="let tool of selectedTools">\n <button kendoButton [icon]="tool.icon" (click)="performAction(tool.name)"></button>\n </li>\n\n \x3c!-- react moving items has a smoother removal of the style: https://www.telerik.com/kendo-react-ui/components/listbox/ --\x3e\n </ul>\n </div>\n <div class="k-list-scroller k-selectable">\n <div class="{{ listClasses }}">\n <div class="k-list-content">\n <ul class="k-list-ul">\n <li\n class="k-list-item"\n *ngFor="let item of data; let i = index;"\n kendoListBoxItemSelectable\n [index]="i"\n [class.k-disabled]="itemDisabled(item)"\n >\n <ng-template *ngIf="itemTemplate; else defaultItemTemplate"\n [templateContext]="{\n templateRef: itemTemplate.templateRef,\n $implicit: item\n }">\n </ng-template>\n <ng-template #defaultItemTemplate>\n <span class="k-list-item-text">{{ getText(item) }}</span>\n </ng-template>\n </li>\n </ul>\n </div>\n </div>\n </div>\n ',isInline:!0,directives:[{type:d.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:d.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:p.ButtonDirective,selector:"button[kendoButton], span[kendoButton]",inputs:["toggleable","togglable","selected","tabIndex","icon","iconClass","imageUrl","disabled","size","rounded","fillMode","themeColor","role","primary","look"],outputs:["selectedChange","click"],exportAs:["kendoButton"]},{type:C,selector:"[kendoListBoxItemSelectable]",inputs:["index"]},{type:p.TemplateContextDirective,selector:"[templateContext]",inputs:["templateContext"]}]}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:T,decorators:[{type:i.Component,args:[{selector:"kendo-listbox",providers:[u],template:'\n <div class="k-listbox-toolbar" *ngIf="selectedTools.length > 0">\n <ul class="k-reset">\n <li *ngFor="let tool of selectedTools">\n <button kendoButton [icon]="tool.icon" (click)="performAction(tool.name)"></button>\n </li>\n\n \x3c!-- react moving items has a smoother removal of the style: https://www.telerik.com/kendo-react-ui/components/listbox/ --\x3e\n </ul>\n </div>\n <div class="k-list-scroller k-selectable">\n <div class="{{ listClasses }}">\n <div class="k-list-content">\n <ul class="k-list-ul">\n <li\n class="k-list-item"\n *ngFor="let item of data; let i = index;"\n kendoListBoxItemSelectable\n [index]="i"\n [class.k-disabled]="itemDisabled(item)"\n >\n <ng-template *ngIf="itemTemplate; else defaultItemTemplate"\n [templateContext]="{\n templateRef: itemTemplate.templateRef,\n $implicit: item\n }">\n </ng-template>\n <ng-template #defaultItemTemplate>\n <span class="k-list-item-text">{{ getText(item) }}</span>\n </ng-template>\n </li>\n </ul>\n </div>\n </div>\n </div>\n '}]}],ctorParameters:function(){return[{type:u},{type:c.Renderer2},{type:c.ElementRef}]},propDecorators:{listboxClassName:[{type:i.HostBinding,args:["class.k-listbox"]}],itemTemplate:[{type:i.ContentChild,args:[h,{static:!1}]}],textField:[{type:i.Input}],data:[{type:i.Input}],size:[{type:i.Input}],toolbar:[{type:i.Input}],itemDisabled:[{type:i.Input}],selectionChange:[{type:i.Output}],actionClick:[{type:i.Output}]}});Object.create;function F(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,s=n.call(e),r=[];try{for(;(void 0===t||0<t--)&&!(o=s.next()).done;)r.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return r}Object.create;w.prototype.ngOnChanges=function(e){var t=this;l.isChanged("connectedWith",e,!1)&&(this.sub.add(this.listbox.selectionChange.subscribe(function(){t.selectedBox=t.listbox,t.connectedWith.clearSelection()})),this.sub.add(this.connectedWith.selectionChange.subscribe(function(){t.selectedBox=t.connectedWith,t.listbox.clearSelection()}))),l.isChanged("data",e,!0)&&(this.listbox.data=e.data.currentValue)},w.prototype.ngOnDestroy=function(){this.sub.unsubscribe()},w.prototype.moveVertically=function(e){var t,n=this.selectedBox.selectedIndex;I(n)&&(t="down"===e&&n>=this.selectedBox.data.length-1,"up"===e&&n<=0||t||(e=F([this.selectedBox.data[n],this.selectedBox.data[t="up"===e?n-1:n+1]],2),this.selectedBox.data[t]=e[0],this.selectedBox.data[n]=e[1],this.selectedBox.selectionService.select(t)))},w.prototype.removeItem=function(){var e=this.selectedBox.selectedIndex;I(e)&&(this.selectedBox.data.splice(e,1),this.selectedBox.selectionService.clearSelection())},w.prototype.transferItem=function(e,t){var n=e&&e.data[e.selectedIndex];n&&t&&e&&(t.data.push(n),e.data.splice(e.selectedIndex,1),e.clearSelection(),t.selectItem(t.data.length-1),this.selectedBox=t)},w.prototype.transferAll=function(e,t){var n;t&&e&&((n=t.data).splice.apply(n,function(e,t,n){if(n||2===arguments.length)for(var o,i=0,s=t.length;i<s;i++)!o&&i in t||((o=o||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}([t.data.length,0],F(e.data.splice(0,e.data.length)))),t.selectItem(t.data.length-1),this.selectedBox=t)};d=w;function w(e){var t=this;this.listbox=e,this.data=[],this.sub=new r.Subscription,this.selectedBox=this.listbox,this.sub.add(this.listbox.actionClick.subscribe(function(e){switch(e){case"moveUp":t.moveVertically("up");break;case"moveDown":t.moveVertically("down");break;case"transferTo":t.transferItem(t.connectedWith,t.listbox);break;case"transferFrom":t.transferItem(t.listbox,t.connectedWith);break;case"transferAllTo":t.transferAll(t.listbox,t.connectedWith);break;case"transferAllFrom":t.transferAll(t.connectedWith,t.listbox);break;case"remove":t.removeItem()}}))}d.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:d,deps:[{token:T}],target:c.ɵɵFactoryTarget.Directive}),d.ɵdir=c.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:d,selector:"[kendoListBoxDataBinding]",inputs:{data:["kendoListBoxDataBinding","data"],connectedWith:"connectedWith"},usesOnChanges:!0,ngImport:c}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:d,decorators:[{type:i.Directive,args:[{selector:"[kendoListBoxDataBinding]"}]}],ctorParameters:function(){return[{type:T}]},propDecorators:{data:[{type:i.Input,args:["kendoListBoxDataBinding"]}],connectedWith:[{type:i.Input}]}});p=function(){};p.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:p,deps:[],target:c.ɵɵFactoryTarget.NgModule}),p.ɵmod=c.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:p,declarations:[T,h,C,d],imports:[n.ButtonsModule,t.CommonModule],exports:[T,h,C,d]}),p.ɵinj=c.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:p,imports:[[n.ButtonsModule,t.CommonModule]]}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:p,decorators:[{type:i.NgModule,args:[{imports:[n.ButtonsModule,t.CommonModule],declarations:[T,h,C,d],exports:[T,h,C,d]}]}]}),e.DataBindingDirective=d,e.ItemSelectableDirective=C,e.ItemTemplateDirective=h,e.ListBoxComponent=T,e.ListBoxModule=p,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
5
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@progress/kendo-licensing"),require("rxjs"),require("@progress/kendo-common"),require("@angular/common"),require("@progress/kendo-angular-buttons"),require("@progress/kendo-angular-common")):"function"==typeof define&&define.amd?define("KendoAngularListbox",["exports","@angular/core","@progress/kendo-licensing","rxjs","@progress/kendo-common","@angular/common","@progress/kendo-angular-buttons","@progress/kendo-angular-common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularListbox={},e.ng.core,e.KendoLicensing,e.rxjs,e.KendoCommon,e.ng.common,e.KendoAngularButtons,e.KendoAngularCommon)}(this,function(e,i,s,r,o,t,n,l){"use strict";function a(n){if(n&&n.__esModule)return n;var o=Object.create(null);return n&&Object.keys(n).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(n,e),Object.defineProperty(o,e,t.get?t:{enumerable:!0,get:function(){return n[e]}}))}),o.default=n,Object.freeze(o)}var c=a(i),d=a(t),p=a(n),m={name:"@progress/kendo-angular-listbox",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1652343651,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"},u=(g.prototype.select=function(e){this.selectedIndex=e,this.onSelect.next({index:this.selectedIndex})},g.prototype.isSelected=function(e){return e===this.selectedIndex},g.prototype.clearSelection=function(){this.selectedIndex=null},g);function g(){this.onSelect=new i.EventEmitter,this.selectedIndex=null}u.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:u,deps:[],target:c.ɵɵFactoryTarget.Injectable}),u.ɵprov=c.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:u}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:u,decorators:[{type:i.Injectable}]});function f(e,t){return I(e)?I(t)&&I(n=e)&&"object"==typeof n?o.getter(t)(e):e:null;var n}function b(){return!1}var h=function(e){this.templateRef=e},y=(h.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:h,deps:[{token:c.TemplateRef}],target:c.ɵɵFactoryTarget.Directive}),h.ɵdir=c.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:h,selector:"[kendoListBoxItemTemplate]",ngImport:c}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:h,decorators:[{type:i.Directive,args:[{selector:"[kendoListBoxItemTemplate]"}]}],ctorParameters:function(){return[{type:c.TemplateRef}]}}),"right"),v=[{name:"moveUp",label:"Move Up",icon:"arrow-n"},{name:"moveDown",label:"Move Down",icon:"arrow-s"},{name:"transferTo",label:"Transfer From",icon:"arrow-w"},{name:"transferFrom",label:"Transfer To",icon:"arrow-e"},{name:"transferAllTo",label:"Transfer All To",icon:"arrow-double-60-right"},{name:"transferAllFrom",label:"Transfer All From",icon:"arrow-double-60-left"},{name:"remove",label:"Remove",icon:"x"}],x={small:"sm",medium:"md",large:"lg"},k={left:"k-listbox-toolbar-left",right:"k-listbox-toolbar-right",top:"k-listbox-toolbar-top",bottom:"k-listbox-toolbar-bottom"},I=function(e){return null!=e},C=(Object.defineProperty(D.prototype,"selectedClassName",{get:function(){return this.selectionService.isSelected(this.index)},enumerable:!1,configurable:!0}),D.prototype.onClick=function(e){e.stopPropagation(),this.selectionService.select(this.index)},D);function D(e){this.selectionService=e}C.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:C,deps:[{token:u}],target:c.ɵɵFactoryTarget.Directive}),C.ɵdir=c.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:C,selector:"[kendoListBoxItemSelectable]",inputs:{index:"index"},host:{listeners:{click:"onClick($event)"},properties:{"class.k-selected":"this.selectedClassName"}},ngImport:c}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:C,decorators:[{type:i.Directive,args:[{selector:"[kendoListBoxItemSelectable]"}]}],ctorParameters:function(){return[{type:u}]},propDecorators:{index:[{type:i.Input}],selectedClassName:[{type:i.HostBinding,args:["class.k-selected"]}],onClick:[{type:i.HostListener,args:["click",["$event"]]}]}});Object.defineProperty(B.prototype,"toolbar",{set:function(e){var t=y;"boolean"==typeof e?this.selectedTools=e?v:[]:(this.selectedTools=e.tools?e.tools.map(function(t){return v.find(function(e){return e.name===t})}):v,e.position&&(t=e.position)),this.setToolbarClass(t)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"listClasses",{get:function(){return"k-list k-list-"+x[this.size]},enumerable:!1,configurable:!0}),B.prototype.ngOnDestroy=function(){this.sub.unsubscribe()},B.prototype.performAction=function(e){this.actionClick.next(e)},B.prototype.selectItem=function(e){this.selectionService.selectedIndex=e},B.prototype.clearSelection=function(){this.selectionService.clearSelection()},Object.defineProperty(B.prototype,"selectedIndex",{get:function(){return this.selectionService.selectedIndex},enumerable:!1,configurable:!0}),B.prototype.getText=function(e){if("string"!=typeof e&&!this.textField&&i.isDevMode())throw new Error("Missing textField input. When passing an array of objects as data, please set the textField input of the ListBox accordingly.");return f(e,this.textField)},B.prototype.setToolbarClass=function(t){var n=this;Object.keys(k).forEach(function(e){t===e?n.renderer.addClass(n.hostElement.nativeElement,k[e]):n.renderer.removeClass(n.hostElement.nativeElement,k[e])})};var T=B;function B(e,t,n){var o=this;this.selectionService=e,this.renderer=t,this.hostElement=n,this.listboxClassName=!0,this.data=[],this.size="medium",this.itemDisabled=b,this.selectionChange=new i.EventEmitter,this.actionClick=new i.EventEmitter,this.selectedTools=v,this.sub=new r.Subscription,s.validatePackage(m),this.setToolbarClass(y),this.sub.add(this.selectionService.onSelect.subscribe(function(e){o.selectionChange.next(e)}))}T.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:T,deps:[{token:u},{token:c.Renderer2},{token:c.ElementRef}],target:c.ɵɵFactoryTarget.Component}),T.ɵcmp=c.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:T,selector:"kendo-listbox",inputs:{textField:"textField",data:"data",size:"size",toolbar:"toolbar",itemDisabled:"itemDisabled"},outputs:{selectionChange:"selectionChange",actionClick:"actionClick"},host:{properties:{"class.k-listbox":"this.listboxClassName"}},providers:[u],queries:[{propertyName:"itemTemplate",first:!0,predicate:h,descendants:!0}],ngImport:c,template:'\n <div class="k-listbox-toolbar" *ngIf="selectedTools.length > 0">\n <ul class="k-reset">\n <li *ngFor="let tool of selectedTools">\n <button kendoButton [icon]="tool.icon" (click)="performAction(tool.name)"></button>\n </li>\n\n \x3c!-- react moving items has a smoother removal of the style: https://www.telerik.com/kendo-react-ui/components/listbox/ --\x3e\n </ul>\n </div>\n <div class="k-list-scroller k-selectable">\n <div class="{{ listClasses }}">\n <div class="k-list-content">\n <ul class="k-list-ul">\n <li\n class="k-list-item"\n *ngFor="let item of data; let i = index;"\n kendoListBoxItemSelectable\n [index]="i"\n [class.k-disabled]="itemDisabled(item)"\n >\n <ng-template *ngIf="itemTemplate; else defaultItemTemplate"\n [templateContext]="{\n templateRef: itemTemplate.templateRef,\n $implicit: item\n }">\n </ng-template>\n <ng-template #defaultItemTemplate>\n <span class="k-list-item-text">{{ getText(item) }}</span>\n </ng-template>\n </li>\n </ul>\n </div>\n </div>\n </div>\n ',isInline:!0,directives:[{type:d.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:d.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:p.ButtonDirective,selector:"button[kendoButton], span[kendoButton]",inputs:["toggleable","togglable","selected","tabIndex","icon","iconClass","imageUrl","disabled","size","rounded","fillMode","themeColor","role","primary","look"],outputs:["selectedChange","click"],exportAs:["kendoButton"]},{type:C,selector:"[kendoListBoxItemSelectable]",inputs:["index"]},{type:p.TemplateContextDirective,selector:"[templateContext]",inputs:["templateContext"]}]}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:T,decorators:[{type:i.Component,args:[{selector:"kendo-listbox",providers:[u],template:'\n <div class="k-listbox-toolbar" *ngIf="selectedTools.length > 0">\n <ul class="k-reset">\n <li *ngFor="let tool of selectedTools">\n <button kendoButton [icon]="tool.icon" (click)="performAction(tool.name)"></button>\n </li>\n\n \x3c!-- react moving items has a smoother removal of the style: https://www.telerik.com/kendo-react-ui/components/listbox/ --\x3e\n </ul>\n </div>\n <div class="k-list-scroller k-selectable">\n <div class="{{ listClasses }}">\n <div class="k-list-content">\n <ul class="k-list-ul">\n <li\n class="k-list-item"\n *ngFor="let item of data; let i = index;"\n kendoListBoxItemSelectable\n [index]="i"\n [class.k-disabled]="itemDisabled(item)"\n >\n <ng-template *ngIf="itemTemplate; else defaultItemTemplate"\n [templateContext]="{\n templateRef: itemTemplate.templateRef,\n $implicit: item\n }">\n </ng-template>\n <ng-template #defaultItemTemplate>\n <span class="k-list-item-text">{{ getText(item) }}</span>\n </ng-template>\n </li>\n </ul>\n </div>\n </div>\n </div>\n '}]}],ctorParameters:function(){return[{type:u},{type:c.Renderer2},{type:c.ElementRef}]},propDecorators:{listboxClassName:[{type:i.HostBinding,args:["class.k-listbox"]}],itemTemplate:[{type:i.ContentChild,args:[h,{static:!1}]}],textField:[{type:i.Input}],data:[{type:i.Input}],size:[{type:i.Input}],toolbar:[{type:i.Input}],itemDisabled:[{type:i.Input}],selectionChange:[{type:i.Output}],actionClick:[{type:i.Output}]}});Object.create;function F(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,i,s=n.call(e),r=[];try{for(;(void 0===t||0<t--)&&!(o=s.next()).done;)r.push(o.value)}catch(e){i={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return r}Object.create;w.prototype.ngOnChanges=function(e){var t=this;l.isChanged("connectedWith",e,!1)&&(this.sub.add(this.listbox.selectionChange.subscribe(function(){t.selectedBox=t.listbox,t.connectedWith.clearSelection()})),this.sub.add(this.connectedWith.selectionChange.subscribe(function(){t.selectedBox=t.connectedWith,t.listbox.clearSelection()})))},w.prototype.ngOnDestroy=function(){this.sub.unsubscribe()},w.prototype.moveVertically=function(e){var t,n=this.selectedBox.selectedIndex;I(n)&&(t="down"===e&&n>=this.selectedBox.data.length-1,"up"===e&&n<=0||t||(e=F([this.selectedBox.data[n],this.selectedBox.data[t="up"===e?n-1:n+1]],2),this.selectedBox.data[t]=e[0],this.selectedBox.data[n]=e[1],this.selectedBox.selectionService.select(t)))},w.prototype.removeItem=function(){var e=this.selectedBox.selectedIndex;I(e)&&(this.selectedBox.data.splice(e,1),this.selectedBox.selectionService.clearSelection())},w.prototype.transferItem=function(e,t){var n=e&&e.data[e.selectedIndex];n&&t&&e&&(t.data.push(n),e.data.splice(e.selectedIndex,1),e.clearSelection(),t.selectItem(t.data.length-1),this.selectedBox=t)},w.prototype.transferAll=function(e,t){var n;t&&e&&((n=t.data).splice.apply(n,function(e,t,n){if(n||2===arguments.length)for(var o,i=0,s=t.length;i<s;i++)!o&&i in t||((o=o||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}([t.data.length,0],F(e.data.splice(0,e.data.length)))),t.selectItem(t.data.length-1),this.selectedBox=t)};d=w;function w(e){var t=this;this.listbox=e,this.sub=new r.Subscription,this.selectedBox=this.listbox,this.sub.add(this.listbox.actionClick.subscribe(function(e){switch(e){case"moveUp":t.moveVertically("up");break;case"moveDown":t.moveVertically("down");break;case"transferTo":t.transferItem(t.connectedWith,t.listbox);break;case"transferFrom":t.transferItem(t.listbox,t.connectedWith);break;case"transferAllTo":t.transferAll(t.listbox,t.connectedWith);break;case"transferAllFrom":t.transferAll(t.connectedWith,t.listbox);break;case"remove":t.removeItem()}}))}d.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:d,deps:[{token:T}],target:c.ɵɵFactoryTarget.Directive}),d.ɵdir=c.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:d,selector:"[kendoListBoxDataBinding]",inputs:{connectedWith:"connectedWith"},usesOnChanges:!0,ngImport:c}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:d,decorators:[{type:i.Directive,args:[{selector:"[kendoListBoxDataBinding]"}]}],ctorParameters:function(){return[{type:T}]},propDecorators:{connectedWith:[{type:i.Input}]}});p=function(){};p.ɵfac=c.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:p,deps:[],target:c.ɵɵFactoryTarget.NgModule}),p.ɵmod=c.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:p,declarations:[T,h,C,d],imports:[n.ButtonsModule,t.CommonModule],exports:[T,h,C,d]}),p.ɵinj=c.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:p,imports:[[n.ButtonsModule,t.CommonModule]]}),c.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:c,type:p,decorators:[{type:i.NgModule,args:[{imports:[n.ButtonsModule,t.CommonModule],declarations:[T,h,C,d],exports:[T,h,C,d]}]}]}),e.DataBindingDirective=d,e.ItemSelectableDirective=C,e.ItemTemplateDirective=h,e.ListBoxComponent=T,e.ListBoxModule=p,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
@@ -10,10 +10,6 @@ import * as i0 from "@angular/core";
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class DataBindingDirective implements OnChanges, OnDestroy {
|
|
12
12
|
private listbox;
|
|
13
|
-
/**
|
|
14
|
-
* @hidden
|
|
15
|
-
*/
|
|
16
|
-
data: any[];
|
|
17
13
|
/**
|
|
18
14
|
* Specifies the ListBoxComponent instance with which the current ListBox should be connected.
|
|
19
15
|
* When two listboxes are linked via this input, one can transfer items between them.
|
|
@@ -35,5 +31,5 @@ export declare class DataBindingDirective implements OnChanges, OnDestroy {
|
|
|
35
31
|
private transferItem;
|
|
36
32
|
private transferAll;
|
|
37
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataBindingDirective, never>;
|
|
38
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<DataBindingDirective, "[kendoListBoxDataBinding]", never, { "
|
|
34
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DataBindingDirective, "[kendoListBoxDataBinding]", never, { "connectedWith": "connectedWith"; }, {}, never>;
|
|
39
35
|
}
|
|
@@ -14,10 +14,6 @@ import * as i1 from "./listbox.component";
|
|
|
14
14
|
export class DataBindingDirective {
|
|
15
15
|
constructor(listbox) {
|
|
16
16
|
this.listbox = listbox;
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
this.data = [];
|
|
21
17
|
this.sub = new Subscription();
|
|
22
18
|
this.selectedBox = this.listbox;
|
|
23
19
|
this.sub.add(this.listbox.actionClick.subscribe((actionName) => {
|
|
@@ -70,9 +66,6 @@ export class DataBindingDirective {
|
|
|
70
66
|
this.listbox.clearSelection();
|
|
71
67
|
}));
|
|
72
68
|
}
|
|
73
|
-
if (isChanged('data', changes, true)) {
|
|
74
|
-
this.listbox.data = changes.data.currentValue;
|
|
75
|
-
}
|
|
76
69
|
}
|
|
77
70
|
/**
|
|
78
71
|
* @hidden
|
|
@@ -124,15 +117,12 @@ export class DataBindingDirective {
|
|
|
124
117
|
}
|
|
125
118
|
}
|
|
126
119
|
DataBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DataBindingDirective, deps: [{ token: i1.ListBoxComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
127
|
-
DataBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DataBindingDirective, selector: "[kendoListBoxDataBinding]", inputs: {
|
|
120
|
+
DataBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DataBindingDirective, selector: "[kendoListBoxDataBinding]", inputs: { connectedWith: "connectedWith" }, usesOnChanges: true, ngImport: i0 });
|
|
128
121
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DataBindingDirective, decorators: [{
|
|
129
122
|
type: Directive,
|
|
130
123
|
args: [{
|
|
131
124
|
selector: '[kendoListBoxDataBinding]'
|
|
132
125
|
}]
|
|
133
|
-
}], ctorParameters: function () { return [{ type: i1.ListBoxComponent }]; }, propDecorators: {
|
|
134
|
-
type: Input,
|
|
135
|
-
args: ['kendoListBoxDataBinding']
|
|
136
|
-
}], connectedWith: [{
|
|
126
|
+
}], ctorParameters: function () { return [{ type: i1.ListBoxComponent }]; }, propDecorators: { connectedWith: [{
|
|
137
127
|
type: Input
|
|
138
128
|
}] } });
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-listbox',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1652343651,
|
|
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
|
};
|
|
@@ -20,7 +20,7 @@ const packageMetadata = {
|
|
|
20
20
|
name: '@progress/kendo-angular-listbox',
|
|
21
21
|
productName: 'Kendo UI for Angular',
|
|
22
22
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
23
|
-
publishDate:
|
|
23
|
+
publishDate: 1652343651,
|
|
24
24
|
version: '',
|
|
25
25
|
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'
|
|
26
26
|
};
|
|
@@ -437,10 +437,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
437
437
|
class DataBindingDirective {
|
|
438
438
|
constructor(listbox) {
|
|
439
439
|
this.listbox = listbox;
|
|
440
|
-
/**
|
|
441
|
-
* @hidden
|
|
442
|
-
*/
|
|
443
|
-
this.data = [];
|
|
444
440
|
this.sub = new Subscription();
|
|
445
441
|
this.selectedBox = this.listbox;
|
|
446
442
|
this.sub.add(this.listbox.actionClick.subscribe((actionName) => {
|
|
@@ -493,9 +489,6 @@ class DataBindingDirective {
|
|
|
493
489
|
this.listbox.clearSelection();
|
|
494
490
|
}));
|
|
495
491
|
}
|
|
496
|
-
if (isChanged('data', changes, true)) {
|
|
497
|
-
this.listbox.data = changes.data.currentValue;
|
|
498
|
-
}
|
|
499
492
|
}
|
|
500
493
|
/**
|
|
501
494
|
* @hidden
|
|
@@ -547,16 +540,13 @@ class DataBindingDirective {
|
|
|
547
540
|
}
|
|
548
541
|
}
|
|
549
542
|
DataBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DataBindingDirective, deps: [{ token: ListBoxComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
550
|
-
DataBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DataBindingDirective, selector: "[kendoListBoxDataBinding]", inputs: {
|
|
543
|
+
DataBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: DataBindingDirective, selector: "[kendoListBoxDataBinding]", inputs: { connectedWith: "connectedWith" }, usesOnChanges: true, ngImport: i0 });
|
|
551
544
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DataBindingDirective, decorators: [{
|
|
552
545
|
type: Directive,
|
|
553
546
|
args: [{
|
|
554
547
|
selector: '[kendoListBoxDataBinding]'
|
|
555
548
|
}]
|
|
556
|
-
}], ctorParameters: function () { return [{ type: ListBoxComponent }]; }, propDecorators: {
|
|
557
|
-
type: Input,
|
|
558
|
-
args: ['kendoListBoxDataBinding']
|
|
559
|
-
}], connectedWith: [{
|
|
549
|
+
}], ctorParameters: function () { return [{ type: ListBoxComponent }]; }, propDecorators: { connectedWith: [{
|
|
560
550
|
type: Input
|
|
561
551
|
}] } });
|
|
562
552
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-listbox",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1-dev.202205120821",
|
|
4
4
|
"description": "Kendo UI for Angular ListBox",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"tslib": "^2.3.1"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@angular/common": "
|
|
30
|
-
"@angular/core": "
|
|
31
|
-
"@progress/kendo-angular-buttons": "
|
|
32
|
-
"@progress/kendo-angular-common": "
|
|
33
|
-
"@progress/kendo-angular-l10n": "
|
|
34
|
-
"@progress/kendo-angular-popup": "
|
|
29
|
+
"@angular/common": "12 - 14",
|
|
30
|
+
"@angular/core": "12 - 14",
|
|
31
|
+
"@progress/kendo-angular-buttons": "^8.0.0",
|
|
32
|
+
"@progress/kendo-angular-common": "^3.0.0",
|
|
33
|
+
"@progress/kendo-angular-l10n": "^4.0.0",
|
|
34
|
+
"@progress/kendo-angular-popup": "^5.0.0",
|
|
35
35
|
"@progress/kendo-common": "^0.2.2",
|
|
36
36
|
"@progress/kendo-licensing": "^1.0.0",
|
|
37
37
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
@@ -63,12 +63,10 @@
|
|
|
63
63
|
"release": {
|
|
64
64
|
"debug": false,
|
|
65
65
|
"branchTags": {
|
|
66
|
-
"develop": "dev"
|
|
67
|
-
"ng12-update": "next"
|
|
66
|
+
"develop": "dev"
|
|
68
67
|
},
|
|
69
68
|
"fallbackTags": {
|
|
70
|
-
"dev": "latest"
|
|
71
|
-
"next": "latest"
|
|
69
|
+
"dev": "latest"
|
|
72
70
|
},
|
|
73
71
|
"analyzeCommits": "@telerik/semantic-prerelease/analyzeCommits",
|
|
74
72
|
"generateNotes": "@progress/kendo-angular-tasks/lib/generateNotes",
|
|
@@ -10,11 +10,11 @@ function default_1(options) {
|
|
|
10
10
|
// Additional dependencies to install.
|
|
11
11
|
// See https://github.com/telerik/kendo-schematics/issues/28
|
|
12
12
|
peerDependencies: {
|
|
13
|
-
"@progress/kendo-angular-buttons": "^
|
|
14
|
-
"@progress/kendo-angular-common": "^
|
|
15
|
-
"@progress/kendo-angular-l10n": "^
|
|
13
|
+
"@progress/kendo-angular-buttons": "^8.0.0",
|
|
14
|
+
"@progress/kendo-angular-common": "^3.0.0",
|
|
15
|
+
"@progress/kendo-angular-l10n": "^4.0.0",
|
|
16
16
|
// Peer of kendo-angular-buttons
|
|
17
|
-
"@progress/kendo-angular-popup": "^
|
|
17
|
+
"@progress/kendo-angular-popup": "^5.0.0"
|
|
18
18
|
} });
|
|
19
19
|
return schematics_1.externalSchematic('@progress/kendo-schematics', 'ng-add', finalOptions);
|
|
20
20
|
}
|