@progress/kendo-vue-listbox 8.4.0-develop.2 → 8.4.0-develop.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ListBoxToolbar.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("vue"),h=require("@progress/kendo-vue-buttons"),m=require("@progress/kendo-vue-intl"),p=require("./messages/main.js"),g=require("@progress/kendo-vue-common"),a=require("@progress/kendo-svg-icons"),u=[{name:"moveUp",iconName:"caret-alt-up",svgIcon:a.caretAltUpIcon},{name:"moveDown",iconName:"caret-alt-down",svgIcon:a.caretAltDownIcon},{name:"transferTo",iconName:"caret-alt-right",svgIcon:a.caretAltRightIcon},{name:"transferFrom",iconName:"caret-alt-left",svgIcon:a.caretAltLeftIcon},{name:"transferAllTo",iconName:"caret-double-alt-right",svgIcon:a.caretDoubleAltRightIcon},{name:"transferAllFrom",iconName:"caret-double-alt-left",svgIcon:a.caretDoubleAltLeftIcon},{name:"remove",iconName:"x",svgIcon:a.xIcon}],I=d.defineComponent({name:"KendoListBoxToolbar",props:{dataItems:Array,dataConnected:Array,tools:Array,selectedField:{type:String,default:"selected"}},inject:{kendoLocalizationService:{default:null}},data(){return{currentRtl:!1}},mounted(){this.currentRtl=g.isRtl(this.$el)},render(){const t=m.provideLocalizationService(this);return d.createVNode("div",{class:"k-listbox-actions"},[this.$props.tools&&this.$props.tools.map(function(e,l){let c=u.findIndex(i=>i.name===e),o=u[c],r=this.isItemDisabled(o.name),n=`listbox.${o.name}`;const s=t.toLanguageString(n,p.messages[n]);return d.createVNode(h.Button,{key:l,disabled:r,"data-command":o.name,title:s,"aria-label":s,icon:this.currentRtl?this.getRtlFontIcon(o.iconName):o.iconName,svgIcon:this.currentRtl?this.getRtlSvgIcon(o.svgIcon):o.svgIcon,onClick:i=>{i.preventDefault(),this.handleToolClick(i,o.name||null)}},null)},this)])},methods:{getRtlSvgIcon(t){switch(t.name){case"caret-alt-right":return a.caretAltLeftIcon;case"caret-alt-left":return a.caretAltRightIcon;case"caret-double-alt-right":return a.caretDoubleAltLeftIcon;case"caret-double-alt-left":return a.caretDoubleAltRightIcon}return t},getRtlFontIcon(t){switch(t){case"caret-alt-right":return"caret-alt-left";case"caret-alt-left":return"caret-alt-right";case"caret-double-alt-right":return"caret-double-alt-left";case"caret-double-alt-left":return"caret-double-alt-right"}return t},handleToolClick(t,e){this.$emit("toolclick",{event:t,component:this,toolName:e})},isItemDisabled(t){let e=!0,l=this.$props.selectedField||"selected",c=this.$props.dataItems.length,o=this.$props.dataConnected.length,r=this.$props.dataItems.findIndex(s=>s[l]===!0)>=0,n=this.$props.dataConnected.findIndex(s=>s[l]===!0)>=0;switch(t){case"moveUp":r?e=this.$props.dataItems.length>0?this.$props.dataItems[0].selected:!0:n?e=this.$props.dataConnected.length>0?this.$props.dataConnected[0].selected:!0:e=!0;break;case"moveDown":r?e=this.$props.dataItems[c-1]?this.$props.dataItems[c-1].selectedField:!0:n?e=this.$props.dataConnected.length>0?this.$props.dataConnected[o-1].selected:!0:e=!0;break;case"transferTo":e=!(this.$props.dataConnected&&r);break;case"transferFrom":this.$props.dataConnected?e=!(this.$props.dataConnected&&n):e=!0;break;case"transferAllTo":e=!(this.$props.dataConnected&&this.$props.dataItems.length>0);break;case"transferAllFrom":e=!(this.$props.dataConnected&&this.$props.dataConnected.length>0);break;case"remove":e=!(r||n);break}return e}}});exports.ListBoxToolbar=I;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("vue"),u=require("@progress/kendo-vue-buttons"),m=require("@progress/kendo-vue-intl"),p=require("./messages/main.js"),v=require("@progress/kendo-vue-common"),o=require("@progress/kendo-svg-icons"),h=[{name:"moveUp",iconName:"chevron-up",svgIcon:o.chevronUpIcon},{name:"moveDown",iconName:"chevron-down",svgIcon:o.chevronDownIcon},{name:"transferTo",iconName:"chevron-right",svgIcon:o.chevronRightIcon},{name:"transferFrom",iconName:"chevron-left",svgIcon:o.chevronLeftIcon},{name:"transferAllTo",iconName:"chevron-double-right",svgIcon:o.chevronDoubleRightIcon},{name:"transferAllFrom",iconName:"chevron-double-left",svgIcon:o.chevronDoubleLeftIcon},{name:"remove",iconName:"x",svgIcon:o.xIcon}],g=d.defineComponent({name:"KendoListBoxToolbar",props:{dataItems:Array,dataConnected:Array,tools:Array,selectedField:{type:String,default:"selected"}},inject:{kendoLocalizationService:{default:null}},data(){return{currentRtl:!1}},mounted(){this.currentRtl=v.isRtl(this.$el)},render(){const t=m.provideLocalizationService(this);return d.createVNode("div",{class:"k-listbox-actions"},[this.$props.tools&&this.$props.tools.map(function(e,c){let l=h.findIndex(i=>i.name===e),n=h[l],s=this.isItemDisabled(n.name),r=`listbox.${n.name}`;const a=t.toLanguageString(r,p.messages[r]);return d.createVNode(u.Button,{key:c,disabled:s,"data-command":n.name,title:a,"aria-label":a,icon:this.currentRtl?this.getRtlFontIcon(n.iconName):n.iconName,svgIcon:this.currentRtl?this.getRtlSvgIcon(n.svgIcon):n.svgIcon,onClick:i=>{i.preventDefault(),this.handleToolClick(i,n.name||null)}},null)},this)])},methods:{getRtlSvgIcon(t){switch(t.name){case"chevron-right":return o.chevronLeftIcon;case"chevron-left":return o.chevronRightIcon;case"chevron-double-right":return o.chevronDoubleLeftIcon;case"chevron-double-left":return o.chevronDoubleRightIcon}return t},getRtlFontIcon(t){switch(t){case"chevron-right":return"chevron-left";case"chevron-left":return"chevron-right";case"chevron-double-right":return"chevron-double-left";case"chevron-double-left":return"chevron-double-right"}return t},handleToolClick(t,e){this.$emit("toolclick",{event:t,component:this,toolName:e})},isItemDisabled(t){let e=!0,c=this.$props.selectedField||"selected",l=this.$props.dataItems.length,n=this.$props.dataConnected.length,s=this.$props.dataItems.findIndex(a=>a[c]===!0)>=0,r=this.$props.dataConnected.findIndex(a=>a[c]===!0)>=0;switch(t){case"moveUp":s?e=this.$props.dataItems.length>0?this.$props.dataItems[0].selected:!0:r?e=this.$props.dataConnected.length>0?this.$props.dataConnected[0].selected:!0:e=!0;break;case"moveDown":s?e=this.$props.dataItems[l-1]?this.$props.dataItems[l-1].selectedField:!0:r?e=this.$props.dataConnected.length>0?this.$props.dataConnected[n-1].selected:!0:e=!0;break;case"transferTo":e=!(this.$props.dataConnected&&s);break;case"transferFrom":this.$props.dataConnected?e=!(this.$props.dataConnected&&r):e=!0;break;case"transferAllTo":e=!(this.$props.dataConnected&&this.$props.dataItems.length>0);break;case"transferAllFrom":e=!(this.$props.dataConnected&&this.$props.dataConnected.length>0);break;case"remove":e=!(s||r);break}return e}}});exports.ListBoxToolbar=g;
@@ -5,41 +5,41 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { defineComponent as g, createVNode as i } from "vue";
9
- import { Button as f } from "@progress/kendo-vue-buttons";
10
- import { provideLocalizationService as I } from "@progress/kendo-vue-intl";
11
- import { messages as b } from "./messages/main.mjs";
12
- import { isRtl as $ } from "@progress/kendo-vue-common";
13
- import { caretDoubleAltRightIcon as m, caretDoubleAltLeftIcon as p, caretAltRightIcon as h, caretAltLeftIcon as u, caretAltUpIcon as v, caretAltDownIcon as C, xIcon as k } from "@progress/kendo-svg-icons";
8
+ import { defineComponent as v, createVNode as i } from "vue";
9
+ import { Button as g } from "@progress/kendo-vue-buttons";
10
+ import { provideLocalizationService as f } from "@progress/kendo-vue-intl";
11
+ import { messages as I } from "./messages/main.mjs";
12
+ import { isRtl as b } from "@progress/kendo-vue-common";
13
+ import { chevronDoubleRightIcon as h, chevronDoubleLeftIcon as m, chevronRightIcon as p, chevronLeftIcon as u, chevronUpIcon as $, chevronDownIcon as C, xIcon as k } from "@progress/kendo-svg-icons";
14
14
  const d = [{
15
15
  name: "moveUp",
16
- iconName: "caret-alt-up",
17
- svgIcon: v
16
+ iconName: "chevron-up",
17
+ svgIcon: $
18
18
  }, {
19
19
  name: "moveDown",
20
- iconName: "caret-alt-down",
20
+ iconName: "chevron-down",
21
21
  svgIcon: C
22
22
  }, {
23
23
  name: "transferTo",
24
- iconName: "caret-alt-right",
25
- svgIcon: h
24
+ iconName: "chevron-right",
25
+ svgIcon: p
26
26
  }, {
27
27
  name: "transferFrom",
28
- iconName: "caret-alt-left",
28
+ iconName: "chevron-left",
29
29
  svgIcon: u
30
30
  }, {
31
31
  name: "transferAllTo",
32
- iconName: "caret-double-alt-right",
33
- svgIcon: m
32
+ iconName: "chevron-double-right",
33
+ svgIcon: h
34
34
  }, {
35
35
  name: "transferAllFrom",
36
- iconName: "caret-double-alt-left",
37
- svgIcon: p
36
+ iconName: "chevron-double-left",
37
+ svgIcon: m
38
38
  }, {
39
39
  name: "remove",
40
40
  iconName: "x",
41
41
  svgIcon: k
42
- }], D = /* @__PURE__ */ g({
42
+ }], L = /* @__PURE__ */ v({
43
43
  name: "KendoListBoxToolbar",
44
44
  props: {
45
45
  dataItems: Array,
@@ -61,25 +61,25 @@ const d = [{
61
61
  };
62
62
  },
63
63
  mounted() {
64
- this.currentRtl = $(this.$el);
64
+ this.currentRtl = b(this.$el);
65
65
  },
66
66
  render() {
67
- const t = I(this);
67
+ const t = f(this);
68
68
  return i("div", {
69
69
  class: "k-listbox-actions"
70
- }, [this.$props.tools && this.$props.tools.map(function(e, s) {
71
- let l = d.findIndex((c) => c.name === e), a = d[l], o = this.isItemDisabled(a.name), r = `listbox.${a.name}`;
72
- const n = t.toLanguageString(r, b[r]);
73
- return i(f, {
74
- key: s,
75
- disabled: o,
76
- "data-command": a.name,
77
- title: n,
78
- "aria-label": n,
79
- icon: this.currentRtl ? this.getRtlFontIcon(a.iconName) : a.iconName,
80
- svgIcon: this.currentRtl ? this.getRtlSvgIcon(a.svgIcon) : a.svgIcon,
81
- onClick: (c) => {
82
- c.preventDefault(), this.handleToolClick(c, a.name || null);
70
+ }, [this.$props.tools && this.$props.tools.map(function(e, a) {
71
+ let c = d.findIndex((l) => l.name === e), o = d[c], r = this.isItemDisabled(o.name), n = `listbox.${o.name}`;
72
+ const s = t.toLanguageString(n, I[n]);
73
+ return i(g, {
74
+ key: a,
75
+ disabled: r,
76
+ "data-command": o.name,
77
+ title: s,
78
+ "aria-label": s,
79
+ icon: this.currentRtl ? this.getRtlFontIcon(o.iconName) : o.iconName,
80
+ svgIcon: this.currentRtl ? this.getRtlSvgIcon(o.svgIcon) : o.svgIcon,
81
+ onClick: (l) => {
82
+ l.preventDefault(), this.handleToolClick(l, o.name || null);
83
83
  }
84
84
  }, null);
85
85
  }, this)]);
@@ -87,27 +87,27 @@ const d = [{
87
87
  methods: {
88
88
  getRtlSvgIcon(t) {
89
89
  switch (t.name) {
90
- case "caret-alt-right":
90
+ case "chevron-right":
91
91
  return u;
92
- case "caret-alt-left":
93
- return h;
94
- case "caret-double-alt-right":
92
+ case "chevron-left":
95
93
  return p;
96
- case "caret-double-alt-left":
94
+ case "chevron-double-right":
97
95
  return m;
96
+ case "chevron-double-left":
97
+ return h;
98
98
  }
99
99
  return t;
100
100
  },
101
101
  getRtlFontIcon(t) {
102
102
  switch (t) {
103
- case "caret-alt-right":
104
- return "caret-alt-left";
105
- case "caret-alt-left":
106
- return "caret-alt-right";
107
- case "caret-double-alt-right":
108
- return "caret-double-alt-left";
109
- case "caret-double-alt-left":
110
- return "caret-double-alt-right";
103
+ case "chevron-right":
104
+ return "chevron-left";
105
+ case "chevron-left":
106
+ return "chevron-right";
107
+ case "chevron-double-right":
108
+ return "chevron-double-left";
109
+ case "chevron-double-left":
110
+ return "chevron-double-right";
111
111
  }
112
112
  return t;
113
113
  },
@@ -119,19 +119,19 @@ const d = [{
119
119
  });
120
120
  },
121
121
  isItemDisabled(t) {
122
- let e = !0, s = this.$props.selectedField || "selected", l = this.$props.dataItems.length, a = this.$props.dataConnected.length, o = this.$props.dataItems.findIndex((n) => n[s] === !0) >= 0, r = this.$props.dataConnected.findIndex((n) => n[s] === !0) >= 0;
122
+ let e = !0, a = this.$props.selectedField || "selected", c = this.$props.dataItems.length, o = this.$props.dataConnected.length, r = this.$props.dataItems.findIndex((s) => s[a] === !0) >= 0, n = this.$props.dataConnected.findIndex((s) => s[a] === !0) >= 0;
123
123
  switch (t) {
124
124
  case "moveUp":
125
- o ? e = this.$props.dataItems.length > 0 ? this.$props.dataItems[0].selected : !0 : r ? e = this.$props.dataConnected.length > 0 ? this.$props.dataConnected[0].selected : !0 : e = !0;
125
+ r ? e = this.$props.dataItems.length > 0 ? this.$props.dataItems[0].selected : !0 : n ? e = this.$props.dataConnected.length > 0 ? this.$props.dataConnected[0].selected : !0 : e = !0;
126
126
  break;
127
127
  case "moveDown":
128
- o ? e = this.$props.dataItems[l - 1] ? this.$props.dataItems[l - 1].selectedField : !0 : r ? e = this.$props.dataConnected.length > 0 ? this.$props.dataConnected[a - 1].selected : !0 : e = !0;
128
+ r ? e = this.$props.dataItems[c - 1] ? this.$props.dataItems[c - 1].selectedField : !0 : n ? e = this.$props.dataConnected.length > 0 ? this.$props.dataConnected[o - 1].selected : !0 : e = !0;
129
129
  break;
130
130
  case "transferTo":
131
- e = !(this.$props.dataConnected && o);
131
+ e = !(this.$props.dataConnected && r);
132
132
  break;
133
133
  case "transferFrom":
134
- this.$props.dataConnected ? e = !(this.$props.dataConnected && r) : e = !0;
134
+ this.$props.dataConnected ? e = !(this.$props.dataConnected && n) : e = !0;
135
135
  break;
136
136
  case "transferAllTo":
137
137
  e = !(this.$props.dataConnected && this.$props.dataItems.length > 0);
@@ -140,7 +140,7 @@ const d = [{
140
140
  e = !(this.$props.dataConnected && this.$props.dataConnected.length > 0);
141
141
  break;
142
142
  case "remove":
143
- e = !(o || r);
143
+ e = !(r || n);
144
144
  break;
145
145
  }
146
146
  return e;
@@ -148,5 +148,5 @@ const d = [{
148
148
  }
149
149
  });
150
150
  export {
151
- D as ListBoxToolbar
151
+ L as ListBoxToolbar
152
152
  };
@@ -12,4 +12,4 @@
12
12
  * Licensed under commercial license. See LICENSE.md in the package root for more information
13
13
  *-------------------------------------------------------------------------------------------
14
14
  */
15
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-common"),require("@progress/kendo-vue-buttons"),require("@progress/kendo-vue-intl"),require("@progress/kendo-svg-icons")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-common","@progress/kendo-vue-buttons","@progress/kendo-vue-intl","@progress/kendo-svg-icons"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueListbox={},e.Vue,e.KendoVueCommon,e.KendoVueButtons,e.KendoVueIntl,e.KendoSVGIcons)}(this,function(e,t,o,s,a,n){"use strict";let r=function(e){return e.TOP="top",e.BOTTOM="bottom",e.LEFT="left",e.RIGHT="right",e.NONE="none",e}({});const l={name:"@progress/kendo-vue-listbox",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1672219056,version:"8.4.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"},i=t.defineComponent({name:"KendoListBox",emits:{dragstart:null,itemclick:null,drop:null,dragover:null,keydown:null,dragleave:null},props:{size:{type:String,validator:function(e){return["small","medium","large"].includes(e)}},toolbarPosition:{type:String,default:r.RIGHT,validator:function(e){return["none","top","bottom","left","right"].includes(e)}},textField:String,valueField:String,keyField:String,selectedField:String,item:[String,Object,Function],toolbar:[String,Object,Function],tabIndex:Number,dataItems:{type:Array,default:function(){return[]}},draggable:{type:Boolean,default:!1}},created(){o.validatePackage(l)},computed:{wrapperClass(){const e=this.$props.toolbarPosition===r.NONE||void 0===this.$props.toolbar;return{"k-listbox":!0,[`k-listbox-actions-${this.$props.toolbarPosition}`]:!e}}},render(){const e=o.templateRendering.call(this,this.$props.toolbar,o.getListeners.call(this)),s=o.getTemplate.call(this,{h:t.h,template:e});return t.createVNode("div",{class:this.wrapperClass,unselectable:"on"},["bottom"!==this.$props.toolbarPosition&&s,t.createVNode("div",{class:"k-list-scroller k-selectable","data-role":"selectable",onDragover:e=>e.preventDefault(),onDrop:this.handleContainerDrop,onDragleave:this.handleOnDragLeave},[t.createVNode("div",{class:o.classNames("k-list",{[`k-list-${o.kendoThemeMaps.sizeMap[this.$props.size]||this.$props.size}`]:this.$props.size})},[t.createVNode("div",{class:"k-list-content"},[t.createVNode("ul",{class:"k-list-ul",role:"listbox","aria-label":"listbox-container",tabindex:this.tabIndex,onKeydown:this.handleKeyDown},[this.$props.dataItems.map(function(e,s){let a=this.setSelected(e),n=o.guid();const r=t.createVNode("span",{class:"k-list-item-text"},[this.$props.textField?e[this.$props.textField]:e.toString()]),l=o.templateRendering.call(this,this.$props.item,o.getListeners.call(this)),i=o.getTemplate.call(this,{h:t.h,template:l,defaultRendering:r,additionalProps:{dataItem:e,index:s}});return t.createVNode("li",{class:o.classNames("k-list-item",{"k-selected":a},e.class),style:e.style,role:"option","aria-selected":a,key:this.$props.keyField?e[this.$props.keyField]:s,id:n+s,"data-uid":n+s,draggable:this.$props.draggable,onDragstart:t=>this.dispatchEvent("dragstart",t,e),onDragover:t=>{t.preventDefault(),this.dispatchEvent("dragover",t,e)},onDrop:t=>this.dispatchEvent("drop",t,e),onClick:t=>this.dispatchEvent("itemclick",t,e)},[i])},this)])])])]),"bottom"===this.$props.toolbarPosition&&s,t.createVNode("select",{style:{display:"none"},multiple:!0,"data-role":"listbox"},[this.$props.dataItems.map(function(e,o){let s=e[this.$props.valueField||this.$props.textField];return t.createVNode("option",{key:o,value:s},[s])},this)])])},methods:{dispatchEvent(e,t,o){this.$emit(e,{event:t,component:this,dataItem:o})},setSelected(e){if(this.$props.selectedField)return!!e[this.$props.selectedField]},handleKeyDown(e){this.$emit("keydown",{event:e,component:this})},handleContainerDrop(e){const t=e.target,o=t.closest(".k-list-scroller"),s=t.closest(".k-list-ul"),a=this.$props.dataItems;o&&!s&&this.$emit("drop",{event:e,component:this,dataItem:a.length>0?a[a.length-1]:null})},handleOnDragLeave(e){e.target.classList.contains("k-list-content")&&this.$emit("dragleave",{event:e,component:this})}}}),c="listbox.moveUp",d="listbox.moveDown",p="listbox.transferTo",u="listbox.transferFrom",h="listbox.transferAllTo",m="listbox.transferAllFrom",g="listbox.remove",f={[c]:"Move Up",[d]:"Move Down",[p]:"Transfer To",[u]:"Transfer From",[h]:"Transfer All To",[m]:"Transfer All From",[g]:"Delete"},v=[{name:"moveUp",iconName:"caret-alt-up",svgIcon:n.caretAltUpIcon},{name:"moveDown",iconName:"caret-alt-down",svgIcon:n.caretAltDownIcon},{name:"transferTo",iconName:"caret-alt-right",svgIcon:n.caretAltRightIcon},{name:"transferFrom",iconName:"caret-alt-left",svgIcon:n.caretAltLeftIcon},{name:"transferAllTo",iconName:"caret-double-alt-right",svgIcon:n.caretDoubleAltRightIcon},{name:"transferAllFrom",iconName:"caret-double-alt-left",svgIcon:n.caretDoubleAltLeftIcon},{name:"remove",iconName:"x",svgIcon:n.xIcon}],b=t.defineComponent({name:"KendoListBoxToolbar",props:{dataItems:Array,dataConnected:Array,tools:Array,selectedField:{type:String,default:"selected"}},inject:{kendoLocalizationService:{default:null}},data:()=>({currentRtl:!1}),mounted(){this.currentRtl=o.isRtl(this.$el)},render(){const e=a.provideLocalizationService(this);return t.createVNode("div",{class:"k-listbox-actions"},[this.$props.tools&&this.$props.tools.map(function(o,a){let n=v.findIndex(e=>e.name===o),r=v[n],l=this.isItemDisabled(r.name),i=`listbox.${r.name}`;const c=e.toLanguageString(i,f[i]);return t.createVNode(s.Button,{key:a,disabled:l,"data-command":r.name,title:c,"aria-label":c,icon:this.currentRtl?this.getRtlFontIcon(r.iconName):r.iconName,svgIcon:this.currentRtl?this.getRtlSvgIcon(r.svgIcon):r.svgIcon,onClick:e=>{e.preventDefault(),this.handleToolClick(e,r.name||null)}},null)},this)])},methods:{getRtlSvgIcon(e){switch(e.name){case"caret-alt-right":return n.caretAltLeftIcon;case"caret-alt-left":return n.caretAltRightIcon;case"caret-double-alt-right":return n.caretDoubleAltLeftIcon;case"caret-double-alt-left":return n.caretDoubleAltRightIcon}return e},getRtlFontIcon(e){switch(e){case"caret-alt-right":return"caret-alt-left";case"caret-alt-left":return"caret-alt-right";case"caret-double-alt-right":return"caret-double-alt-left";case"caret-double-alt-left":return"caret-double-alt-right"}return e},handleToolClick(e,t){this.$emit("toolclick",{event:e,component:this,toolName:t})},isItemDisabled(e){let t=!0,o=this.$props.selectedField||"selected",s=this.$props.dataItems.length,a=this.$props.dataConnected.length,n=this.$props.dataItems.findIndex(e=>!0===e[o])>=0,r=this.$props.dataConnected.findIndex(e=>!0===e[o])>=0;switch(e){case"moveUp":t=n?!(this.$props.dataItems.length>0)||this.$props.dataItems[0].selected:!r||(!(this.$props.dataConnected.length>0)||this.$props.dataConnected[0].selected);break;case"moveDown":t=n?!this.$props.dataItems[s-1]||this.$props.dataItems[s-1].selectedField:!r||(!(this.$props.dataConnected.length>0)||this.$props.dataConnected[a-1].selected);break;case"transferTo":t=!(this.$props.dataConnected&&n);break;case"transferFrom":t=!this.$props.dataConnected||!(this.$props.dataConnected&&r);break;case"transferAllTo":t=!(this.$props.dataConnected&&this.$props.dataItems.length>0);break;case"transferAllFrom":t=!(this.$props.dataConnected&&this.$props.dataConnected.length>0);break;case"remove":t=!(n||r)}return t}}}),x=(e,t,o)=>{let s=o.splice(e,1)[0];return o.splice(t,0,s),o};e.ListBox=i,e.ListBoxToolbar=b,e.moveItem=x,e.processListBoxData=(e=[],t=[],o,s)=>{let a=[],n=[],r=[],l={listBoxOneData:e,listBoxTwoData:t};switch(o){case"moveUp":a=[...e],a.forEach((e,t)=>{e[s]&&(a=x(t,t-1,a))}),r=[...t],r.forEach((e,t)=>{e[s]&&(r=x(t,t-1,r))}),l.listBoxOneData=a,l.listBoxTwoData=r;break;case"moveDown":a=e.reverse(),a.forEach((e,t)=>{e[s]&&(a=x(t,t-1,a))}),r=t.reverse(),r.forEach((e,t)=>{e[s]&&(r=x(t,t-1,r))}),l.listBoxOneData=[...a].reverse(),l.listBoxTwoData=[...r].reverse();break;case"transferTo":a=e.filter(e=>!e[s]),n=e.filter(e=>e[s]),r=t.concat(n),l.listBoxOneData=a,l.listBoxTwoData=r;break;case"transferFrom":r=t.filter(e=>!e[s]),n=t.filter(e=>e[s]),a=e.concat(n),l.listBoxOneData=a,l.listBoxTwoData=r;break;case"transferAllTo":l.listBoxOneData=[],l.listBoxTwoData=t.concat(e);break;case"transferAllFrom":l.listBoxOneData=t.concat(e),l.listBoxTwoData=[];break;case"remove":r=t.filter(e=>!e[s]),a=e.filter(e=>!e[s]),l.listBoxOneData=a,l.listBoxTwoData=r}return l},e.processListBoxDragAndDrop=(e=[],t=[],o,s,a)=>{let n=e.findIndex(e=>e[a]===o[a]),r=t.findIndex(e=>e[a]===o[a]),l=null!==s?e.findIndex(e=>e[a]===s[a]):-1,i=null!==s?t.findIndex(e=>e[a]===s[a]):-1,c=n>=0,d=r>=0,p=l>=0,u=i>=0,h=[...e],m=[...t];return c&&p?{listBoxOneData:x(n,l,e),listBoxTwoData:t}:d&&u?{listBoxOneData:e,listBoxTwoData:x(r,i,t)}:c&&(u||null===s)?(null===s?m.push(e[n]):m.splice(i+1,0,e[n]),h.splice(n,1),{listBoxOneData:h,listBoxTwoData:m}):d&&(p||null===s)?(null===s?h.push(t[r]):h.splice(l+1,0,t[r]),m.splice(r,1),{listBoxOneData:h,listBoxTwoData:m}):{listBoxOneData:e,listBoxTwoData:t}}});
15
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("@progress/kendo-vue-common"),require("@progress/kendo-vue-buttons"),require("@progress/kendo-vue-intl"),require("@progress/kendo-svg-icons")):"function"==typeof define&&define.amd?define(["exports","vue","@progress/kendo-vue-common","@progress/kendo-vue-buttons","@progress/kendo-vue-intl","@progress/kendo-svg-icons"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoVueListbox={},e.Vue,e.KendoVueCommon,e.KendoVueButtons,e.KendoVueIntl,e.KendoSVGIcons)}(this,function(e,t,o,s,n,r){"use strict";let a=function(e){return e.TOP="top",e.BOTTOM="bottom",e.LEFT="left",e.RIGHT="right",e.NONE="none",e}({});const i={name:"@progress/kendo-vue-listbox",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:1672219056,version:"8.4.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"},l=t.defineComponent({name:"KendoListBox",emits:{dragstart:null,itemclick:null,drop:null,dragover:null,keydown:null,dragleave:null},props:{size:{type:String,validator:function(e){return["small","medium","large"].includes(e)}},toolbarPosition:{type:String,default:a.RIGHT,validator:function(e){return["none","top","bottom","left","right"].includes(e)}},textField:String,valueField:String,keyField:String,selectedField:String,item:[String,Object,Function],toolbar:[String,Object,Function],tabIndex:Number,dataItems:{type:Array,default:function(){return[]}},draggable:{type:Boolean,default:!1}},created(){o.validatePackage(i)},computed:{wrapperClass(){const e=this.$props.toolbarPosition===a.NONE||void 0===this.$props.toolbar;return{"k-listbox":!0,[`k-listbox-actions-${this.$props.toolbarPosition}`]:!e}}},render(){const e=o.templateRendering.call(this,this.$props.toolbar,o.getListeners.call(this)),s=o.getTemplate.call(this,{h:t.h,template:e});return t.createVNode("div",{class:this.wrapperClass,unselectable:"on"},["bottom"!==this.$props.toolbarPosition&&s,t.createVNode("div",{class:"k-list-scroller k-selectable","data-role":"selectable",onDragover:e=>e.preventDefault(),onDrop:this.handleContainerDrop,onDragleave:this.handleOnDragLeave},[t.createVNode("div",{class:o.classNames("k-list",{[`k-list-${o.kendoThemeMaps.sizeMap[this.$props.size]||this.$props.size}`]:this.$props.size})},[t.createVNode("div",{class:"k-list-content"},[t.createVNode("ul",{class:"k-list-ul",role:"listbox","aria-label":"listbox-container",tabindex:this.tabIndex,onKeydown:this.handleKeyDown},[this.$props.dataItems.map(function(e,s){let n=this.setSelected(e),r=o.guid();const a=t.createVNode("span",{class:"k-list-item-text"},[this.$props.textField?e[this.$props.textField]:e.toString()]),i=o.templateRendering.call(this,this.$props.item,o.getListeners.call(this)),l=o.getTemplate.call(this,{h:t.h,template:i,defaultRendering:a,additionalProps:{dataItem:e,index:s}});return t.createVNode("li",{class:o.classNames("k-list-item",{"k-selected":n},e.class),style:e.style,role:"option","aria-selected":n,key:this.$props.keyField?e[this.$props.keyField]:s,id:r+s,"data-uid":r+s,draggable:this.$props.draggable,onDragstart:t=>this.dispatchEvent("dragstart",t,e),onDragover:t=>{t.preventDefault(),this.dispatchEvent("dragover",t,e)},onDrop:t=>this.dispatchEvent("drop",t,e),onClick:t=>this.dispatchEvent("itemclick",t,e)},[l])},this)])])])]),"bottom"===this.$props.toolbarPosition&&s,t.createVNode("select",{style:{display:"none"},multiple:!0,"data-role":"listbox"},[this.$props.dataItems.map(function(e,o){let s=e[this.$props.valueField||this.$props.textField];return t.createVNode("option",{key:o,value:s},[s])},this)])])},methods:{dispatchEvent(e,t,o){this.$emit(e,{event:t,component:this,dataItem:o})},setSelected(e){if(this.$props.selectedField)return!!e[this.$props.selectedField]},handleKeyDown(e){this.$emit("keydown",{event:e,component:this})},handleContainerDrop(e){const t=e.target,o=t.closest(".k-list-scroller"),s=t.closest(".k-list-ul"),n=this.$props.dataItems;o&&!s&&this.$emit("drop",{event:e,component:this,dataItem:n.length>0?n[n.length-1]:null})},handleOnDragLeave(e){e.target.classList.contains("k-list-content")&&this.$emit("dragleave",{event:e,component:this})}}}),c="listbox.moveUp",d="listbox.moveDown",p="listbox.transferTo",h="listbox.transferFrom",u="listbox.transferAllTo",m="listbox.transferAllFrom",v="listbox.remove",g={[c]:"Move Up",[d]:"Move Down",[p]:"Transfer To",[h]:"Transfer From",[u]:"Transfer All To",[m]:"Transfer All From",[v]:"Delete"},f=[{name:"moveUp",iconName:"chevron-up",svgIcon:r.chevronUpIcon},{name:"moveDown",iconName:"chevron-down",svgIcon:r.chevronDownIcon},{name:"transferTo",iconName:"chevron-right",svgIcon:r.chevronRightIcon},{name:"transferFrom",iconName:"chevron-left",svgIcon:r.chevronLeftIcon},{name:"transferAllTo",iconName:"chevron-double-right",svgIcon:r.chevronDoubleRightIcon},{name:"transferAllFrom",iconName:"chevron-double-left",svgIcon:r.chevronDoubleLeftIcon},{name:"remove",iconName:"x",svgIcon:r.xIcon}],b=t.defineComponent({name:"KendoListBoxToolbar",props:{dataItems:Array,dataConnected:Array,tools:Array,selectedField:{type:String,default:"selected"}},inject:{kendoLocalizationService:{default:null}},data:()=>({currentRtl:!1}),mounted(){this.currentRtl=o.isRtl(this.$el)},render(){const e=n.provideLocalizationService(this);return t.createVNode("div",{class:"k-listbox-actions"},[this.$props.tools&&this.$props.tools.map(function(o,n){let r=f.findIndex(e=>e.name===o),a=f[r],i=this.isItemDisabled(a.name),l=`listbox.${a.name}`;const c=e.toLanguageString(l,g[l]);return t.createVNode(s.Button,{key:n,disabled:i,"data-command":a.name,title:c,"aria-label":c,icon:this.currentRtl?this.getRtlFontIcon(a.iconName):a.iconName,svgIcon:this.currentRtl?this.getRtlSvgIcon(a.svgIcon):a.svgIcon,onClick:e=>{e.preventDefault(),this.handleToolClick(e,a.name||null)}},null)},this)])},methods:{getRtlSvgIcon(e){switch(e.name){case"chevron-right":return r.chevronLeftIcon;case"chevron-left":return r.chevronRightIcon;case"chevron-double-right":return r.chevronDoubleLeftIcon;case"chevron-double-left":return r.chevronDoubleRightIcon}return e},getRtlFontIcon(e){switch(e){case"chevron-right":return"chevron-left";case"chevron-left":return"chevron-right";case"chevron-double-right":return"chevron-double-left";case"chevron-double-left":return"chevron-double-right"}return e},handleToolClick(e,t){this.$emit("toolclick",{event:e,component:this,toolName:t})},isItemDisabled(e){let t=!0,o=this.$props.selectedField||"selected",s=this.$props.dataItems.length,n=this.$props.dataConnected.length,r=this.$props.dataItems.findIndex(e=>!0===e[o])>=0,a=this.$props.dataConnected.findIndex(e=>!0===e[o])>=0;switch(e){case"moveUp":t=r?!(this.$props.dataItems.length>0)||this.$props.dataItems[0].selected:!a||(!(this.$props.dataConnected.length>0)||this.$props.dataConnected[0].selected);break;case"moveDown":t=r?!this.$props.dataItems[s-1]||this.$props.dataItems[s-1].selectedField:!a||(!(this.$props.dataConnected.length>0)||this.$props.dataConnected[n-1].selected);break;case"transferTo":t=!(this.$props.dataConnected&&r);break;case"transferFrom":t=!this.$props.dataConnected||!(this.$props.dataConnected&&a);break;case"transferAllTo":t=!(this.$props.dataConnected&&this.$props.dataItems.length>0);break;case"transferAllFrom":t=!(this.$props.dataConnected&&this.$props.dataConnected.length>0);break;case"remove":t=!(r||a)}return t}}}),x=(e,t,o)=>{let s=o.splice(e,1)[0];return o.splice(t,0,s),o};e.ListBox=l,e.ListBoxToolbar=b,e.moveItem=x,e.processListBoxData=(e=[],t=[],o,s)=>{let n=[],r=[],a=[],i={listBoxOneData:e,listBoxTwoData:t};switch(o){case"moveUp":n=[...e],n.forEach((e,t)=>{e[s]&&(n=x(t,t-1,n))}),a=[...t],a.forEach((e,t)=>{e[s]&&(a=x(t,t-1,a))}),i.listBoxOneData=n,i.listBoxTwoData=a;break;case"moveDown":n=e.reverse(),n.forEach((e,t)=>{e[s]&&(n=x(t,t-1,n))}),a=t.reverse(),a.forEach((e,t)=>{e[s]&&(a=x(t,t-1,a))}),i.listBoxOneData=[...n].reverse(),i.listBoxTwoData=[...a].reverse();break;case"transferTo":n=e.filter(e=>!e[s]),r=e.filter(e=>e[s]),a=t.concat(r),i.listBoxOneData=n,i.listBoxTwoData=a;break;case"transferFrom":a=t.filter(e=>!e[s]),r=t.filter(e=>e[s]),n=e.concat(r),i.listBoxOneData=n,i.listBoxTwoData=a;break;case"transferAllTo":i.listBoxOneData=[],i.listBoxTwoData=t.concat(e);break;case"transferAllFrom":i.listBoxOneData=t.concat(e),i.listBoxTwoData=[];break;case"remove":a=t.filter(e=>!e[s]),n=e.filter(e=>!e[s]),i.listBoxOneData=n,i.listBoxTwoData=a}return i},e.processListBoxDragAndDrop=(e=[],t=[],o,s,n)=>{let r=e.findIndex(e=>e[n]===o[n]),a=t.findIndex(e=>e[n]===o[n]),i=null!==s?e.findIndex(e=>e[n]===s[n]):-1,l=null!==s?t.findIndex(e=>e[n]===s[n]):-1,c=r>=0,d=a>=0,p=i>=0,h=l>=0,u=[...e],m=[...t];return c&&p?{listBoxOneData:x(r,i,e),listBoxTwoData:t}:d&&h?{listBoxOneData:e,listBoxTwoData:x(a,l,t)}:c&&(h||null===s)?(null===s?m.push(e[r]):m.splice(l+1,0,e[r]),u.splice(r,1),{listBoxOneData:u,listBoxTwoData:m}):d&&(p||null===s)?(null===s?u.push(t[a]):u.splice(i+1,0,t[a]),m.splice(a,1),{listBoxOneData:u,listBoxTwoData:m}):{listBoxOneData:e,listBoxTwoData:t}}});
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-listbox",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1778759676,version:"8.4.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-listbox",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1779123410,version:"8.4.0-develop.4",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
@@ -10,8 +10,8 @@ const e = {
10
10
  productName: "Kendo UI for Vue",
11
11
  productCode: "KENDOUIVUE",
12
12
  productCodes: ["KENDOUIVUE"],
13
- publishDate: 1778759676,
14
- version: "8.4.0-develop.2",
13
+ publishDate: 1779123410,
14
+ version: "8.4.0-develop.4",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
16
16
  };
17
17
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-listbox",
3
- "version": "8.4.0-develop.2",
3
+ "version": "8.4.0-develop.4",
4
4
  "description": "TODO",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -25,10 +25,10 @@
25
25
  "sideEffects": false,
26
26
  "peerDependencies": {
27
27
  "@progress/kendo-licensing": "^1.7.2",
28
- "@progress/kendo-vue-buttons": "8.4.0-develop.2",
29
- "@progress/kendo-vue-common": "8.4.0-develop.2",
30
- "@progress/kendo-vue-intl": "8.4.0-develop.2",
31
- "@progress/kendo-svg-icons": "^4.4.0",
28
+ "@progress/kendo-vue-buttons": "8.4.0-develop.4",
29
+ "@progress/kendo-vue-common": "8.4.0-develop.4",
30
+ "@progress/kendo-vue-intl": "8.4.0-develop.4",
31
+ "@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
32
32
  "vue": "^3.0.2"
33
33
  },
34
34
  "dependencies": {},
@@ -48,7 +48,7 @@
48
48
  "package": {
49
49
  "productName": "Kendo UI for Vue",
50
50
  "productCode": "KENDOUIVUE",
51
- "publishDate": 1778759676,
51
+ "publishDate": 1779123410,
52
52
  "licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
53
53
  }
54
54
  },
@@ -58,5 +58,10 @@
58
58
  "repository": {
59
59
  "type": "git",
60
60
  "url": "git+https://github.com/telerik/kendo-vue.git"
61
+ },
62
+ "peerDependenciesMeta": {
63
+ "@progress/kendo-svg-icons": {
64
+ "optional": true
65
+ }
61
66
  }
62
67
  }