@progress/kendo-vue-dropdowns 5.3.0-dev.202410141143 → 5.3.0-develop.1
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 +8 -0
- package/AutoComplete/AutoComplete.mjs +526 -0
- package/ComboBox/ComboBox.js +8 -0
- package/ComboBox/ComboBox.mjs +776 -0
- package/DropDownList/DropDownList.js +8 -0
- package/DropDownList/DropDownList.mjs +781 -0
- package/DropDownTree/DropDownTree.js +8 -0
- package/DropDownTree/DropDownTree.mjs +709 -0
- package/DropDownTree/ListNoData.js +8 -0
- package/DropDownTree/ListNoData.mjs +21 -0
- package/MultiSelect/MultiSelect.js +8 -0
- package/MultiSelect/MultiSelect.mjs +872 -0
- package/MultiSelect/TagList.js +8 -0
- package/MultiSelect/TagList.mjs +119 -0
- package/MultiSelectTree/MultiSelectTree.js +8 -0
- package/MultiSelectTree/MultiSelectTree.mjs +759 -0
- package/MultiSelectTree/utils.js +8 -0
- package/MultiSelectTree/utils.mjs +73 -0
- package/README.md +28 -43
- package/common/ClearButton.js +8 -0
- package/common/ClearButton.mjs +54 -0
- package/common/DropDownBase.js +8 -0
- package/common/DropDownBase.mjs +193 -0
- package/common/GroupStickyHeader.js +8 -0
- package/common/GroupStickyHeader.mjs +38 -0
- package/common/List.js +8 -0
- package/common/List.mjs +139 -0
- package/common/ListContainer.js +8 -0
- package/common/ListContainer.mjs +103 -0
- package/common/ListDefaultItem.js +8 -0
- package/common/ListDefaultItem.mjs +47 -0
- package/common/ListFilter.js +8 -0
- package/common/ListFilter.mjs +147 -0
- package/common/ListGroupItem.js +8 -0
- package/common/ListGroupItem.mjs +46 -0
- package/common/ListItem.js +8 -0
- package/common/ListItem.mjs +73 -0
- package/common/Navigation.js +8 -0
- package/common/Navigation.mjs +28 -0
- package/common/SearchBar.js +8 -0
- package/common/SearchBar.mjs +129 -0
- package/common/VirtualScroll.js +8 -0
- package/common/VirtualScroll.mjs +95 -0
- package/common/constants.js +8 -0
- package/common/constants.mjs +12 -0
- package/common/settings.js +8 -0
- package/common/settings.mjs +11 -0
- package/common/utils.js +8 -0
- package/common/utils.mjs +104 -0
- package/dist/cdn/js/kendo-vue-dropdowns.js +8 -1
- package/index.d.mts +4037 -0
- package/index.d.ts +4037 -0
- package/index.js +8 -0
- package/index.mjs +25 -0
- package/messages/main.js +8 -0
- package/messages/main.mjs +26 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +18 -0
- package/package.json +24 -58
- package/dist/es/AutoComplete/AutoComplete.d.ts +0 -107
- package/dist/es/AutoComplete/AutoComplete.js +0 -825
- package/dist/es/AutoComplete/AutoCompleteProps.d.ts +0 -234
- package/dist/es/AutoComplete/AutoCompleteProps.js +0 -2
- package/dist/es/ComboBox/ComboBox.d.ts +0 -99
- package/dist/es/ComboBox/ComboBox.js +0 -1315
- package/dist/es/ComboBox/ComboBoxProps.d.ts +0 -277
- package/dist/es/ComboBox/ComboBoxProps.js +0 -2
- package/dist/es/DropDownList/DropDownList.d.ts +0 -103
- package/dist/es/DropDownList/DropDownList.js +0 -1314
- package/dist/es/DropDownList/DropDownListProps.d.ts +0 -307
- package/dist/es/DropDownList/DropDownListProps.js +0 -2
- package/dist/es/DropDownTree/DropDownTree.d.ts +0 -49
- package/dist/es/DropDownTree/DropDownTree.js +0 -1090
- package/dist/es/DropDownTree/DropDownTreeProps.d.ts +0 -301
- package/dist/es/DropDownTree/DropDownTreeProps.js +0 -2
- package/dist/es/DropDownTree/ListNoData.d.ts +0 -42
- package/dist/es/DropDownTree/ListNoData.js +0 -32
- package/dist/es/MultiSelect/MultiSelect.d.ts +0 -115
- package/dist/es/MultiSelect/MultiSelect.js +0 -1515
- package/dist/es/MultiSelect/MultiSelectProps.d.ts +0 -290
- package/dist/es/MultiSelect/MultiSelectProps.js +0 -2
- package/dist/es/MultiSelect/TagList.d.ts +0 -54
- package/dist/es/MultiSelect/TagList.js +0 -176
- package/dist/es/MultiSelectTree/MultiSelectTree.d.ts +0 -48
- package/dist/es/MultiSelectTree/MultiSelectTree.js +0 -1220
- package/dist/es/MultiSelectTree/MultiSelectTreeProps.d.ts +0 -322
- package/dist/es/MultiSelectTree/MultiSelectTreeProps.js +0 -2
- package/dist/es/MultiSelectTree/utils.d.ts +0 -17
- package/dist/es/MultiSelectTree/utils.js +0 -109
- package/dist/es/additionalTypes.ts +0 -21
- package/dist/es/common/ClearButton.d.ts +0 -21
- package/dist/es/common/ClearButton.js +0 -73
- package/dist/es/common/DropDownBase.d.ts +0 -95
- package/dist/es/common/DropDownBase.js +0 -298
- package/dist/es/common/GroupStickyHeader.d.ts +0 -32
- package/dist/es/common/GroupStickyHeader.js +0 -60
- package/dist/es/common/List.d.ts +0 -60
- package/dist/es/common/List.js +0 -201
- package/dist/es/common/ListContainer.d.ts +0 -40
- package/dist/es/common/ListContainer.js +0 -161
- package/dist/es/common/ListDefaultItem.d.ts +0 -29
- package/dist/es/common/ListDefaultItem.js +0 -60
- package/dist/es/common/ListFilter.d.ts +0 -49
- package/dist/es/common/ListFilter.js +0 -175
- package/dist/es/common/ListGroupItem.d.ts +0 -41
- package/dist/es/common/ListGroupItem.js +0 -71
- package/dist/es/common/ListItem.d.ts +0 -71
- package/dist/es/common/ListItem.js +0 -101
- package/dist/es/common/Navigation.d.ts +0 -12
- package/dist/es/common/Navigation.js +0 -34
- package/dist/es/common/SearchBar.d.ts +0 -66
- package/dist/es/common/SearchBar.js +0 -177
- package/dist/es/common/VirtualScroll.d.ts +0 -42
- package/dist/es/common/VirtualScroll.js +0 -163
- package/dist/es/common/constants.d.ts +0 -4
- package/dist/es/common/constants.js +0 -4
- package/dist/es/common/events.d.ts +0 -63
- package/dist/es/common/events.js +0 -1
- package/dist/es/common/filterDescriptor.d.ts +0 -41
- package/dist/es/common/filterDescriptor.js +0 -2
- package/dist/es/common/settings.d.ts +0 -107
- package/dist/es/common/settings.js +0 -8
- package/dist/es/common/utils.d.ts +0 -70
- package/dist/es/common/utils.js +0 -202
- package/dist/es/main.d.ts +0 -18
- package/dist/es/main.js +0 -10
- package/dist/es/messages/main.d.ts +0 -40
- package/dist/es/messages/main.js +0 -41
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/esm/AutoComplete/AutoComplete.d.ts +0 -107
- package/dist/esm/AutoComplete/AutoComplete.js +0 -825
- package/dist/esm/AutoComplete/AutoCompleteProps.d.ts +0 -234
- package/dist/esm/AutoComplete/AutoCompleteProps.js +0 -2
- package/dist/esm/ComboBox/ComboBox.d.ts +0 -99
- package/dist/esm/ComboBox/ComboBox.js +0 -1315
- package/dist/esm/ComboBox/ComboBoxProps.d.ts +0 -277
- package/dist/esm/ComboBox/ComboBoxProps.js +0 -2
- package/dist/esm/DropDownList/DropDownList.d.ts +0 -103
- package/dist/esm/DropDownList/DropDownList.js +0 -1314
- package/dist/esm/DropDownList/DropDownListProps.d.ts +0 -307
- package/dist/esm/DropDownList/DropDownListProps.js +0 -2
- package/dist/esm/DropDownTree/DropDownTree.d.ts +0 -49
- package/dist/esm/DropDownTree/DropDownTree.js +0 -1090
- package/dist/esm/DropDownTree/DropDownTreeProps.d.ts +0 -301
- package/dist/esm/DropDownTree/DropDownTreeProps.js +0 -2
- package/dist/esm/DropDownTree/ListNoData.d.ts +0 -42
- package/dist/esm/DropDownTree/ListNoData.js +0 -32
- package/dist/esm/MultiSelect/MultiSelect.d.ts +0 -115
- package/dist/esm/MultiSelect/MultiSelect.js +0 -1515
- package/dist/esm/MultiSelect/MultiSelectProps.d.ts +0 -290
- package/dist/esm/MultiSelect/MultiSelectProps.js +0 -2
- package/dist/esm/MultiSelect/TagList.d.ts +0 -54
- package/dist/esm/MultiSelect/TagList.js +0 -176
- package/dist/esm/MultiSelectTree/MultiSelectTree.d.ts +0 -48
- package/dist/esm/MultiSelectTree/MultiSelectTree.js +0 -1220
- package/dist/esm/MultiSelectTree/MultiSelectTreeProps.d.ts +0 -322
- package/dist/esm/MultiSelectTree/MultiSelectTreeProps.js +0 -2
- package/dist/esm/MultiSelectTree/utils.d.ts +0 -17
- package/dist/esm/MultiSelectTree/utils.js +0 -109
- package/dist/esm/additionalTypes.ts +0 -21
- package/dist/esm/common/ClearButton.d.ts +0 -21
- package/dist/esm/common/ClearButton.js +0 -73
- package/dist/esm/common/DropDownBase.d.ts +0 -95
- package/dist/esm/common/DropDownBase.js +0 -298
- package/dist/esm/common/GroupStickyHeader.d.ts +0 -32
- package/dist/esm/common/GroupStickyHeader.js +0 -60
- package/dist/esm/common/List.d.ts +0 -60
- package/dist/esm/common/List.js +0 -201
- package/dist/esm/common/ListContainer.d.ts +0 -40
- package/dist/esm/common/ListContainer.js +0 -161
- package/dist/esm/common/ListDefaultItem.d.ts +0 -29
- package/dist/esm/common/ListDefaultItem.js +0 -60
- package/dist/esm/common/ListFilter.d.ts +0 -49
- package/dist/esm/common/ListFilter.js +0 -175
- package/dist/esm/common/ListGroupItem.d.ts +0 -41
- package/dist/esm/common/ListGroupItem.js +0 -71
- package/dist/esm/common/ListItem.d.ts +0 -71
- package/dist/esm/common/ListItem.js +0 -101
- package/dist/esm/common/Navigation.d.ts +0 -12
- package/dist/esm/common/Navigation.js +0 -34
- package/dist/esm/common/SearchBar.d.ts +0 -66
- package/dist/esm/common/SearchBar.js +0 -177
- package/dist/esm/common/VirtualScroll.d.ts +0 -42
- package/dist/esm/common/VirtualScroll.js +0 -163
- package/dist/esm/common/constants.d.ts +0 -4
- package/dist/esm/common/constants.js +0 -4
- package/dist/esm/common/events.d.ts +0 -63
- package/dist/esm/common/events.js +0 -1
- package/dist/esm/common/filterDescriptor.d.ts +0 -41
- package/dist/esm/common/filterDescriptor.js +0 -2
- package/dist/esm/common/settings.d.ts +0 -107
- package/dist/esm/common/settings.js +0 -8
- package/dist/esm/common/utils.d.ts +0 -70
- package/dist/esm/common/utils.js +0 -202
- package/dist/esm/main.d.ts +0 -18
- package/dist/esm/main.js +0 -10
- package/dist/esm/messages/main.d.ts +0 -40
- package/dist/esm/messages/main.js +0 -41
- package/dist/esm/package-metadata.d.ts +0 -5
- package/dist/esm/package-metadata.js +0 -11
- package/dist/esm/package.json +0 -3
- package/dist/npm/AutoComplete/AutoComplete.d.ts +0 -107
- package/dist/npm/AutoComplete/AutoComplete.js +0 -832
- package/dist/npm/AutoComplete/AutoCompleteProps.d.ts +0 -234
- package/dist/npm/AutoComplete/AutoCompleteProps.js +0 -3
- package/dist/npm/ComboBox/ComboBox.d.ts +0 -99
- package/dist/npm/ComboBox/ComboBox.js +0 -1322
- package/dist/npm/ComboBox/ComboBoxProps.d.ts +0 -277
- package/dist/npm/ComboBox/ComboBoxProps.js +0 -3
- package/dist/npm/DropDownList/DropDownList.d.ts +0 -103
- package/dist/npm/DropDownList/DropDownList.js +0 -1321
- package/dist/npm/DropDownList/DropDownListProps.d.ts +0 -307
- package/dist/npm/DropDownList/DropDownListProps.js +0 -3
- package/dist/npm/DropDownTree/DropDownTree.d.ts +0 -49
- package/dist/npm/DropDownTree/DropDownTree.js +0 -1095
- package/dist/npm/DropDownTree/DropDownTreeProps.d.ts +0 -301
- package/dist/npm/DropDownTree/DropDownTreeProps.js +0 -3
- package/dist/npm/DropDownTree/ListNoData.d.ts +0 -42
- package/dist/npm/DropDownTree/ListNoData.js +0 -39
- package/dist/npm/MultiSelect/MultiSelect.d.ts +0 -115
- package/dist/npm/MultiSelect/MultiSelect.js +0 -1522
- package/dist/npm/MultiSelect/MultiSelectProps.d.ts +0 -290
- package/dist/npm/MultiSelect/MultiSelectProps.js +0 -3
- package/dist/npm/MultiSelect/TagList.d.ts +0 -54
- package/dist/npm/MultiSelect/TagList.js +0 -183
- package/dist/npm/MultiSelectTree/MultiSelectTree.d.ts +0 -48
- package/dist/npm/MultiSelectTree/MultiSelectTree.js +0 -1227
- package/dist/npm/MultiSelectTree/MultiSelectTreeProps.d.ts +0 -322
- package/dist/npm/MultiSelectTree/MultiSelectTreeProps.js +0 -3
- package/dist/npm/MultiSelectTree/utils.d.ts +0 -17
- package/dist/npm/MultiSelectTree/utils.js +0 -114
- package/dist/npm/additionalTypes.ts +0 -21
- package/dist/npm/common/ClearButton.d.ts +0 -21
- package/dist/npm/common/ClearButton.js +0 -80
- package/dist/npm/common/DropDownBase.d.ts +0 -95
- package/dist/npm/common/DropDownBase.js +0 -303
- package/dist/npm/common/GroupStickyHeader.d.ts +0 -32
- package/dist/npm/common/GroupStickyHeader.js +0 -67
- package/dist/npm/common/List.d.ts +0 -60
- package/dist/npm/common/List.js +0 -208
- package/dist/npm/common/ListContainer.d.ts +0 -40
- package/dist/npm/common/ListContainer.js +0 -168
- package/dist/npm/common/ListDefaultItem.d.ts +0 -29
- package/dist/npm/common/ListDefaultItem.js +0 -67
- package/dist/npm/common/ListFilter.d.ts +0 -49
- package/dist/npm/common/ListFilter.js +0 -182
- package/dist/npm/common/ListGroupItem.d.ts +0 -41
- package/dist/npm/common/ListGroupItem.js +0 -78
- package/dist/npm/common/ListItem.d.ts +0 -71
- package/dist/npm/common/ListItem.js +0 -108
- package/dist/npm/common/Navigation.d.ts +0 -12
- package/dist/npm/common/Navigation.js +0 -37
- package/dist/npm/common/SearchBar.d.ts +0 -66
- package/dist/npm/common/SearchBar.js +0 -184
- package/dist/npm/common/VirtualScroll.d.ts +0 -42
- package/dist/npm/common/VirtualScroll.js +0 -168
- package/dist/npm/common/constants.d.ts +0 -4
- package/dist/npm/common/constants.js +0 -10
- package/dist/npm/common/events.d.ts +0 -63
- package/dist/npm/common/events.js +0 -2
- package/dist/npm/common/filterDescriptor.d.ts +0 -41
- package/dist/npm/common/filterDescriptor.js +0 -3
- package/dist/npm/common/settings.d.ts +0 -107
- package/dist/npm/common/settings.js +0 -11
- package/dist/npm/common/utils.d.ts +0 -70
- package/dist/npm/common/utils.js +0 -221
- package/dist/npm/main.d.ts +0 -18
- package/dist/npm/main.js +0 -36
- package/dist/npm/messages/main.d.ts +0 -40
- package/dist/npm/messages/main.js +0 -44
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("@progress/kendo-vue-common"),r=(i,m)=>{const u={};return i&&i.length&&i.forEach(f=>{u[m(f)]=!0}),u},G=(i,m)=>{const{items:u,dataItemKey:f,value:p,subItemsField:w="items",operation:V}=m,t=S.getter(f),I=r(p,t);if(V==="clear")return[];if(V==="delete"){const n=r(u,t);return p.filter(e=>!n[t(e)])}const y=u[0],C=t(y),d=S.getter(w),a=[...i],c=[];let M=[],g;for(;a.length;){const n=a.pop();if(C===t(n)){M=c.map(e=>e.item),g=n;break}else{c&&c.length&&c[c.length-1].parentPosition===a.length&&c.pop();const e=d(n);e&&e.length&&(c.push({item:n,parentPosition:a.length}),a.push(...e))}}const b=[...d(g)||[]];let k=[];for(;b.length;){const n=b.pop();k.push(n);const e=d(n);e&&e.length&&b.push(...e)}const P=!I[C],l=[];if(P){l.push(...p),l.push(g),l.push(...k.filter(s=>!I[t(s)]));const n=M.filter(s=>!I[t(s)]),e=r(l,t);for(let s=n.length-1;s>-1;s--){const h=n[s],o=d(h);if(o.filter(T=>e[t(T)]).length<o.length)break;l.push(h),e[t(h)]=!0}}else{const n=t(g),e=r(k,t),s=r(M,t);l.push(...p.filter(h=>{const o=t(h);return!e[o]&&n!==o&&!s[o]}))}return l};exports.getMultiSelectTreeValue=G;exports.getValueMap=r;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { getter as V } from "@progress/kendo-vue-common";
|
|
9
|
+
const a = (r, f) => {
|
|
10
|
+
const i = {};
|
|
11
|
+
return r && r.length && r.forEach((g) => {
|
|
12
|
+
i[f(g)] = !0;
|
|
13
|
+
}), i;
|
|
14
|
+
}, E = (r, f) => {
|
|
15
|
+
const {
|
|
16
|
+
items: i,
|
|
17
|
+
dataItemKey: g,
|
|
18
|
+
value: u,
|
|
19
|
+
subItemsField: x = "items",
|
|
20
|
+
operation: w
|
|
21
|
+
} = f, t = V(g), I = a(u, t);
|
|
22
|
+
if (w === "clear")
|
|
23
|
+
return [];
|
|
24
|
+
if (w === "delete") {
|
|
25
|
+
const n = a(i, t);
|
|
26
|
+
return u.filter((e) => !n[t(e)]);
|
|
27
|
+
}
|
|
28
|
+
const G = i[0], C = t(G), d = V(x), h = [...r], c = [];
|
|
29
|
+
let b = [], m;
|
|
30
|
+
for (; h.length; ) {
|
|
31
|
+
const n = h.pop();
|
|
32
|
+
if (C === t(n)) {
|
|
33
|
+
b = c.map((e) => e.item), m = n;
|
|
34
|
+
break;
|
|
35
|
+
} else {
|
|
36
|
+
c && c.length && c[c.length - 1].parentPosition === h.length && c.pop();
|
|
37
|
+
const e = d(n);
|
|
38
|
+
e && e.length && (c.push({ item: n, parentPosition: h.length }), h.push(...e));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const k = [...d(m) || []];
|
|
42
|
+
let M = [];
|
|
43
|
+
for (; k.length; ) {
|
|
44
|
+
const n = k.pop();
|
|
45
|
+
M.push(n);
|
|
46
|
+
const e = d(n);
|
|
47
|
+
e && e.length && k.push(...e);
|
|
48
|
+
}
|
|
49
|
+
const L = !I[C], o = [];
|
|
50
|
+
if (L) {
|
|
51
|
+
o.push(...u), o.push(m), o.push(...M.filter((s) => !I[t(s)]));
|
|
52
|
+
const n = b.filter((s) => !I[t(s)]), e = a(o, t);
|
|
53
|
+
for (let s = n.length - 1; s > -1; s--) {
|
|
54
|
+
const p = n[s], l = d(p);
|
|
55
|
+
if (l.filter((P) => e[t(P)]).length < l.length)
|
|
56
|
+
break;
|
|
57
|
+
o.push(p), e[t(p)] = !0;
|
|
58
|
+
}
|
|
59
|
+
} else {
|
|
60
|
+
const n = t(m), e = a(M, t), s = a(b, t);
|
|
61
|
+
o.push(
|
|
62
|
+
...u.filter((p) => {
|
|
63
|
+
const l = t(p);
|
|
64
|
+
return !e[l] && n !== l && !s[l];
|
|
65
|
+
})
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
return o;
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
E as getMultiSelectTreeValue,
|
|
72
|
+
a as getValueMap
|
|
73
|
+
};
|
package/README.md
CHANGED
|
@@ -1,61 +1,46 @@
|
|
|
1
|
-
<a href="https://www.telerik.com/kendo-vue-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-
|
|
1
|
+
<a href="https://www.telerik.com/kendo-vue-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-utils&utm_content=banner" target="_blank">
|
|
2
2
|
<img src="https://www.telerik.com/kendo-vue-ui/npm-banner.svg" alt="Kendo UI for Vue NPM Banner">
|
|
3
3
|
</a>
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
## Kendo UI for Vue DropDowns for Vue (AutoComplete, ComboBox, DropDownList, and MultiSelect Components)
|
|
5
|
+
## Kendo UI for Vue Dropdowns Package for Vue
|
|
7
6
|
|
|
8
7
|
> **Important**
|
|
9
|
-
> * This package is а part of [Kendo UI for Vue](https://www.telerik.com/kendo-vue-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-dropdowns)—a commercial UI library.
|
|
10
|
-
> * You will need to install a license key when adding the package to your project. For more information, please refer to the [Kendo UI for Vue My License page](https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-dropdowns).
|
|
11
|
-
> * To receive a license key, you need to either [purchase a license](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-dropdowns) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-dropdowns). Doing so indicates that you [accept the Kendo UI for Vue License Agreement](https://www.telerik.com/purchase/license-agreement/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-dropdowns).
|
|
12
|
-
> * The 30-day free trial gives you access to all the Kendo UI for Vue components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Vue dev team!
|
|
13
8
|
>
|
|
14
|
-
>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* [AutoComplete component](https://www.telerik.com/kendo-vue-ui/components/dropdowns/autocomplete/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-dropdowns)
|
|
21
|
-
* [ComboBox component](https://www.telerik.com/kendo-vue-ui/components/dropdowns/combobox/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-dropdowns)
|
|
22
|
-
* [DropDownList component](https://www.telerik.com/kendo-vue-ui/components/dropdowns/dropdownlist/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-dropdowns)
|
|
23
|
-
* [MultiSelect component](https://www.telerik.com/kendo-vue-ui/components/dropdowns/multiselect/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-dropdowns)
|
|
9
|
+
> - This package is а part of [Kendo UI for Vue](https://www.telerik.com/kendo-vue-ui/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmdropdowns)—a commercial UI library.
|
|
10
|
+
> - You will need to install a license key when adding the package to your project. For more information, please refer to the [Kendo UI for Vue My License page](https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmdropdowns).
|
|
11
|
+
> - To receive a license key, you need to either [purchase a license](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmdropdowns) or register for a [free trial](https://www.telerik.com/download-login-v2-kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmdropdowns). Doing so indicates that you [accept the Kendo UI for Vue License Agreement](https://www.telerik.com/kendo-vue-ui-develop/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmdropdowns).
|
|
12
|
+
> - The 30-day free trial gives you access to all the Kendo UI for Vue components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the Kendo UI for Vue dev team!
|
|
13
|
+
>
|
|
14
|
+
> [Start using Kendo UI for Vue](https://www.telerik.com/download-login-v2-kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmdropdowns) and speed up your development process!
|
|
24
15
|
|
|
25
|
-
## Vue
|
|
16
|
+
## Vue Dropdowns
|
|
26
17
|
|
|
27
18
|
> Historically, all Kendo UI for Vue Native components support both **Vue 2** and **Vue 3**, however, Vue 2 is currently in its end-of-support phase till Nov 2024. After our last major release for 2024, Vue 2 will no longer be supported in the new versions of the Kendo UI for Vue components. Please check our [Vue 2 End of Support article](https://www.telerik.com/kendo-vue-ui/components/vue2-deprecation/) for more details.
|
|
28
19
|
|
|
29
|
-
Among the many features which the Kendo UI for Vue
|
|
20
|
+
Among the many features which the Kendo UI for Vue Dropdowns deliver are:
|
|
30
21
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
* **Virtualization support**—The virtualization helps when displaying large sets of data.
|
|
35
|
-
* **Custom rendering**—You can replace the value and the popup list item renders with custom ones.
|
|
36
|
-
* **Setting the default value**—Easily configure the initial value that the DropDowns render.
|
|
37
|
-
* **Form validation**—Validate the values, set validation requirements, and prevent the submission of forms which are in invalid state.
|
|
38
|
-
* **Accessibility support**—The DropDowns are compliant with WAI-ARIA, Section 508, and provide keyboard navigation.
|
|
39
|
-
* [Theme support](https://www.telerik.com/kendo-vue-ui/components/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npm-dropdowns)—The Kendo UI for Vue DropDowns, as well as all 80+ components in the Kendo UI for Vue suite, are styled in four polished themes (Bootstrap, Material, Default and Fluent) and can be further customized to match your specific design guidelines.
|
|
22
|
+
- TODO 1
|
|
23
|
+
- TODO 2
|
|
24
|
+
- TODO 3
|
|
40
25
|
|
|
41
|
-
## Support Options
|
|
26
|
+
## Support Options
|
|
42
27
|
|
|
43
|
-
For any issues you might encounter while working with the Kendo UI for Vue
|
|
28
|
+
For any issues you might encounter while working with the Kendo UI for Vue Dropdowns, use any of the available support channels:
|
|
44
29
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
30
|
+
- Industry-leading technical support—Kendo UI for Vue paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated Kendo UI for Vue support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmdropdowns).
|
|
31
|
+
- Product forums—The [Kendo UI for Vue forums](https://www.telerik.com/forums/kendo-ui-vue?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmdropdowns) are part of the free support you can get from the community and from the Kendo UI for Vue team.
|
|
32
|
+
- Feedback portal—The [Kendo UI for Vue feedback portal](https://feedback.telerik.com/kendo-vue-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmdropdowns) is where you can request and vote for new features to be added.
|
|
48
33
|
|
|
49
|
-
## Resources
|
|
34
|
+
## Resources
|
|
50
35
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
36
|
+
- [Getting Started with Kendo UI for Vue](https://www.telerik.com/kendo-vue-ui/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmdropdowns)
|
|
37
|
+
- [Getting Started with the Kendo UI for Vue Dropdowns](https://www.telerik.com/kendo-vue-ui/components/dropdowns/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmdropdowns)
|
|
38
|
+
- [API Reference of the Kendo UI for Vue Dropdowns](https://www.telerik.com/kendo-vue-ui/components/dropdowns/api/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmdropdowns)
|
|
39
|
+
- [Kendo UI for Vue Roadmap](https://www.telerik.com/kendo-vue-ui/roadmap/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmdropdowns)
|
|
40
|
+
- [Blogs](https://www.telerik.com/blogs/tag/vue?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmdropdowns)
|
|
41
|
+
- [Demos, documentation, and component reference](https://www.telerik.com/kendo-vue-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmdropdowns)
|
|
42
|
+
- [Kendo UI for Vue pricing and licensing](https://www.telerik.com/purchase/kendo-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-vue-trial-npmdropdowns)
|
|
58
43
|
|
|
59
|
-
|
|
44
|
+
_Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
|
|
60
45
|
|
|
61
|
-
|
|
46
|
+
_Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries._
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),t=require("@progress/kendo-svg-icons"),i=require("@progress/kendo-vue-intl"),o=require("../messages/main.js"),c=require("@progress/kendo-vue-common"),r=n.defineComponent({name:"clear-button",inject:{kendoLocalizationService:{default:null}},props:{onClearclick:Function},setup(){return{kendoLocalizationService:n.inject("kendoLocalizationService",{})}},methods:{onMouseDown(e){e.preventDefault()},onClickHandler(e){this.$emit("clearclick",e)}},render(){const e=i.provideLocalizationService(this).toLanguageString(o.clear,o.messages[o.clear]);return n.createVNode("span",{class:"k-clear-value",role:"button",onClick:this.onClickHandler,onMousedown:this.onMouseDown,tabindex:-1,title:e,key:"clearbutton"},[n.createVNode(c.Icon,{name:"x",icon:t.xIcon},null)])}});exports.ClearButton=r;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { defineComponent as t, inject as i, createVNode as o } from "vue";
|
|
9
|
+
import { xIcon as r } from "@progress/kendo-svg-icons";
|
|
10
|
+
import { provideLocalizationService as c } from "@progress/kendo-vue-intl";
|
|
11
|
+
import { clear as n, messages as a } from "../messages/main.mjs";
|
|
12
|
+
import { Icon as l } from "@progress/kendo-vue-common";
|
|
13
|
+
const k = /* @__PURE__ */ t({
|
|
14
|
+
name: "clear-button",
|
|
15
|
+
inject: {
|
|
16
|
+
kendoLocalizationService: {
|
|
17
|
+
default: null
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
props: {
|
|
21
|
+
onClearclick: Function
|
|
22
|
+
},
|
|
23
|
+
setup() {
|
|
24
|
+
return {
|
|
25
|
+
kendoLocalizationService: i("kendoLocalizationService", {})
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
methods: {
|
|
29
|
+
onMouseDown(e) {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
},
|
|
32
|
+
onClickHandler(e) {
|
|
33
|
+
this.$emit("clearclick", e);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
render() {
|
|
37
|
+
const e = c(this).toLanguageString(n, a[n]);
|
|
38
|
+
return o("span", {
|
|
39
|
+
class: "k-clear-value",
|
|
40
|
+
role: "button",
|
|
41
|
+
onClick: this.onClickHandler,
|
|
42
|
+
onMousedown: this.onMouseDown,
|
|
43
|
+
tabindex: -1,
|
|
44
|
+
title: e,
|
|
45
|
+
key: "clearbutton"
|
|
46
|
+
}, [o(l, {
|
|
47
|
+
name: "x",
|
|
48
|
+
icon: r
|
|
49
|
+
}, null)]);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export {
|
|
53
|
+
k as ClearButton
|
|
54
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";var u=Object.defineProperty;var d=(a,e,t)=>e in a?u(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var p=(a,e,t)=>(d(a,typeof e!="symbol"?e+"":e,t),t);const g=require("./VirtualScroll.js"),m=require("./Navigation.js"),r=require("./utils.js"),c=require("@progress/kendo-vue-common"),f=require("../package-metadata.js");class h{constructor(e){p(this,"vs",new g);p(this,"navigation",new m.Navigation);p(this,"handleItemClick",(e,t)=>{const n=this.initState();n.event=t,this.component.handleItemSelect(e,n),this.togglePopup(n),this.applyState(n)});p(this,"handleFocus",e=>{if(!this.component.currentFocused){const t=this.initState();t.data.currentFocused=!0,t.events.push({type:"focus"}),t.event=e,this.applyState(t)}});p(this,"filterChanged",(e,t)=>{const n=this.component,{textField:i,filterable:s}=n.$props;s&&(t.events.push({type:"filterchange",filter:{field:i,operator:"contains",ignoreCase:!0,value:e}}),this.repositionPopup())});p(this,"togglePopup",e=>{const t=this.component.$props,n=t.opened!==void 0?t.opened:this.component.currentOpened;t.opened===void 0&&(e.data.currentOpened=!n),n?e.events.push({type:"close"}):(e.events.push({type:"open"}),this.calculatePopupWidth())});p(this,"pageChange",(e,t)=>{const n=this.initState();n.event=t,this.triggerOnPageChange(n,e.skip,e.take),this.applyState(n)});p(this,"scrollChange",e=>{this.component.$emit("scroll",e)});p(this,"scrollToVirtualItem",(e,t)=>{const n=this.vs;if(n.enabled=!1,e.skip===0)n.reset();else if(e.skip+e.pageSize===e.total)n.scrollToEnd();else{let i=n.translate;i===0&&(n.calcScrollElementHeight(),i=n.itemHeight*e.skip,n.translateTo(i-n.itemHeight)),n.container&&(n.container.scrollTop=i),this.scrollToItem(t,!0)}setTimeout(()=>n.enabled=!0,10)});p(this,"getGroupedDataModernMode",(e,t)=>{const n=[];return e.forEach((i,s)=>{e[s-1]&&i[t]!==e[s-1][t]&&n.push({[t]:i[t]}),n.push(e[s])}),n});p(this,"resetGroupStickyHeader",(e,t)=>{const n=this.initState();e!==t.group&&t.state&&(t.state.data.group=e,this.applyState(n))});c.validatePackage(f.packageMetadata),this.listBoxId=c.guid(),this.guid=c.guid(),this.component=e,this.vs.PageChange=this.pageChange,this.vs.ScrollChange=this.scrollChange}didMount(){const e=this.component.$props,t=e.popupSettings,n=e.style,i=t&&t.width;let s=e.opened===!0;i===void 0&&this.calculatePopupWidth(),e.dir===void 0&&n&&n.direction===void 0&&(this.calculateDir(),s=!0),s&&this.component.$forceUpdate()}calculateDir(){this.component.element&&(this.dirCalculated=window.getComputedStyle(this.component.element).direction||void 0)}calculatePopupWidth(){const e=this.component.$props,t=e.popupSettings,n=t&&t.width;this.wrapper&&!n&&(this.component.popupWidth=e.popupSettings.width!==void 0?e.popupSettings.width:this.wrapper.offsetWidth+"px")}scrollToItem(e,t){const n=this.list||this.vs.list,i=n?n.children[0]:void 0;if(i&&e>=0){const s=this.vs,o=s.container||n.parentNode;if(o){const l=t!==void 0?t:s.enabled;r.scrollToItem(o,i.offsetHeight,e,s.translate,l)}}}repositionPopup(){const e=this.component;setTimeout(function(){const t=e.$refs.container;if(t){const n=t.$refs.popup;n&&n.show&&n.reposition()}},5)}initState(){return{data:{},events:[],event:void 0}}applyState(e){Object.keys(e.data).length>0&&Object.keys(e.data).forEach(i=>{this.component[i]=e.data[i]});const t=this.component.primitiveValue(),n={event:e.event,component:this.component,target:{name:this.component.$props.name,value:t},value:t};e.events.forEach(i=>{const{type:s}=i;delete i.type,s&&(s==="change"&&(this.component.$emit("changemodel",t),this.component.$emit("update:modelValue",t)),this.component.$emit(s,{...n,...i}))})}triggerOnPageChange(e,t,n){const i=this.component.$props.virtual;if(i){const s=Math.min(Math.max(0,t),Math.max(0,i.total-n));s!==i.skip&&e.events.push({type:"pagechange",page:{skip:s,take:n}})}}triggerPageChangeCornerItems(e,t){const n=this.component.$props,{dataItems:i=[],dataItemKey:s,virtual:o}=n,l=n.opened!==void 0?n.opened:this.component.currentOpened;e&&o&&this.vs.enabled&&(o.skip>0&&r.areSame(e,i[0],s)?this.triggerOnPageChange(t,o.skip-1,o.pageSize):o.skip+o.pageSize<o.total&&r.areSame(e,i[i.length-1],s)?this.triggerOnPageChange(t,o.skip+1,o.pageSize):!l&&o.skip+o.pageSize<o.total&&r.areSame(e,i[i.length-1],s)&&this.triggerOnPageChange(t,o.skip+1,o.pageSize))}getTemplateDef(e,t){const n=c.templateRendering.call(this,e,c.getListeners.call(this));return c.getTemplate.call(this,{h:t,template:n})}getListItemHeight(e){const t=e&&window.getComputedStyle(e);return t?t.height.slice(0,t.height.length-2):0}}p(h,"defaultProps",{popupSettings:{animate:!0,height:"200px"},required:!1,validityStyles:!0});module.exports=h;
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
var h = Object.defineProperty;
|
|
9
|
+
var d = (a, e, t) => e in a ? h(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
10
|
+
var p = (a, e, t) => (d(a, typeof e != "symbol" ? e + "" : e, t), t);
|
|
11
|
+
import u from "./VirtualScroll.mjs";
|
|
12
|
+
import { Navigation as g } from "./Navigation.mjs";
|
|
13
|
+
import { scrollToItem as m, areSame as r } from "./utils.mjs";
|
|
14
|
+
import { validatePackage as f, guid as l, templateRendering as S, getListeners as v, getTemplate as y } from "@progress/kendo-vue-common";
|
|
15
|
+
import { packageMetadata as k } from "../package-metadata.mjs";
|
|
16
|
+
class C {
|
|
17
|
+
constructor(e) {
|
|
18
|
+
p(this, "vs", new u());
|
|
19
|
+
p(this, "navigation", new g());
|
|
20
|
+
p(this, "handleItemClick", (e, t) => {
|
|
21
|
+
const n = this.initState();
|
|
22
|
+
n.event = t, this.component.handleItemSelect(e, n), this.togglePopup(n), this.applyState(n);
|
|
23
|
+
});
|
|
24
|
+
p(this, "handleFocus", (e) => {
|
|
25
|
+
if (!this.component.currentFocused) {
|
|
26
|
+
const t = this.initState();
|
|
27
|
+
t.data.currentFocused = !0, t.events.push({
|
|
28
|
+
type: "focus"
|
|
29
|
+
}), t.event = e, this.applyState(t);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
p(this, "filterChanged", (e, t) => {
|
|
33
|
+
const n = this.component, {
|
|
34
|
+
textField: i,
|
|
35
|
+
filterable: o
|
|
36
|
+
} = n.$props;
|
|
37
|
+
o && (t.events.push({
|
|
38
|
+
type: "filterchange",
|
|
39
|
+
filter: {
|
|
40
|
+
field: i,
|
|
41
|
+
operator: "contains",
|
|
42
|
+
ignoreCase: !0,
|
|
43
|
+
value: e
|
|
44
|
+
}
|
|
45
|
+
}), this.repositionPopup());
|
|
46
|
+
});
|
|
47
|
+
p(this, "togglePopup", (e) => {
|
|
48
|
+
const t = this.component.$props, n = t.opened !== void 0 ? t.opened : this.component.currentOpened;
|
|
49
|
+
t.opened === void 0 && (e.data.currentOpened = !n), n ? e.events.push({
|
|
50
|
+
type: "close"
|
|
51
|
+
}) : (e.events.push({
|
|
52
|
+
type: "open"
|
|
53
|
+
}), this.calculatePopupWidth());
|
|
54
|
+
});
|
|
55
|
+
p(this, "pageChange", (e, t) => {
|
|
56
|
+
const n = this.initState();
|
|
57
|
+
n.event = t, this.triggerOnPageChange(n, e.skip, e.take), this.applyState(n);
|
|
58
|
+
});
|
|
59
|
+
p(this, "scrollChange", (e) => {
|
|
60
|
+
this.component.$emit("scroll", e);
|
|
61
|
+
});
|
|
62
|
+
p(this, "scrollToVirtualItem", (e, t) => {
|
|
63
|
+
const n = this.vs;
|
|
64
|
+
if (n.enabled = !1, e.skip === 0)
|
|
65
|
+
n.reset();
|
|
66
|
+
else if (e.skip + e.pageSize === e.total)
|
|
67
|
+
n.scrollToEnd();
|
|
68
|
+
else {
|
|
69
|
+
let i = n.translate;
|
|
70
|
+
i === 0 && (n.calcScrollElementHeight(), i = n.itemHeight * e.skip, n.translateTo(i - n.itemHeight)), n.container && (n.container.scrollTop = i), this.scrollToItem(t, !0);
|
|
71
|
+
}
|
|
72
|
+
setTimeout(() => n.enabled = !0, 10);
|
|
73
|
+
});
|
|
74
|
+
p(this, "getGroupedDataModernMode", (e, t) => {
|
|
75
|
+
const n = [];
|
|
76
|
+
return e.forEach((i, o) => {
|
|
77
|
+
e[o - 1] && i[t] !== e[o - 1][t] && n.push({
|
|
78
|
+
[t]: i[t]
|
|
79
|
+
}), n.push(e[o]);
|
|
80
|
+
}), n;
|
|
81
|
+
});
|
|
82
|
+
p(this, "resetGroupStickyHeader", (e, t) => {
|
|
83
|
+
const n = this.initState();
|
|
84
|
+
e !== t.group && t.state && (t.state.data.group = e, this.applyState(n));
|
|
85
|
+
});
|
|
86
|
+
f(k), this.listBoxId = l(), this.guid = l(), this.component = e, this.vs.PageChange = this.pageChange, this.vs.ScrollChange = this.scrollChange;
|
|
87
|
+
}
|
|
88
|
+
didMount() {
|
|
89
|
+
const e = this.component.$props, t = e.popupSettings, n = e.style, i = t && t.width;
|
|
90
|
+
let o = e.opened === !0;
|
|
91
|
+
i === void 0 && this.calculatePopupWidth(), e.dir === void 0 && n && n.direction === void 0 && (this.calculateDir(), o = !0), o && this.component.$forceUpdate();
|
|
92
|
+
}
|
|
93
|
+
calculateDir() {
|
|
94
|
+
this.component.element && (this.dirCalculated = window.getComputedStyle(this.component.element).direction || void 0);
|
|
95
|
+
}
|
|
96
|
+
calculatePopupWidth() {
|
|
97
|
+
const e = this.component.$props, t = e.popupSettings, n = t && t.width;
|
|
98
|
+
this.wrapper && !n && (this.component.popupWidth = e.popupSettings.width !== void 0 ? e.popupSettings.width : this.wrapper.offsetWidth + "px");
|
|
99
|
+
}
|
|
100
|
+
scrollToItem(e, t) {
|
|
101
|
+
const n = this.list || this.vs.list, i = n ? n.children[0] : void 0;
|
|
102
|
+
if (i && e >= 0) {
|
|
103
|
+
const o = this.vs, s = o.container || n.parentNode;
|
|
104
|
+
if (s) {
|
|
105
|
+
const c = t !== void 0 ? t : o.enabled;
|
|
106
|
+
m(s, i.offsetHeight, e, o.translate, c);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
repositionPopup() {
|
|
111
|
+
const e = this.component;
|
|
112
|
+
setTimeout(function() {
|
|
113
|
+
const t = e.$refs.container;
|
|
114
|
+
if (t) {
|
|
115
|
+
const n = t.$refs.popup;
|
|
116
|
+
n && n.show && n.reposition();
|
|
117
|
+
}
|
|
118
|
+
}, 5);
|
|
119
|
+
}
|
|
120
|
+
initState() {
|
|
121
|
+
return {
|
|
122
|
+
data: {},
|
|
123
|
+
events: [],
|
|
124
|
+
event: void 0
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
applyState(e) {
|
|
128
|
+
Object.keys(e.data).length > 0 && Object.keys(e.data).forEach((i) => {
|
|
129
|
+
this.component[i] = e.data[i];
|
|
130
|
+
});
|
|
131
|
+
const t = this.component.primitiveValue(), n = {
|
|
132
|
+
event: e.event,
|
|
133
|
+
component: this.component,
|
|
134
|
+
target: {
|
|
135
|
+
name: this.component.$props.name,
|
|
136
|
+
value: t
|
|
137
|
+
},
|
|
138
|
+
value: t
|
|
139
|
+
};
|
|
140
|
+
e.events.forEach((i) => {
|
|
141
|
+
const {
|
|
142
|
+
type: o
|
|
143
|
+
} = i;
|
|
144
|
+
delete i.type, o && (o === "change" && (this.component.$emit("changemodel", t), this.component.$emit("update:modelValue", t)), this.component.$emit(o, {
|
|
145
|
+
...n,
|
|
146
|
+
...i
|
|
147
|
+
}));
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
triggerOnPageChange(e, t, n) {
|
|
151
|
+
const i = this.component.$props.virtual;
|
|
152
|
+
if (i) {
|
|
153
|
+
const o = Math.min(Math.max(0, t), Math.max(0, i.total - n));
|
|
154
|
+
o !== i.skip && e.events.push({
|
|
155
|
+
type: "pagechange",
|
|
156
|
+
page: {
|
|
157
|
+
skip: o,
|
|
158
|
+
take: n
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
triggerPageChangeCornerItems(e, t) {
|
|
164
|
+
const n = this.component.$props, {
|
|
165
|
+
dataItems: i = [],
|
|
166
|
+
dataItemKey: o,
|
|
167
|
+
virtual: s
|
|
168
|
+
} = n, c = n.opened !== void 0 ? n.opened : this.component.currentOpened;
|
|
169
|
+
e && s && this.vs.enabled && (s.skip > 0 && r(e, i[0], o) ? this.triggerOnPageChange(t, s.skip - 1, s.pageSize) : s.skip + s.pageSize < s.total && r(e, i[i.length - 1], o) ? this.triggerOnPageChange(t, s.skip + 1, s.pageSize) : !c && s.skip + s.pageSize < s.total && r(e, i[i.length - 1], o) && this.triggerOnPageChange(t, s.skip + 1, s.pageSize));
|
|
170
|
+
}
|
|
171
|
+
getTemplateDef(e, t) {
|
|
172
|
+
const n = S.call(this, e, v.call(this));
|
|
173
|
+
return y.call(this, {
|
|
174
|
+
h: t,
|
|
175
|
+
template: n
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
getListItemHeight(e) {
|
|
179
|
+
const t = e && window.getComputedStyle(e);
|
|
180
|
+
return t ? t.height.slice(0, t.height.length - 2) : 0;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
p(C, "defaultProps", {
|
|
184
|
+
popupSettings: {
|
|
185
|
+
animate: !0,
|
|
186
|
+
height: "200px"
|
|
187
|
+
},
|
|
188
|
+
required: !1,
|
|
189
|
+
validityStyles: !0
|
|
190
|
+
});
|
|
191
|
+
export {
|
|
192
|
+
C as default
|
|
193
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("@progress/kendo-vue-common"),d=e.defineComponent({name:"KendoGroupStickyHeader",inheritAttrs:!1,props:{group:String,render:Object},render(){const{group:r,render:t}=this.$props,o=e.createVNode("div",{class:"k-list-group-sticky-header"},[e.createVNode("div",{class:"k-list-header-text"},[r])]);return i.getTemplate.call(this,{h:e.h,template:t,defaultRendering:o,additionalProps:{...this.$props}})}});exports.GroupStickyHeader=d;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { defineComponent as i, createVNode as e, h as p } from "vue";
|
|
9
|
+
import { getTemplate as s } from "@progress/kendo-vue-common";
|
|
10
|
+
const n = /* @__PURE__ */ i({
|
|
11
|
+
name: "KendoGroupStickyHeader",
|
|
12
|
+
inheritAttrs: !1,
|
|
13
|
+
props: {
|
|
14
|
+
group: String,
|
|
15
|
+
render: Object
|
|
16
|
+
},
|
|
17
|
+
render() {
|
|
18
|
+
const {
|
|
19
|
+
group: r,
|
|
20
|
+
render: t
|
|
21
|
+
} = this.$props, o = e("div", {
|
|
22
|
+
class: "k-list-group-sticky-header"
|
|
23
|
+
}, [e("div", {
|
|
24
|
+
class: "k-list-header-text"
|
|
25
|
+
}, [r])]);
|
|
26
|
+
return s.call(this, {
|
|
27
|
+
h: p,
|
|
28
|
+
template: t,
|
|
29
|
+
defaultRendering: o,
|
|
30
|
+
additionalProps: {
|
|
31
|
+
...this.$props
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
n as GroupStickyHeader
|
|
38
|
+
};
|
package/common/List.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("./ListItem.js"),A=require("./ListGroupItem.js"),c=require("./utils.js"),u=require("@progress/kendo-vue-common"),z=require("@progress/kendo-vue-intl"),f=require("../messages/main.js"),D=e.defineComponent({name:"list",emits:{listclick:null,scroll:null},inheritAttrs:!1,props:{id:String,show:Boolean,dataItems:Array,value:[Object,String,Number,Boolean,Array],textField:String,valueField:String,optionsGuid:String,wrapperCssClass:String,wrapperStyle:Object,listStyle:Object,skip:Number,focusedIndex:Number,highlightSelected:{type:Boolean,default:!0},itemRender:[String,Function,Object],groupHeaderItemRender:[String,Function,Object],noDataRender:[String,Function,Object],scroller:Boolean,groupField:String},inject:{kendoLocalizationService:{default:null}},setup(){const t=e.ref(null),r=e.inject("kendoLocalizationService",{});return{listRef:t,kendoLocalizationService:r}},mounted(){this.list=u.getRef(this,"list")},methods:{handleClick(t,r){this.$emit("listclick",t,r)},handleScroll(t){this.$emit("scroll",t)}},render(){const t=u.getDefaultSlots(this),r=z.provideLocalizationService(this),{id:v,show:b,wrapperCssClass:R,wrapperStyle:j,listStyle:L,listRef:B}=this.$props,V=function(){const p=this.$props.noDataRender,l=e.createVNode("div",{class:"k-nodata"},[e.createVNode("div",null,[r.toLanguageString(f.nodata,f.messages[f.nodata])])]);return u.getTemplate.call(this,{h:e.h,template:p,defaultRendering:l})},S=function(){const{textField:p,valueField:l,optionsGuid:I,skip:C=0,focusedIndex:F,highlightSelected:N,value:g,groupField:o,itemRender:O,groupHeaderItemRender:$,dataItems:k}=this.$props,y=Array.isArray(g);let s=0;return k.map(function(n,h){const i=C+h,q=N&&(!y&&c.areSame(n,g,l)||y&&g.findIndex(x=>c.areSame(x,n,l))!==-1);let a,d,m;return h>0&&o!==void 0&&(d=c.getItemValue(n,o),m=c.getItemValue(k[h-1],o),d&&m&&d!==m!==void 0&&(a=d)),a!==void 0&&Object.keys(n).length===1&&(s+=1),a!==void 0&&n[o]!==void 0&&Object.keys(n).length===1?e.createVNode(A.ListGroupItem,{id:`option-${I}-${i}`,key:i+"-group-item",group:a,render:$},null):e.createVNode(w.ListItem,{id:`option-${I}-${i}`,dataItem:n,selected:q,focused:F===i-s,index:i-s,key:i-s,onItemClick:this.handleClick,textField:p,render:O},null)},this)}.call(this);return S.length?e.createVNode("div",{class:R,style:j,unselectable:"on",onScroll:this.handleScroll},[e.createVNode("ul",{id:v,role:"listbox","aria-live":"polite","aria-hidden":b?void 0:!0,class:"k-list-ul",ref:u.setRef(this,"list"),style:L},[S]),t]):V.call(this)}});exports.List=D;
|