@progress/kendo-vue-dropdowns 9.3.0-develop.2 → 9.3.0-develop.3
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/MultiSelect/MultiSelect.d.ts +27 -1
- package/MultiSelect/MultiSelect.js +1 -1
- package/MultiSelect/MultiSelect.mjs +447 -281
- package/MultiSelect/MultiSelectProps.d.ts +53 -0
- package/MultiSelect/TagList.d.ts +15 -1
- package/MultiSelect/TagList.js +1 -1
- package/MultiSelect/TagList.mjs +55 -40
- package/common/DropDownBase.js +1 -1
- package/common/DropDownBase.mjs +13 -13
- package/common/List.d.ts +3 -0
- package/common/List.js +1 -1
- package/common/List.mjs +61 -58
- package/common/ListItem.d.ts +7 -0
- package/common/ListItem.js +1 -1
- package/common/ListItem.mjs +36 -29
- package/common/VirtualScroll.d.ts +1 -1
- package/dist/cdn/js/kendo-vue-dropdowns.js +1 -1
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/messages/main.d.ts +15 -0
- package/messages/main.js +1 -1
- package/messages/main.mjs +19 -13
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
package/common/ListItem.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 t=require("vue"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),h=require("@progress/kendo-vue-common"),i=require("./utils.js"),p=require("@progress/kendo-vue-inputs"),x=require("./ListItemIcon.js"),V=t.defineComponent({name:"KendoListItem",inheritAttrs:!1,props:{id:String,index:Number,dataItem:[Object,String,Number],textField:String,focused:Boolean,selected:Boolean,disabled:Boolean,group:String,virtual:Boolean,render:Object,onItemClick:Function,actionsField:String,descriptionField:String,iconField:String,svgIconField:String,checkboxField:String,showSelectionCheckbox:Boolean},computed:{itemClass(){return{"k-list-item":!0,"k-selected":this.$props.selected,"k-focus":this.$props.focused}}},methods:{handleClick(n){this.$emit("itemClick",this.$props.index,n)}},render(){var u;const{selected:n,disabled:l,virtual:m,actionsField:c,descriptionField:d,iconField:o,svgIconField:r,checkboxField:a,showSelectionCheckbox:k,dataItem:e,textField:g}=this.$props,b=()=>{if(k)return t.createVNode(p.Checkbox,{checked:n,tabIndex:-1},null);if(!a)return null;const s=i.getItemValue(e,a)||!1;return t.createVNode("span",{class:"k-checkbox-wrap"},[t.createVNode(p.Checkbox,{checked:s,onChange:S=>{e.onCheckboxChange&&e.onCheckboxChange(e,S.value)}},null)])},C=()=>c?i.getItemValue(e,c):null,I=()=>{if(!d)return null;const s=i.getItemValue(e,d);return s?t.createVNode("span",{class:"k-list-item-description"},[s]):null},f=t.createVNode("li",{id:this.$props.id,role:"option","aria-selected":n,"aria-disabled":l?!0:void 0,class:h.classNames("k-list-item",{"k-selected":n,"k-focus":this.$props.focused,"k-disabled":l,[this.$attrs.class]:this.$attrs.class}),onClick:this.handleClick,style:m?{position:"relative"}:this.$attrs.style||{position:"unset"}},[b(),(r||o)&&t.createVNode(x.ListItemIcon,{icon:o?i.getItemValue(e,o):void 0,svgIcon:r?i.getItemValue(e,r):void 0},null),t.createVNode("span",{class:"k-list-item-text"},[((u=i.getItemValue(e,g))==null?void 0:u.toString())||""]),C(),I()]);return h.getTemplate.call(this,{h:t.h,template:this.$props.render,defaultRendering:f,additionalProps:{...this.$props,itemClass:this.itemClass},additionalListeners:{click:this.handleClick}})}});exports.ListItem=V;
|
package/common/ListItem.mjs
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as
|
|
9
|
-
import { classNames as
|
|
8
|
+
import { defineComponent as S, createVNode as t, h as F } from "vue";
|
|
9
|
+
import { classNames as I, getTemplate as $ } from "@progress/kendo-vue-common";
|
|
10
10
|
import { getItemValue as i } from "./utils.mjs";
|
|
11
|
-
import { Checkbox as
|
|
12
|
-
import { ListItemIcon as
|
|
13
|
-
const y = /* @__PURE__ */
|
|
11
|
+
import { Checkbox as h } from "@progress/kendo-vue-inputs";
|
|
12
|
+
import { ListItemIcon as v } from "./ListItemIcon.mjs";
|
|
13
|
+
const y = /* @__PURE__ */ S({
|
|
14
14
|
name: "KendoListItem",
|
|
15
15
|
inheritAttrs: !1,
|
|
16
16
|
props: {
|
|
@@ -29,7 +29,8 @@ const y = /* @__PURE__ */ b({
|
|
|
29
29
|
descriptionField: String,
|
|
30
30
|
iconField: String,
|
|
31
31
|
svgIconField: String,
|
|
32
|
-
checkboxField: String
|
|
32
|
+
checkboxField: String,
|
|
33
|
+
showSelectionCheckbox: Boolean
|
|
33
34
|
},
|
|
34
35
|
computed: {
|
|
35
36
|
itemClass() {
|
|
@@ -41,14 +42,14 @@ const y = /* @__PURE__ */ b({
|
|
|
41
42
|
}
|
|
42
43
|
},
|
|
43
44
|
methods: {
|
|
44
|
-
handleClick(
|
|
45
|
-
this.$emit("itemClick", this.$props.index,
|
|
45
|
+
handleClick(n) {
|
|
46
|
+
this.$emit("itemClick", this.$props.index, n);
|
|
46
47
|
}
|
|
47
48
|
},
|
|
48
49
|
render() {
|
|
49
50
|
var p;
|
|
50
51
|
const {
|
|
51
|
-
selected:
|
|
52
|
+
selected: n,
|
|
52
53
|
disabled: l,
|
|
53
54
|
virtual: u,
|
|
54
55
|
actionsField: c,
|
|
@@ -56,34 +57,40 @@ const y = /* @__PURE__ */ b({
|
|
|
56
57
|
iconField: o,
|
|
57
58
|
svgIconField: r,
|
|
58
59
|
checkboxField: a,
|
|
60
|
+
showSelectionCheckbox: m,
|
|
59
61
|
dataItem: e,
|
|
60
|
-
textField:
|
|
61
|
-
} = this.$props,
|
|
62
|
+
textField: k
|
|
63
|
+
} = this.$props, f = () => {
|
|
64
|
+
if (m)
|
|
65
|
+
return t(h, {
|
|
66
|
+
checked: n,
|
|
67
|
+
tabIndex: -1
|
|
68
|
+
}, null);
|
|
62
69
|
if (!a)
|
|
63
70
|
return null;
|
|
64
|
-
const
|
|
71
|
+
const s = i(e, a) || !1;
|
|
65
72
|
return t("span", {
|
|
66
73
|
class: "k-checkbox-wrap"
|
|
67
|
-
}, [t(
|
|
68
|
-
checked:
|
|
69
|
-
onChange: (
|
|
70
|
-
e.onCheckboxChange && e.onCheckboxChange(e,
|
|
74
|
+
}, [t(h, {
|
|
75
|
+
checked: s,
|
|
76
|
+
onChange: (x) => {
|
|
77
|
+
e.onCheckboxChange && e.onCheckboxChange(e, x.value);
|
|
71
78
|
}
|
|
72
79
|
}, null)]);
|
|
73
|
-
},
|
|
80
|
+
}, g = () => c ? i(e, c) : null, C = () => {
|
|
74
81
|
if (!d)
|
|
75
82
|
return null;
|
|
76
|
-
const
|
|
77
|
-
return
|
|
83
|
+
const s = i(e, d);
|
|
84
|
+
return s ? t("span", {
|
|
78
85
|
class: "k-list-item-description"
|
|
79
|
-
}, [
|
|
80
|
-
},
|
|
86
|
+
}, [s]) : null;
|
|
87
|
+
}, b = t("li", {
|
|
81
88
|
id: this.$props.id,
|
|
82
89
|
role: "option",
|
|
83
|
-
"aria-selected":
|
|
90
|
+
"aria-selected": n,
|
|
84
91
|
"aria-disabled": l ? !0 : void 0,
|
|
85
|
-
class:
|
|
86
|
-
"k-selected":
|
|
92
|
+
class: I("k-list-item", {
|
|
93
|
+
"k-selected": n,
|
|
87
94
|
"k-focus": this.$props.focused,
|
|
88
95
|
"k-disabled": l,
|
|
89
96
|
[this.$attrs.class]: this.$attrs.class
|
|
@@ -94,16 +101,16 @@ const y = /* @__PURE__ */ b({
|
|
|
94
101
|
} : this.$attrs.style || {
|
|
95
102
|
position: "unset"
|
|
96
103
|
}
|
|
97
|
-
}, [
|
|
104
|
+
}, [f(), (r || o) && t(v, {
|
|
98
105
|
icon: o ? i(e, o) : void 0,
|
|
99
106
|
svgIcon: r ? i(e, r) : void 0
|
|
100
107
|
}, null), t("span", {
|
|
101
108
|
class: "k-list-item-text"
|
|
102
|
-
}, [((p = i(e,
|
|
103
|
-
return
|
|
104
|
-
h:
|
|
109
|
+
}, [((p = i(e, k)) == null ? void 0 : p.toString()) || ""]), g(), C()]);
|
|
110
|
+
return $.call(this, {
|
|
111
|
+
h: F,
|
|
105
112
|
template: this.$props.render,
|
|
106
|
-
defaultRendering:
|
|
113
|
+
defaultRendering: b,
|
|
107
114
|
additionalProps: {
|
|
108
115
|
...this.$props,
|
|
109
116
|
itemClass: this.itemClass
|
|
@@ -32,7 +32,7 @@ export default class VirtualScroll {
|
|
|
32
32
|
ScrollChange: (Event: any) => void;
|
|
33
33
|
private prevScrollPos;
|
|
34
34
|
private listTranslate;
|
|
35
|
-
|
|
35
|
+
scrollSyncing: boolean;
|
|
36
36
|
constructor();
|
|
37
37
|
get translate(): number;
|
|
38
38
|
scrollerRef: (element: HTMLDivElement | null) => void;
|