@progress/kendo-vue-dropdowns 5.3.0-dev.202410141143 → 5.3.0-develop.2
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
package/common/List.mjs
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
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 D, ref as N, inject as B, createVNode as i, h as G } from "vue";
|
|
9
|
+
import { ListItem as V } from "./ListItem.mjs";
|
|
10
|
+
import { ListGroupItem as E } from "./ListGroupItem.mjs";
|
|
11
|
+
import { areSame as k, getItemValue as y } from "./utils.mjs";
|
|
12
|
+
import { getRef as H, getDefaultSlots as T, setRef as q, getTemplate as J } from "@progress/kendo-vue-common";
|
|
13
|
+
import { provideLocalizationService as K } from "@progress/kendo-vue-intl";
|
|
14
|
+
import { nodata as v, messages as M } from "../messages/main.mjs";
|
|
15
|
+
const te = /* @__PURE__ */ D({
|
|
16
|
+
name: "list",
|
|
17
|
+
emits: {
|
|
18
|
+
listclick: null,
|
|
19
|
+
scroll: null
|
|
20
|
+
},
|
|
21
|
+
inheritAttrs: !1,
|
|
22
|
+
props: {
|
|
23
|
+
id: String,
|
|
24
|
+
show: Boolean,
|
|
25
|
+
dataItems: Array,
|
|
26
|
+
value: [Object, String, Number, Boolean, Array],
|
|
27
|
+
textField: String,
|
|
28
|
+
valueField: String,
|
|
29
|
+
optionsGuid: String,
|
|
30
|
+
wrapperCssClass: String,
|
|
31
|
+
wrapperStyle: Object,
|
|
32
|
+
listStyle: Object,
|
|
33
|
+
skip: Number,
|
|
34
|
+
focusedIndex: Number,
|
|
35
|
+
highlightSelected: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !0
|
|
38
|
+
},
|
|
39
|
+
itemRender: [String, Function, Object],
|
|
40
|
+
groupHeaderItemRender: [String, Function, Object],
|
|
41
|
+
noDataRender: [String, Function, Object],
|
|
42
|
+
scroller: Boolean,
|
|
43
|
+
groupField: String
|
|
44
|
+
},
|
|
45
|
+
inject: {
|
|
46
|
+
kendoLocalizationService: {
|
|
47
|
+
default: null
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
setup() {
|
|
51
|
+
const e = N(null), r = B("kendoLocalizationService", {});
|
|
52
|
+
return {
|
|
53
|
+
listRef: e,
|
|
54
|
+
kendoLocalizationService: r
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
mounted() {
|
|
58
|
+
this.list = H(this, "list");
|
|
59
|
+
},
|
|
60
|
+
methods: {
|
|
61
|
+
handleClick(e, r) {
|
|
62
|
+
this.$emit("listclick", e, r);
|
|
63
|
+
},
|
|
64
|
+
handleScroll(e) {
|
|
65
|
+
this.$emit("scroll", e);
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
render() {
|
|
69
|
+
const e = T(this), r = K(this), {
|
|
70
|
+
id: I,
|
|
71
|
+
show: b,
|
|
72
|
+
wrapperCssClass: R,
|
|
73
|
+
wrapperStyle: j,
|
|
74
|
+
listStyle: F,
|
|
75
|
+
listRef: P
|
|
76
|
+
} = this.$props, C = function() {
|
|
77
|
+
const c = this.$props.noDataRender, l = i("div", {
|
|
78
|
+
class: "k-nodata"
|
|
79
|
+
}, [i("div", null, [r.toLanguageString(v, M[v])])]);
|
|
80
|
+
return J.call(this, {
|
|
81
|
+
h: G,
|
|
82
|
+
template: c,
|
|
83
|
+
defaultRendering: l
|
|
84
|
+
});
|
|
85
|
+
}, f = function() {
|
|
86
|
+
const {
|
|
87
|
+
textField: c,
|
|
88
|
+
valueField: l,
|
|
89
|
+
optionsGuid: h,
|
|
90
|
+
skip: $ = 0,
|
|
91
|
+
focusedIndex: x,
|
|
92
|
+
highlightSelected: L,
|
|
93
|
+
value: u,
|
|
94
|
+
groupField: o,
|
|
95
|
+
itemRender: O,
|
|
96
|
+
groupHeaderItemRender: w,
|
|
97
|
+
dataItems: g
|
|
98
|
+
} = this.$props, S = Array.isArray(u);
|
|
99
|
+
let s = 0;
|
|
100
|
+
return g.map(function(t, p) {
|
|
101
|
+
const n = $ + p, A = L && (!S && k(t, u, l) || S && u.findIndex((z) => k(z, t, l)) !== -1);
|
|
102
|
+
let a, d, m;
|
|
103
|
+
return p > 0 && o !== void 0 && (d = y(t, o), m = y(g[p - 1], o), d && m && d !== m !== void 0 && (a = d)), a !== void 0 && Object.keys(t).length === 1 && (s += 1), a !== void 0 && t[o] !== void 0 && Object.keys(t).length === 1 ? i(E, {
|
|
104
|
+
id: `option-${h}-${n}`,
|
|
105
|
+
key: n + "-group-item",
|
|
106
|
+
group: a,
|
|
107
|
+
render: w
|
|
108
|
+
}, null) : i(V, {
|
|
109
|
+
id: `option-${h}-${n}`,
|
|
110
|
+
dataItem: t,
|
|
111
|
+
selected: A,
|
|
112
|
+
focused: x === n - s,
|
|
113
|
+
index: n - s,
|
|
114
|
+
key: n - s,
|
|
115
|
+
onItemClick: this.handleClick,
|
|
116
|
+
textField: c,
|
|
117
|
+
render: O
|
|
118
|
+
}, null);
|
|
119
|
+
}, this);
|
|
120
|
+
}.call(this);
|
|
121
|
+
return f.length ? i("div", {
|
|
122
|
+
class: R,
|
|
123
|
+
style: j,
|
|
124
|
+
unselectable: "on",
|
|
125
|
+
onScroll: this.handleScroll
|
|
126
|
+
}, [i("ul", {
|
|
127
|
+
id: I,
|
|
128
|
+
role: "listbox",
|
|
129
|
+
"aria-live": "polite",
|
|
130
|
+
"aria-hidden": b ? void 0 : !0,
|
|
131
|
+
class: "k-list-ul",
|
|
132
|
+
ref: q(this, "list"),
|
|
133
|
+
style: F
|
|
134
|
+
}, [f]), e]) : C.call(this);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
export {
|
|
138
|
+
te as List
|
|
139
|
+
};
|
|
@@ -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 o=require("vue"),S=require("@progress/kendo-vue-popup"),b=require("@progress/kendo-vue-common"),y=o.defineComponent({name:"list-container",emits:{mousedown:null,blur:null,open:null,close:null},props:{width:[String,Number],dir:String,itemsCount:Number,popupSettings:{type:Object,default:function(){return{animate:!0,height:"200px"}}}},created(){this.kendoAnchorRef=void 0},methods:{onMouseDown(e){this.$emit("mousedown",e)},onBlur(e){this.$emit("blur",e)},onOpen(e){this.$emit("open",e)},onClose(e){this.$emit("close",e)}},render(){const e=b.getDefaultSlots(this),{width:n,dir:i,popupSettings:s}=this.$props,{popupClass:p,className:u,animate:r,anchor:l,anchorAlign:d,show:a,itemsCount:A,appendTo:c,collision:h,direction:m,offset:f,popupAlign:g,style:w,width:t,popupStyle:C}=s;return o.createVNode(S.Popup,{ref:"popup",style:{...w,width:t||n,direction:i},popupClass:u,animate:r,anchor:l,anchorAlign:d,show:a,onOpen:this.onOpen,onClose:this.onClose,appendTo:c,collision:h,direction:m,offset:f,popupAlign:g},{default:()=>[o.createVNode("div",{class:p,style:C,onMousedown:this.onMouseDown,onFocusout:this.onBlur},[e])]})}});exports.ListContainer=y;
|
|
@@ -0,0 +1,103 @@
|
|
|
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 S, createVNode as e } from "vue";
|
|
9
|
+
import { Popup as b } from "@progress/kendo-vue-popup";
|
|
10
|
+
import { getDefaultSlots as y } from "@progress/kendo-vue-common";
|
|
11
|
+
const D = /* @__PURE__ */ S({
|
|
12
|
+
name: "list-container",
|
|
13
|
+
emits: {
|
|
14
|
+
mousedown: null,
|
|
15
|
+
blur: null,
|
|
16
|
+
open: null,
|
|
17
|
+
close: null
|
|
18
|
+
},
|
|
19
|
+
props: {
|
|
20
|
+
width: [String, Number],
|
|
21
|
+
dir: String,
|
|
22
|
+
itemsCount: Number,
|
|
23
|
+
popupSettings: {
|
|
24
|
+
type: Object,
|
|
25
|
+
default: function() {
|
|
26
|
+
return {
|
|
27
|
+
animate: !0,
|
|
28
|
+
height: "200px"
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
created() {
|
|
34
|
+
this.kendoAnchorRef = void 0;
|
|
35
|
+
},
|
|
36
|
+
methods: {
|
|
37
|
+
onMouseDown(o) {
|
|
38
|
+
this.$emit("mousedown", o);
|
|
39
|
+
},
|
|
40
|
+
onBlur(o) {
|
|
41
|
+
this.$emit("blur", o);
|
|
42
|
+
},
|
|
43
|
+
onOpen(o) {
|
|
44
|
+
this.$emit("open", o);
|
|
45
|
+
},
|
|
46
|
+
onClose(o) {
|
|
47
|
+
this.$emit("close", o);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
render() {
|
|
51
|
+
const o = y(this), {
|
|
52
|
+
width: n,
|
|
53
|
+
dir: i,
|
|
54
|
+
popupSettings: s
|
|
55
|
+
} = this.$props, {
|
|
56
|
+
popupClass: p,
|
|
57
|
+
className: l,
|
|
58
|
+
animate: r,
|
|
59
|
+
anchor: u,
|
|
60
|
+
anchorAlign: d,
|
|
61
|
+
show: a,
|
|
62
|
+
itemsCount: A,
|
|
63
|
+
appendTo: h,
|
|
64
|
+
collision: c,
|
|
65
|
+
direction: m,
|
|
66
|
+
offset: f,
|
|
67
|
+
popupAlign: w,
|
|
68
|
+
style: g,
|
|
69
|
+
width: t,
|
|
70
|
+
popupStyle: C
|
|
71
|
+
} = s;
|
|
72
|
+
return e(b, {
|
|
73
|
+
ref: "popup",
|
|
74
|
+
style: {
|
|
75
|
+
...g,
|
|
76
|
+
width: t || n,
|
|
77
|
+
direction: i
|
|
78
|
+
},
|
|
79
|
+
popupClass: l,
|
|
80
|
+
animate: r,
|
|
81
|
+
anchor: u,
|
|
82
|
+
anchorAlign: d,
|
|
83
|
+
show: a,
|
|
84
|
+
onOpen: this.onOpen,
|
|
85
|
+
onClose: this.onClose,
|
|
86
|
+
appendTo: h,
|
|
87
|
+
collision: c,
|
|
88
|
+
direction: m,
|
|
89
|
+
offset: f,
|
|
90
|
+
popupAlign: w
|
|
91
|
+
}, {
|
|
92
|
+
default: () => [e("div", {
|
|
93
|
+
class: p,
|
|
94
|
+
style: C,
|
|
95
|
+
onMousedown: this.onMouseDown,
|
|
96
|
+
onFocusout: this.onBlur
|
|
97
|
+
}, [o])]
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
export {
|
|
102
|
+
D as ListContainer
|
|
103
|
+
};
|
|
@@ -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 t=require("vue"),n=require("@progress/kendo-vue-common"),s=require("./utils.js"),l=t.defineComponent({name:"list-default-item",props:{defaultItem:[Object,String],textField:String,selected:Boolean,onDefaultitemclick:Function},methods:{onMouseDown(e){e.preventDefault()},onClick(e){this.$emit("defaultitemclick",e)}},render(){const{selected:e,defaultItem:o,textField:i}=this.$props;return t.createVNode("div",{onClick:this.onClick,onMousedown:this.onMouseDown,style:{position:"unset"},class:n.classNames("k-list-optionlabel",{"k-selected":e})},[s.getItemValue(o,i)||""])}});exports.ListDefaultItem=l;
|
|
@@ -0,0 +1,47 @@
|
|
|
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 n } from "vue";
|
|
9
|
+
import { classNames as l } from "@progress/kendo-vue-common";
|
|
10
|
+
import { getItemValue as s } from "./utils.mjs";
|
|
11
|
+
const a = /* @__PURE__ */ i({
|
|
12
|
+
name: "list-default-item",
|
|
13
|
+
props: {
|
|
14
|
+
defaultItem: [Object, String],
|
|
15
|
+
textField: String,
|
|
16
|
+
selected: Boolean,
|
|
17
|
+
onDefaultitemclick: Function
|
|
18
|
+
},
|
|
19
|
+
methods: {
|
|
20
|
+
onMouseDown(e) {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
},
|
|
23
|
+
onClick(e) {
|
|
24
|
+
this.$emit("defaultitemclick", e);
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
render() {
|
|
28
|
+
const {
|
|
29
|
+
selected: e,
|
|
30
|
+
defaultItem: t,
|
|
31
|
+
textField: o
|
|
32
|
+
} = this.$props;
|
|
33
|
+
return n("div", {
|
|
34
|
+
onClick: this.onClick,
|
|
35
|
+
onMousedown: this.onMouseDown,
|
|
36
|
+
style: {
|
|
37
|
+
position: "unset"
|
|
38
|
+
},
|
|
39
|
+
class: l("k-list-optionlabel", {
|
|
40
|
+
"k-selected": e
|
|
41
|
+
})
|
|
42
|
+
}, [s(t, o) || ""]);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
export {
|
|
46
|
+
a as ListDefaultItem
|
|
47
|
+
};
|
|
@@ -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 i=require("vue"),o=require("@progress/kendo-vue-common"),p=require("@progress/kendo-svg-icons"),f=require("@progress/kendo-vue-inputs"),h=require("@progress/kendo-vue-intl"),r=require("../messages/main.js"),{sizeMap:m,roundedMap:g}=o.kendoThemeMaps,v=i.defineComponent({name:"list-filter",emits:{keydown:null,change:null,focus:null,blur:null},inject:{kendoLocalizationService:{default:null}},props:{value:String,rounded:{type:String,default:"medium",validator:function(e){return["small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return["solid","flat","outline"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return["small","medium","large"].includes(e)}},adaptiveMode:{type:Boolean,default:!1},ariaControlsId:String,ariaActivedescendantId:String,tabIndex:{type:Number,default:0}},computed:{spanClass(){const{size:e,rounded:t,fillMode:n}=this.$props;return{"k-searchbox k-input":!0,[`k-input-${m[e]||e}`]:e,[`k-rounded-${g[t]||t}`]:t,[`k-input-${n}`]:n}}},setup(){return{inputRef:i.ref(null)}},methods:{onKeyDown(e){this.$emit("keydown",e)},onChange(e){this.$emit("change",e)},handleFocus(e){this.$emit("focus",e)},handleBlur(e){this.$emit("blur",e)},prefixRender(e){const t={class:"k-input-icon",name:"search",icon:p.searchIcon};return e(o.Icon,{...t})}},mounted(){this.input=o.getRef(this,"input")._input},render(){const{size:e,rounded:t,fillMode:n,adaptiveMode:a,ariaControlsId:s,ariaActivedescendantId:u,tabIndex:d}=this.$props,c=h.provideLocalizationService(this).toLanguageString(r.filterLabel,r.messages[r.filterLabel]),l=function(){return i.createVNode(f.TextBox,{ref:o.setRef(this,"input"),value:this.$props.value,onInput:this.onChange,onKeydown:this.onKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,size:e,fillMode:n,rounded:t,inputPrefix:this.prefixRender,role:"searchbox","aria-label":c,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-activedescendant":u,"aria-controls":s,tabIndex:d},null)};return a?l.call(this):i.createVNode("div",{class:"k-list-filter"},[l.call(this)])}});exports.ListFilter=v;
|
|
@@ -0,0 +1,147 @@
|
|
|
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 c, ref as p, createVNode as o } from "vue";
|
|
9
|
+
import { Icon as f, getRef as m, kendoThemeMaps as h, setRef as g } from "@progress/kendo-vue-common";
|
|
10
|
+
import { searchIcon as v } from "@progress/kendo-svg-icons";
|
|
11
|
+
import { TextBox as b } from "@progress/kendo-vue-inputs";
|
|
12
|
+
import { provideLocalizationService as x } from "@progress/kendo-vue-intl";
|
|
13
|
+
import { filterLabel as r, messages as k } from "../messages/main.mjs";
|
|
14
|
+
const {
|
|
15
|
+
sizeMap: y,
|
|
16
|
+
roundedMap: I
|
|
17
|
+
} = h, R = /* @__PURE__ */ c({
|
|
18
|
+
name: "list-filter",
|
|
19
|
+
emits: {
|
|
20
|
+
keydown: null,
|
|
21
|
+
change: null,
|
|
22
|
+
focus: null,
|
|
23
|
+
blur: null
|
|
24
|
+
},
|
|
25
|
+
inject: {
|
|
26
|
+
kendoLocalizationService: {
|
|
27
|
+
default: null
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
props: {
|
|
31
|
+
value: String,
|
|
32
|
+
rounded: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "medium",
|
|
35
|
+
validator: function(e) {
|
|
36
|
+
return ["small", "medium", "large", "full"].includes(e);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
fillMode: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "solid",
|
|
42
|
+
validator: function(e) {
|
|
43
|
+
return ["solid", "flat", "outline"].includes(e);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
size: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: "medium",
|
|
49
|
+
validator: function(e) {
|
|
50
|
+
return ["small", "medium", "large"].includes(e);
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
adaptiveMode: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: !1
|
|
56
|
+
},
|
|
57
|
+
ariaControlsId: String,
|
|
58
|
+
ariaActivedescendantId: String,
|
|
59
|
+
tabIndex: {
|
|
60
|
+
type: Number,
|
|
61
|
+
default: 0
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
computed: {
|
|
65
|
+
spanClass() {
|
|
66
|
+
const {
|
|
67
|
+
size: e,
|
|
68
|
+
rounded: t,
|
|
69
|
+
fillMode: n
|
|
70
|
+
} = this.$props;
|
|
71
|
+
return {
|
|
72
|
+
"k-searchbox k-input": !0,
|
|
73
|
+
[`k-input-${y[e] || e}`]: e,
|
|
74
|
+
[`k-rounded-${I[t] || t}`]: t,
|
|
75
|
+
[`k-input-${n}`]: n
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
setup() {
|
|
80
|
+
return {
|
|
81
|
+
inputRef: p(null)
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
methods: {
|
|
85
|
+
onKeyDown(e) {
|
|
86
|
+
this.$emit("keydown", e);
|
|
87
|
+
},
|
|
88
|
+
onChange(e) {
|
|
89
|
+
this.$emit("change", e);
|
|
90
|
+
},
|
|
91
|
+
handleFocus(e) {
|
|
92
|
+
this.$emit("focus", e);
|
|
93
|
+
},
|
|
94
|
+
handleBlur(e) {
|
|
95
|
+
this.$emit("blur", e);
|
|
96
|
+
},
|
|
97
|
+
prefixRender(e) {
|
|
98
|
+
return e(f, {
|
|
99
|
+
...{
|
|
100
|
+
class: "k-input-icon",
|
|
101
|
+
name: "search",
|
|
102
|
+
icon: v
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
mounted() {
|
|
108
|
+
this.input = m(this, "input")._input;
|
|
109
|
+
},
|
|
110
|
+
render() {
|
|
111
|
+
const {
|
|
112
|
+
size: e,
|
|
113
|
+
rounded: t,
|
|
114
|
+
fillMode: n,
|
|
115
|
+
adaptiveMode: a,
|
|
116
|
+
ariaControlsId: l,
|
|
117
|
+
ariaActivedescendantId: s,
|
|
118
|
+
tabIndex: u
|
|
119
|
+
} = this.$props, d = x(this).toLanguageString(r, k[r]), i = function() {
|
|
120
|
+
return o(b, {
|
|
121
|
+
ref: g(this, "input"),
|
|
122
|
+
value: this.$props.value,
|
|
123
|
+
onInput: this.onChange,
|
|
124
|
+
onKeydown: this.onKeyDown,
|
|
125
|
+
onFocus: this.handleFocus,
|
|
126
|
+
onBlur: this.handleBlur,
|
|
127
|
+
size: e,
|
|
128
|
+
fillMode: n,
|
|
129
|
+
rounded: t,
|
|
130
|
+
inputPrefix: this.prefixRender,
|
|
131
|
+
role: "searchbox",
|
|
132
|
+
"aria-label": d,
|
|
133
|
+
"aria-haspopup": "listbox",
|
|
134
|
+
"aria-autocomplete": "list",
|
|
135
|
+
"aria-activedescendant": s,
|
|
136
|
+
"aria-controls": l,
|
|
137
|
+
tabIndex: u
|
|
138
|
+
}, null);
|
|
139
|
+
};
|
|
140
|
+
return a ? i.call(this) : o("div", {
|
|
141
|
+
class: "k-list-filter"
|
|
142
|
+
}, [i.call(this)]);
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
export {
|
|
146
|
+
R as ListFilter
|
|
147
|
+
};
|
|
@@ -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"),s=require("@progress/kendo-vue-common"),d=e.defineComponent({name:"KendoListItem",inheritAttrs:!1,props:{id:String,group:String,render:Object},render(){const{id:t,group:r,virtual:i,render:n}=this.$props,o=e.createVNode("li",{id:t,role:"group",class:"k-list-group-item",style:{position:i?"relative":"unset"}},[e.createVNode("span",{class:n?void 0:"k-list-item-text"},[r])]);return s.getTemplate.call(this,{h:e.h,template:this.$props.render,defaultRendering:o,additionalProps:{...this.$props}})}});exports.ListGroupItem=d;
|
|
@@ -0,0 +1,46 @@
|
|
|
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 s, createVNode as e, h as p } from "vue";
|
|
9
|
+
import { getTemplate as d } from "@progress/kendo-vue-common";
|
|
10
|
+
const m = /* @__PURE__ */ s({
|
|
11
|
+
name: "KendoListItem",
|
|
12
|
+
inheritAttrs: !1,
|
|
13
|
+
props: {
|
|
14
|
+
id: String,
|
|
15
|
+
group: String,
|
|
16
|
+
render: Object
|
|
17
|
+
},
|
|
18
|
+
render() {
|
|
19
|
+
const {
|
|
20
|
+
id: t,
|
|
21
|
+
group: r,
|
|
22
|
+
virtual: i,
|
|
23
|
+
render: n
|
|
24
|
+
} = this.$props, o = e("li", {
|
|
25
|
+
id: t,
|
|
26
|
+
role: "group",
|
|
27
|
+
class: "k-list-group-item",
|
|
28
|
+
style: {
|
|
29
|
+
position: i ? "relative" : "unset"
|
|
30
|
+
}
|
|
31
|
+
}, [e("span", {
|
|
32
|
+
class: n ? void 0 : "k-list-item-text"
|
|
33
|
+
}, [r])]);
|
|
34
|
+
return d.call(this, {
|
|
35
|
+
h: p,
|
|
36
|
+
template: this.$props.render,
|
|
37
|
+
defaultRendering: o,
|
|
38
|
+
additionalProps: {
|
|
39
|
+
...this.$props
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export {
|
|
45
|
+
m as ListGroupItem
|
|
46
|
+
};
|
|
@@ -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 t=require("vue"),s=require("@progress/kendo-vue-common"),o=require("./utils.js"),r=t.defineComponent({name:"KendoListItem",inheritAttrs:!1,props:{id:String,index:Number,dataItem:[Object,String,Number],textField:String,focused:Boolean,selected:Boolean,render:Object,onItemClick:Function},computed:{itemClass(){return{"k-list-item":!0,"k-selected":this.$props.selected,"k-focus":this.$props.focused}}},methods:{handleClick(e){this.$emit("itemClick",this.$props.index,e)}},render(){const{selected:e}=this.$props,i=t.createVNode("li",{id:this.$props.id,role:"option","aria-selected":e,class:s.classNames("k-list-item",{"k-selected":e,"k-focus":this.$props.focused,[this.$attrs.class]:this.$attrs.class}),onClick:this.handleClick,style:this.$attrs.style||{position:"unset"}},[t.createVNode("span",{class:"k-list-item-text"},[o.getItemValue(this.$props.dataItem,this.$props.textField).toString()])]);return s.getTemplate.call(this,{h:t.h,template:this.$props.render,defaultRendering:i,additionalProps:{...this.$props,itemClass:this.itemClass},additionalListeners:{click:this.handleClick}})}});exports.ListItem=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 { defineComponent as i, createVNode as e, h as o } from "vue";
|
|
9
|
+
import { classNames as r, getTemplate as l } from "@progress/kendo-vue-common";
|
|
10
|
+
import { getItemValue as n } from "./utils.mjs";
|
|
11
|
+
const c = /* @__PURE__ */ i({
|
|
12
|
+
name: "KendoListItem",
|
|
13
|
+
inheritAttrs: !1,
|
|
14
|
+
props: {
|
|
15
|
+
id: String,
|
|
16
|
+
index: Number,
|
|
17
|
+
dataItem: [Object, String, Number],
|
|
18
|
+
textField: String,
|
|
19
|
+
focused: Boolean,
|
|
20
|
+
selected: Boolean,
|
|
21
|
+
render: Object,
|
|
22
|
+
onItemClick: Function
|
|
23
|
+
},
|
|
24
|
+
computed: {
|
|
25
|
+
itemClass() {
|
|
26
|
+
return {
|
|
27
|
+
"k-list-item": !0,
|
|
28
|
+
"k-selected": this.$props.selected,
|
|
29
|
+
"k-focus": this.$props.focused
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
methods: {
|
|
34
|
+
handleClick(t) {
|
|
35
|
+
this.$emit("itemClick", this.$props.index, t);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
render() {
|
|
39
|
+
const {
|
|
40
|
+
selected: t
|
|
41
|
+
} = this.$props, s = e("li", {
|
|
42
|
+
id: this.$props.id,
|
|
43
|
+
role: "option",
|
|
44
|
+
"aria-selected": t,
|
|
45
|
+
class: r("k-list-item", {
|
|
46
|
+
"k-selected": t,
|
|
47
|
+
"k-focus": this.$props.focused,
|
|
48
|
+
[this.$attrs.class]: this.$attrs.class
|
|
49
|
+
}),
|
|
50
|
+
onClick: this.handleClick,
|
|
51
|
+
style: this.$attrs.style || {
|
|
52
|
+
position: "unset"
|
|
53
|
+
}
|
|
54
|
+
}, [e("span", {
|
|
55
|
+
class: "k-list-item-text"
|
|
56
|
+
}, [n(this.$props.dataItem, this.$props.textField).toString()])]);
|
|
57
|
+
return l.call(this, {
|
|
58
|
+
h: o,
|
|
59
|
+
template: this.$props.render,
|
|
60
|
+
defaultRendering: s,
|
|
61
|
+
additionalProps: {
|
|
62
|
+
...this.$props,
|
|
63
|
+
itemClass: this.itemClass
|
|
64
|
+
},
|
|
65
|
+
additionalListeners: {
|
|
66
|
+
click: this.handleClick
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
export {
|
|
72
|
+
c as ListItem
|
|
73
|
+
};
|
|
@@ -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 i=require("./utils.js"),n=require("@progress/kendo-vue-common");class r{navigate(e){const t=e.keyCode;if(t===n.Keys.up||t===n.Keys.left)return this.next({current:e.current,min:e.min,max:e.max,step:-1});if(t===n.Keys.down||t===n.Keys.right)return this.next({current:e.current,min:e.min,max:e.max,step:1});if(t===n.Keys.home)return 0;if(t===n.Keys.end)return e.max}next(e){return i.isPresent(e.current)?Math.min(e.max,Math.max(e.current+e.step,e.min)):e.min}}exports.Navigation=r;
|
|
@@ -0,0 +1,28 @@
|
|
|
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 { isPresent as i } from "./utils.mjs";
|
|
9
|
+
import { Keys as n } from "@progress/kendo-vue-common";
|
|
10
|
+
class o {
|
|
11
|
+
navigate(e) {
|
|
12
|
+
const t = e.keyCode;
|
|
13
|
+
if (t === n.up || t === n.left)
|
|
14
|
+
return this.next({ current: e.current, min: e.min, max: e.max, step: -1 });
|
|
15
|
+
if (t === n.down || t === n.right)
|
|
16
|
+
return this.next({ current: e.current, min: e.min, max: e.max, step: 1 });
|
|
17
|
+
if (t === n.home)
|
|
18
|
+
return 0;
|
|
19
|
+
if (t === n.end)
|
|
20
|
+
return e.max;
|
|
21
|
+
}
|
|
22
|
+
next(e) {
|
|
23
|
+
return i(e.current) ? Math.min(e.max, Math.max(e.current + e.step, e.min)) : e.min;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
o as Navigation
|
|
28
|
+
};
|
|
@@ -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 i=require("vue"),s=require("@progress/kendo-vue-common"),d=i.defineComponent({name:"search-bar",emits:{change:null,keydown:null,focus:null,blur:null},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},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 n=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&&n&&s.canUseDOM&&document.activeElement!==n&&n.focus(),t&&a&&!o&&n&&n.setSelectionRange(e.length-t.length,e.length)},setup(){return{inputRef:i.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(){return i.createVNode("input",{autocomplete:"off",id:this.$props.id,type:"text",key:"searchbar",placeholder:this.$props.placeholder,class:"k-input-inner",tabindex:this.$props.tabIndex,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.owns,"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},null)}});exports.SearchBar=d;
|