@progress/kendo-vue-dropdowns 9.3.0-develop.2 → 9.3.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/AutoComplete/AutoComplete.js +1 -1
- package/AutoComplete/AutoComplete.mjs +1 -1
- package/ComboBox/ComboBox.js +1 -1
- package/ComboBox/ComboBox.mjs +2 -1
- package/DropDownList/DropDownList.js +1 -1
- package/DropDownList/DropDownList.mjs +73 -73
- package/DropDownTree/DropDownTree.js +1 -1
- package/DropDownTree/DropDownTree.mjs +2 -2
- 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 +57 -40
- package/MultiSelectTree/MultiSelectTree.js +1 -1
- package/MultiSelectTree/MultiSelectTree.mjs +2 -2
- 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/SearchBar.js +1 -1
- package/common/SearchBar.mjs +1 -1
- 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/List.mjs
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
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 { ListItem as
|
|
10
|
-
import { ListGroupItem as
|
|
11
|
-
import { areSame as
|
|
12
|
-
import { getDefaultSlots as
|
|
13
|
-
import { provideLocalizationService as
|
|
14
|
-
import { nodata as
|
|
15
|
-
const
|
|
8
|
+
import { defineComponent as V, createVNode as d, ref as T, inject as q, h as J } from "vue";
|
|
9
|
+
import { ListItem as K } from "./ListItem.mjs";
|
|
10
|
+
import { ListGroupItem as M } from "./ListGroupItem.mjs";
|
|
11
|
+
import { areSame as C } from "./utils.mjs";
|
|
12
|
+
import { getDefaultSlots as P, getRef as Q, setRef as G, getTemplate as U } from "@progress/kendo-vue-common";
|
|
13
|
+
import { provideLocalizationService as W } from "@progress/kendo-vue-intl";
|
|
14
|
+
import { nodata as b, messages as X } from "../messages/main.mjs";
|
|
15
|
+
const ce = /* @__PURE__ */ V({
|
|
16
16
|
name: "list",
|
|
17
17
|
emits: {
|
|
18
18
|
listclick: (l) => !0,
|
|
@@ -45,7 +45,8 @@ const de = /* @__PURE__ */ H({
|
|
|
45
45
|
descriptionField: String,
|
|
46
46
|
iconField: String,
|
|
47
47
|
svgIconField: String,
|
|
48
|
-
checkboxField: String
|
|
48
|
+
checkboxField: String,
|
|
49
|
+
showSelectionCheckbox: Boolean
|
|
49
50
|
},
|
|
50
51
|
inject: {
|
|
51
52
|
kendoLocalizationService: {
|
|
@@ -53,14 +54,14 @@ const de = /* @__PURE__ */ H({
|
|
|
53
54
|
}
|
|
54
55
|
},
|
|
55
56
|
setup() {
|
|
56
|
-
const l =
|
|
57
|
+
const l = T(null), a = q("kendoLocalizationService", {});
|
|
57
58
|
return {
|
|
58
59
|
listRef: l,
|
|
59
60
|
kendoLocalizationService: a
|
|
60
61
|
};
|
|
61
62
|
},
|
|
62
63
|
mounted() {
|
|
63
|
-
this.list =
|
|
64
|
+
this.list = Q(this, "list");
|
|
64
65
|
},
|
|
65
66
|
methods: {
|
|
66
67
|
handleClick(l, a) {
|
|
@@ -71,63 +72,64 @@ const de = /* @__PURE__ */ H({
|
|
|
71
72
|
}
|
|
72
73
|
},
|
|
73
74
|
render() {
|
|
74
|
-
const l =
|
|
75
|
+
const l = P(this), a = W(this), {
|
|
75
76
|
id: g,
|
|
76
77
|
show: S,
|
|
77
|
-
wrapperCssClass:
|
|
78
|
-
wrapperStyle:
|
|
78
|
+
wrapperCssClass: j,
|
|
79
|
+
wrapperStyle: w,
|
|
79
80
|
listStyle: m,
|
|
80
|
-
listRef:
|
|
81
|
-
} = this.$props,
|
|
82
|
-
const t = this.$props.noDataRender,
|
|
81
|
+
listRef: Y
|
|
82
|
+
} = this.$props, N = function() {
|
|
83
|
+
const t = this.$props.noDataRender, n = d("div", {
|
|
83
84
|
class: "k-nodata",
|
|
84
85
|
"aria-live": "polite"
|
|
85
|
-
}, [d("div", null, [a.toLanguageString(
|
|
86
|
-
return
|
|
87
|
-
h:
|
|
86
|
+
}, [d("div", null, [a.toLanguageString(b, X[b])])]);
|
|
87
|
+
return U.call(this, {
|
|
88
|
+
h: J,
|
|
88
89
|
template: t,
|
|
89
|
-
defaultRendering:
|
|
90
|
+
defaultRendering: n
|
|
90
91
|
});
|
|
91
92
|
}, F = function() {
|
|
92
93
|
const {
|
|
93
94
|
textField: t,
|
|
94
|
-
valueField:
|
|
95
|
+
valueField: n,
|
|
95
96
|
optionsGuid: e,
|
|
96
97
|
skip: p = 0,
|
|
97
98
|
focusedIndex: c,
|
|
98
|
-
highlightSelected:
|
|
99
|
+
highlightSelected: i,
|
|
99
100
|
value: s,
|
|
100
|
-
groupField:
|
|
101
|
+
groupField: o,
|
|
101
102
|
itemRender: k,
|
|
102
103
|
groupHeaderItemRender: u,
|
|
103
104
|
dataItems: h,
|
|
104
105
|
actionsField: A,
|
|
105
106
|
descriptionField: z,
|
|
106
107
|
iconField: v,
|
|
107
|
-
svgIconField:
|
|
108
|
-
checkboxField:
|
|
109
|
-
|
|
108
|
+
svgIconField: x,
|
|
109
|
+
checkboxField: B,
|
|
110
|
+
showSelectionCheckbox: D
|
|
111
|
+
} = this.$props, I = Array.isArray(s);
|
|
110
112
|
let $ = 0;
|
|
111
|
-
return h.map(function(
|
|
113
|
+
return h.map(function(r, L) {
|
|
112
114
|
const R = p + L;
|
|
113
|
-
if (
|
|
114
|
-
return d(
|
|
115
|
+
if (o && (r == null ? void 0 : r[o]) !== void 0 && (t ? r[t] === void 0 : Object.keys(r).length === 1))
|
|
116
|
+
return d(M, {
|
|
115
117
|
id: `option-${e}-${R}`,
|
|
116
118
|
key: L + "-group-item",
|
|
117
|
-
group: o
|
|
119
|
+
group: r[o],
|
|
118
120
|
render: u,
|
|
119
121
|
iconField: v,
|
|
120
|
-
svgIconField:
|
|
121
|
-
groupItem:
|
|
122
|
+
svgIconField: x,
|
|
123
|
+
groupItem: r
|
|
122
124
|
}, null);
|
|
123
125
|
const f = p + $;
|
|
124
126
|
$ += 1;
|
|
125
|
-
const
|
|
126
|
-
return d(
|
|
127
|
+
const _ = i && (!I && C(r, s, n) || I && s.findIndex((H) => C(H, r, n)) !== -1), E = c === f;
|
|
128
|
+
return d(K, {
|
|
127
129
|
id: `option-${e}-${R}`,
|
|
128
|
-
dataItem:
|
|
129
|
-
selected:
|
|
130
|
-
focused:
|
|
130
|
+
dataItem: r,
|
|
131
|
+
selected: _,
|
|
132
|
+
focused: E,
|
|
131
133
|
index: f,
|
|
132
134
|
key: `item-${f}`,
|
|
133
135
|
onItemClick: this.handleClick,
|
|
@@ -136,52 +138,53 @@ const de = /* @__PURE__ */ H({
|
|
|
136
138
|
actionsField: A,
|
|
137
139
|
descriptionField: z,
|
|
138
140
|
iconField: v,
|
|
139
|
-
svgIconField:
|
|
140
|
-
checkboxField:
|
|
141
|
+
svgIconField: x,
|
|
142
|
+
checkboxField: B,
|
|
143
|
+
showSelectionCheckbox: D
|
|
141
144
|
}, null);
|
|
142
145
|
}, this);
|
|
143
|
-
}.call(this), y = F.filter((t) => t),
|
|
146
|
+
}.call(this), y = F.filter((t) => t), O = function() {
|
|
144
147
|
if (!this.$props.groupField)
|
|
145
148
|
return d("ul", {
|
|
146
149
|
id: g,
|
|
147
150
|
role: "listbox",
|
|
148
151
|
"aria-hidden": S ? void 0 : !0,
|
|
149
152
|
class: "k-list-ul",
|
|
150
|
-
ref:
|
|
153
|
+
ref: G(this, "list"),
|
|
151
154
|
style: m
|
|
152
155
|
}, [y]);
|
|
153
156
|
const t = [];
|
|
154
|
-
let
|
|
157
|
+
let n = [];
|
|
155
158
|
return y.forEach((e) => {
|
|
156
|
-
var
|
|
157
|
-
(((
|
|
158
|
-
}),
|
|
159
|
+
var i, s;
|
|
160
|
+
(((i = e == null ? void 0 : e.type) == null ? void 0 : i.name) || ((s = e == null ? void 0 : e.type) == null ? void 0 : s.__name) || "") === "ListGroupItem" ? (n.length > 0 && t.push(n), n = [e]) : e && n.push(e);
|
|
161
|
+
}), n.length > 0 && t.push(n), t.map((e, p) => {
|
|
159
162
|
var s;
|
|
160
|
-
const c = e.find((
|
|
163
|
+
const c = e.find((o) => {
|
|
161
164
|
var u, h;
|
|
162
|
-
return (((u =
|
|
163
|
-
}),
|
|
165
|
+
return (((u = o == null ? void 0 : o.type) == null ? void 0 : u.name) || ((h = o == null ? void 0 : o.type) == null ? void 0 : h.__name) || "") === "ListGroupItem";
|
|
166
|
+
}), i = (s = c == null ? void 0 : c.props) == null ? void 0 : s.id;
|
|
164
167
|
return d("ul", {
|
|
165
|
-
id:
|
|
166
|
-
key:
|
|
167
|
-
role:
|
|
168
|
-
"aria-labelledby":
|
|
168
|
+
id: i ? void 0 : g,
|
|
169
|
+
key: i || `group-${p}`,
|
|
170
|
+
role: i ? "group" : void 0,
|
|
171
|
+
"aria-labelledby": i,
|
|
169
172
|
class: "k-list-ul",
|
|
170
|
-
ref:
|
|
173
|
+
ref: i ? void 0 : G(this, "list"),
|
|
171
174
|
style: m
|
|
172
175
|
}, [e]);
|
|
173
176
|
});
|
|
174
177
|
};
|
|
175
178
|
return F.length ? d("div", {
|
|
176
|
-
class:
|
|
177
|
-
style:
|
|
179
|
+
class: j,
|
|
180
|
+
style: w,
|
|
178
181
|
role: this.$props.groupField ? "listbox" : void 0,
|
|
179
182
|
"aria-hidden": this.$props.groupField && !S ? !0 : void 0,
|
|
180
183
|
unselectable: "on",
|
|
181
184
|
onScroll: this.handleScroll
|
|
182
|
-
}, [
|
|
185
|
+
}, [O.call(this), l]) : N.call(this);
|
|
183
186
|
}
|
|
184
187
|
});
|
|
185
188
|
export {
|
|
186
|
-
|
|
189
|
+
ce as List
|
|
187
190
|
};
|
package/common/ListItem.d.ts
CHANGED
|
@@ -79,6 +79,11 @@ export interface ListItemProps {
|
|
|
79
79
|
* The field name in the dataItem that contains the checkbox state.
|
|
80
80
|
*/
|
|
81
81
|
checkboxField?: string;
|
|
82
|
+
/**
|
|
83
|
+
* @hidden
|
|
84
|
+
* When true, renders a checkbox whose checked state reflects the item's selected state.
|
|
85
|
+
*/
|
|
86
|
+
showSelectionCheckbox?: boolean;
|
|
82
87
|
}
|
|
83
88
|
/**
|
|
84
89
|
* @hidden
|
|
@@ -100,6 +105,7 @@ declare const ListItem: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
100
105
|
iconField: PropType<string>;
|
|
101
106
|
svgIconField: PropType<string>;
|
|
102
107
|
checkboxField: PropType<string>;
|
|
108
|
+
showSelectionCheckbox: PropType<boolean>;
|
|
103
109
|
}>, {}, {}, {
|
|
104
110
|
itemClass(): {
|
|
105
111
|
'k-list-item': boolean;
|
|
@@ -125,5 +131,6 @@ declare const ListItem: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
125
131
|
iconField: PropType<string>;
|
|
126
132
|
svgIconField: PropType<string>;
|
|
127
133
|
checkboxField: PropType<string>;
|
|
134
|
+
showSelectionCheckbox: PropType<boolean>;
|
|
128
135
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
129
136
|
export { ListItem };
|
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
|
package/common/SearchBar.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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),s=require("@progress/kendo-vue-common"),d=n.defineComponent({name:"search-bar",emits:{change:e=>!0,keydown:e=>!0,focus:e=>!0,blur:e=>!0},props:{value:String,id:String,placeholder:String,tabIndex:Number,size:{type:Number,default:void 0},suggestedText:String,focused:Boolean,disabled:Boolean,readOnly:Boolean,expanded:Boolean,owns:String,name:String,activedescendant:String,ariaDescribedBy:String,clearButton:Boolean,accessKey:String,ariaLabelledBy:String,ariaLabel:{type:String,default:void 0},onClearbuttonclick:Function,inputAttributes:Object},data(){return{prevValue:void 0,prevSuggestedText:void 0}},watch:{suggestedText:function(e,t){this.prevSuggestedText=t},value:function(e,t){this.prevValue=t}},updated(){const{value:e,suggestedText:t,focused:r}=this.$props;this.input||(this.input=this.$refs.input);const i=this.input,a=this.$data.prevValue!==e||t!==this.prevSuggestedText,o=a&&this.$data.prevValue&&this.$data.prevValue.startsWith(e)&&!(this.$data.prevSuggestedText&&t&&this.$data.prevSuggestedText.endsWith(t));r&&i&&s.canUseDOM&&document.activeElement!==i&&i.focus(),t&&a&&!o&&i&&i.setSelectionRange(e.length-t.length,e.length)},setup(){return{inputRef:n.ref(null)}},mounted(){this.input=s.getRef(this,"input")},methods:{onChange(e){this.$emit("change",e)},onBlur(e){this.$emit("blur",e)},onFocus(e){this.$emit("focus",e)},onKeyDown(e){this.$emit("keydown",e)},clearButtonClick(e){this.$emit("clearbuttonclick",e)}},render(){var e;return n.createVNode("input",n.mergeProps({autocomplete:"off",id:this.$props.id,type:"text",key:"searchbar",placeholder:this.$props.placeholder,class:"k-input-inner",tabindex:(e=this.$props.tabIndex)!=null?e:0,accesskey:this.$props.accessKey,role:"combobox",name:this.$props.name,value:this.$props.value,size:this.$props.size?this.$props.size:20,onInput:this.onChange,ref:s.setRef(this,"input"),onKeydown:this.onKeyDown,onFocusin:this.onFocus,onBlur:this.onBlur,"aria-disabled":this.$props.disabled||void 0,disabled:this.$props.disabled||void 0,readonly:this.$props.readOnly||void 0,"aria-autocomplete":this.$props.suggestedText?"both":"list","aria-haspopup":"listbox","aria-expanded":this.$props.expanded||!1,"aria-controls":this.$props.expanded?this.$props.owns:void 0,"aria-activedescendant":this.$props.expanded?this.$props.activedescendant:void 0,"aria-describedby":this.$props.ariaDescribedBy,"aria-labelledby":this.$props.ariaLabelledBy,"aria-label":this.$props.ariaLabel},this.$props.inputAttributes),null)}});exports.SearchBar=d;
|
package/common/SearchBar.mjs
CHANGED
|
@@ -118,7 +118,7 @@ const b = /* @__PURE__ */ r({
|
|
|
118
118
|
"aria-autocomplete": this.$props.suggestedText ? "both" : "list",
|
|
119
119
|
"aria-haspopup": "listbox",
|
|
120
120
|
"aria-expanded": this.$props.expanded || !1,
|
|
121
|
-
"aria-controls": this.$props.owns,
|
|
121
|
+
"aria-controls": this.$props.expanded ? this.$props.owns : void 0,
|
|
122
122
|
"aria-activedescendant": this.$props.expanded ? this.$props.activedescendant : void 0,
|
|
123
123
|
"aria-describedby": this.$props.ariaDescribedBy,
|
|
124
124
|
"aria-labelledby": this.$props.ariaLabelledBy,
|
|
@@ -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;
|