@progress/kendo-vue-dropdowns 3.5.0 → 3.5.1-dev.202208150613
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/dist/cdn/js/kendo-vue-dropdowns.js +1 -1
- package/dist/es/AutoComplete/AutoComplete.js +9 -13
- package/dist/es/AutoComplete/AutoCompleteProps.js +1 -0
- package/dist/es/ComboBox/ComboBox.js +11 -14
- package/dist/es/ComboBox/ComboBoxProps.d.ts +1 -1
- package/dist/es/ComboBox/ComboBoxProps.js +1 -0
- package/dist/es/DropDownList/DropDownList.js +11 -21
- package/dist/es/DropDownList/DropDownListProps.js +1 -0
- package/dist/es/MultiSelect/MultiSelect.js +23 -30
- package/dist/es/MultiSelect/MultiSelectProps.d.ts +1 -1
- package/dist/es/MultiSelect/MultiSelectProps.js +1 -0
- package/dist/es/MultiSelect/TagList.js +3 -3
- package/dist/es/common/List.js +2 -2
- package/dist/es/common/ListContainer.js +8 -5
- package/dist/es/common/ListFilter.js +1 -1
- package/dist/es/common/events.js +1 -0
- package/dist/es/common/filterDescriptor.js +1 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/esm/AutoComplete/AutoComplete.d.ts +107 -0
- package/dist/esm/AutoComplete/AutoComplete.js +757 -0
- package/dist/esm/AutoComplete/AutoCompleteProps.d.ts +202 -0
- package/dist/esm/AutoComplete/AutoCompleteProps.js +2 -0
- package/dist/esm/ComboBox/ComboBox.d.ts +99 -0
- package/dist/esm/ComboBox/ComboBox.js +1060 -0
- package/dist/esm/ComboBox/ComboBoxProps.d.ts +244 -0
- package/dist/esm/ComboBox/ComboBoxProps.js +2 -0
- package/dist/esm/DropDownList/DropDownList.d.ts +100 -0
- package/dist/esm/DropDownList/DropDownList.js +1086 -0
- package/dist/esm/DropDownList/DropDownListProps.d.ts +274 -0
- package/dist/esm/DropDownList/DropDownListProps.js +2 -0
- package/dist/esm/MultiSelect/MultiSelect.d.ts +115 -0
- package/dist/esm/MultiSelect/MultiSelect.js +1246 -0
- package/dist/esm/MultiSelect/MultiSelectProps.d.ts +262 -0
- package/dist/esm/MultiSelect/MultiSelectProps.js +2 -0
- package/dist/esm/MultiSelect/TagList.d.ts +51 -0
- package/dist/esm/MultiSelect/TagList.js +180 -0
- package/dist/esm/additionalTypes.ts +21 -0
- package/dist/esm/common/ClearButton.d.ts +21 -0
- package/dist/esm/common/ClearButton.js +68 -0
- package/dist/esm/common/DropDownBase.d.ts +84 -0
- package/dist/esm/common/DropDownBase.js +303 -0
- package/dist/esm/common/List.d.ts +58 -0
- package/dist/esm/common/List.js +176 -0
- package/dist/esm/common/ListContainer.d.ts +40 -0
- package/dist/esm/common/ListContainer.js +134 -0
- package/dist/esm/common/ListDefaultItem.d.ts +29 -0
- package/dist/esm/common/ListDefaultItem.js +62 -0
- package/dist/esm/common/ListFilter.d.ts +46 -0
- package/dist/esm/common/ListFilter.js +112 -0
- package/dist/esm/common/ListItem.d.ts +71 -0
- package/dist/esm/common/ListItem.js +105 -0
- package/dist/esm/common/Navigation.d.ts +12 -0
- package/dist/esm/common/Navigation.js +34 -0
- package/dist/esm/common/SearchBar.d.ts +65 -0
- package/dist/esm/common/SearchBar.js +177 -0
- package/dist/esm/common/VirtualScroll.d.ts +42 -0
- package/dist/esm/common/VirtualScroll.js +196 -0
- package/dist/esm/common/events.d.ts +63 -0
- package/dist/esm/common/events.js +1 -0
- package/dist/esm/common/filterDescriptor.d.ts +41 -0
- package/dist/esm/common/filterDescriptor.js +2 -0
- package/dist/esm/common/settings.d.ts +102 -0
- package/dist/esm/common/settings.js +8 -0
- package/dist/esm/common/utils.d.ts +57 -0
- package/dist/esm/common/utils.js +184 -0
- package/dist/esm/main.d.ts +13 -0
- package/dist/esm/main.js +5 -0
- package/dist/esm/messages/index.d.ts +20 -0
- package/dist/esm/messages/index.js +21 -0
- package/dist/esm/package-metadata.d.ts +5 -0
- package/dist/esm/package-metadata.js +11 -0
- package/dist/esm/package.json +3 -0
- package/dist/npm/AutoComplete/AutoComplete.js +24 -28
- package/dist/npm/ComboBox/ComboBox.js +43 -46
- package/dist/npm/ComboBox/ComboBoxProps.d.ts +1 -1
- package/dist/npm/DropDownList/DropDownList.js +42 -52
- package/dist/npm/MultiSelect/MultiSelect.js +41 -48
- package/dist/npm/MultiSelect/MultiSelectProps.d.ts +1 -1
- package/dist/npm/MultiSelect/TagList.js +3 -3
- package/dist/npm/common/ClearButton.js +1 -1
- package/dist/npm/common/DropDownBase.js +6 -6
- package/dist/npm/common/List.js +8 -8
- package/dist/npm/common/ListContainer.js +9 -6
- package/dist/npm/common/ListDefaultItem.js +2 -2
- package/dist/npm/common/ListFilter.js +3 -3
- package/dist/npm/common/ListItem.js +2 -2
- package/dist/npm/common/Navigation.js +1 -1
- package/dist/npm/common/SearchBar.js +2 -2
- package/dist/npm/package-metadata.js +1 -1
- package/package.json +11 -5
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
2
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
+
declare type DefaultMethods<V> = {
|
|
4
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export interface DefaultItemProps {
|
|
10
|
+
defaultItem?: any;
|
|
11
|
+
textField?: string;
|
|
12
|
+
selected: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
export interface ListDefaultItemMethods extends Vue2type {
|
|
18
|
+
onMouseDown: (e: any) => void;
|
|
19
|
+
onClick: (e: any) => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
declare let ListDefaultItemVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<ListDefaultItemMethods>, {}, RecordPropsDefinition<DefaultItemProps>>;
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
declare const ListDefaultItem: DefineComponent<DefaultItemProps, any, {}, {}, ListDefaultItemMethods, {}, {}, {}, string, DefaultItemProps, DefaultItemProps, {}>;
|
|
29
|
+
export { ListDefaultItem, ListDefaultItemVue2 };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import * as Vue from 'vue';
|
|
3
|
+
var allVue = Vue;
|
|
4
|
+
var gh = allVue.h;
|
|
5
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
6
|
+
import { classNames } from '@progress/kendo-vue-common';
|
|
7
|
+
import { getItemValue } from './utils.js';
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
var ListDefaultItemVue2 = {
|
|
13
|
+
name: 'list-default-item',
|
|
14
|
+
props: {
|
|
15
|
+
defaultItem: [Object, String],
|
|
16
|
+
textField: String,
|
|
17
|
+
selected: Boolean
|
|
18
|
+
},
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
setup: !isV3 ? undefined : function () {
|
|
21
|
+
var v3 = !!isV3;
|
|
22
|
+
return {
|
|
23
|
+
v3: v3
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
methods: {
|
|
27
|
+
onMouseDown: function onMouseDown(e) {
|
|
28
|
+
e.preventDefault();
|
|
29
|
+
},
|
|
30
|
+
onClick: function onClick(e) {
|
|
31
|
+
this.$emit('defaultitemclick', e);
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
render: function render(createElement) {
|
|
36
|
+
var h = gh || createElement;
|
|
37
|
+
var _a = this.$props,
|
|
38
|
+
selected = _a.selected,
|
|
39
|
+
defaultItem = _a.defaultItem,
|
|
40
|
+
textField = _a.textField;
|
|
41
|
+
return h("div", {
|
|
42
|
+
onClick: this.onClick,
|
|
43
|
+
on: this.v3 ? undefined : {
|
|
44
|
+
"click": this.onClick,
|
|
45
|
+
"mousedown": this.onMouseDown
|
|
46
|
+
},
|
|
47
|
+
onMousedown: this.onMouseDown,
|
|
48
|
+
style: {
|
|
49
|
+
position: 'unset'
|
|
50
|
+
},
|
|
51
|
+
"class": classNames('k-list-optionlabel', {
|
|
52
|
+
'k-selected': selected
|
|
53
|
+
})
|
|
54
|
+
}, [getItemValue(defaultItem, textField) || '']);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* @hidden
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
var ListDefaultItem = ListDefaultItemVue2;
|
|
62
|
+
export { ListDefaultItem, ListDefaultItemVue2 };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
2
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
+
declare type DefaultMethods<V> = {
|
|
4
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export interface ListFilterProps {
|
|
10
|
+
value?: string;
|
|
11
|
+
onChange?: any;
|
|
12
|
+
onKeyDown?: any;
|
|
13
|
+
size?: null | 'small' | 'medium' | 'large' | string;
|
|
14
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
|
|
15
|
+
fillMode?: null | 'solid' | 'flat' | 'outline' | string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export interface ListFilterMethods extends Vue2type {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
onKeyDown: (e: any) => void;
|
|
23
|
+
onChange: (e: any) => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
export interface ListFilterState {
|
|
29
|
+
input: any;
|
|
30
|
+
inputRef: any;
|
|
31
|
+
v3: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
export interface ListFilterAll extends ListFilterState, ListFilterMethods {
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @hidden
|
|
40
|
+
*/
|
|
41
|
+
declare let ListFilterVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<ListFilterMethods>, {}, RecordPropsDefinition<ListFilterProps>>;
|
|
42
|
+
/**
|
|
43
|
+
* @hidden
|
|
44
|
+
*/
|
|
45
|
+
declare const ListFilter: DefineComponent<ListFilterProps, any, {}, {}, ListFilterMethods, {}, {}, {}, string, ListFilterProps, ListFilterProps, {}>;
|
|
46
|
+
export { ListFilter, ListFilterVue2 };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import * as Vue from 'vue';
|
|
3
|
+
var allVue = Vue;
|
|
4
|
+
var gh = allVue.h;
|
|
5
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
6
|
+
var ref = allVue.ref;
|
|
7
|
+
import { getRef, kendoThemeMaps, setRef } from '@progress/kendo-vue-common';
|
|
8
|
+
var sizeMap = kendoThemeMaps.sizeMap,
|
|
9
|
+
roundedMap = kendoThemeMaps.roundedMap;
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
var ListFilterVue2 = {
|
|
15
|
+
name: 'list-filter',
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
emits: {
|
|
18
|
+
keydown: null,
|
|
19
|
+
change: null
|
|
20
|
+
},
|
|
21
|
+
props: {
|
|
22
|
+
value: String,
|
|
23
|
+
rounded: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'medium',
|
|
26
|
+
validator: function validator(value) {
|
|
27
|
+
return ['small', 'medium', 'large', 'full'].includes(value);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
fillMode: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: 'solid',
|
|
33
|
+
validator: function validator(value) {
|
|
34
|
+
return ['solid', 'flat', 'outline'].includes(value);
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
size: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: 'medium',
|
|
40
|
+
validator: function validator(value) {
|
|
41
|
+
return ['small', 'medium', 'large'].includes(value);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
computed: {
|
|
46
|
+
spanClass: function spanClass() {
|
|
47
|
+
var _a;
|
|
48
|
+
|
|
49
|
+
var _b = this.$props,
|
|
50
|
+
size = _b.size,
|
|
51
|
+
rounded = _b.rounded,
|
|
52
|
+
fillMode = _b.fillMode;
|
|
53
|
+
return _a = {
|
|
54
|
+
'k-searchbox k-input': true
|
|
55
|
+
}, _a["k-input-".concat(sizeMap[size] || size)] = size, _a["k-rounded-".concat(roundedMap[rounded] || rounded)] = rounded, _a["k-input-".concat(fillMode)] = fillMode, _a;
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
// @ts-ignore
|
|
59
|
+
setup: !isV3 ? undefined : function () {
|
|
60
|
+
var v3 = !!isV3;
|
|
61
|
+
var inputRef = ref(null);
|
|
62
|
+
return {
|
|
63
|
+
v3: v3,
|
|
64
|
+
inputRef: inputRef
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
methods: {
|
|
68
|
+
onKeyDown: function onKeyDown(e) {
|
|
69
|
+
this.$emit('keydown', e);
|
|
70
|
+
},
|
|
71
|
+
onChange: function onChange(e) {
|
|
72
|
+
this.$emit('change', e);
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
mounted: function mounted() {
|
|
76
|
+
this.input = getRef(this, 'input');
|
|
77
|
+
},
|
|
78
|
+
// @ts-ignore
|
|
79
|
+
render: function render(createElement) {
|
|
80
|
+
var h = gh || createElement;
|
|
81
|
+
return h("span", {
|
|
82
|
+
"class": "k-list-filter"
|
|
83
|
+
}, [h("span", {
|
|
84
|
+
"class": this.spanClass
|
|
85
|
+
}, [h("span", {
|
|
86
|
+
"class": "k-input-icon k-icon k-i-search"
|
|
87
|
+
}), h("input", {
|
|
88
|
+
ref: setRef(this, 'input'),
|
|
89
|
+
type: "text",
|
|
90
|
+
attrs: this.v3 ? undefined : {
|
|
91
|
+
type: "text"
|
|
92
|
+
},
|
|
93
|
+
value: this.v3 ? this.$props.value || '' : null,
|
|
94
|
+
domProps: this.v3 ? undefined : {
|
|
95
|
+
"value": this.$props.value || ''
|
|
96
|
+
},
|
|
97
|
+
"class": "k-input-inner",
|
|
98
|
+
onInput: this.onChange,
|
|
99
|
+
on: this.v3 ? undefined : {
|
|
100
|
+
"input": this.onChange,
|
|
101
|
+
"keydown": this.onKeyDown
|
|
102
|
+
},
|
|
103
|
+
onKeydown: this.onKeyDown
|
|
104
|
+
})])]);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* @hidden
|
|
109
|
+
*/
|
|
110
|
+
|
|
111
|
+
var ListFilter = ListFilterVue2;
|
|
112
|
+
export { ListFilter, ListFilterVue2 };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
2
|
+
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
|
+
declare type DefaultMethods<V> = {
|
|
4
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Represents the props of the ListItem component.
|
|
8
|
+
*/
|
|
9
|
+
export interface ListItemProps {
|
|
10
|
+
/**
|
|
11
|
+
* Specifies the id that will be added to the list item element.
|
|
12
|
+
*/
|
|
13
|
+
id?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Represents the index of the list item element.
|
|
16
|
+
*/
|
|
17
|
+
index: number;
|
|
18
|
+
/**
|
|
19
|
+
* Represents the data item of the list item element.
|
|
20
|
+
*/
|
|
21
|
+
dataItem: any;
|
|
22
|
+
/**
|
|
23
|
+
* Sets the data item field that represents the item text. If the data contains only primitive values, do not define it.
|
|
24
|
+
*/
|
|
25
|
+
textField?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Indicates the focused state of the list item element.
|
|
28
|
+
*/
|
|
29
|
+
focused: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Indicates the selected state of the list item element.
|
|
32
|
+
*/
|
|
33
|
+
selected: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Fires when the list item is about to be rendered. Used to override the default appearance of the list item.
|
|
36
|
+
*/
|
|
37
|
+
render?: any;
|
|
38
|
+
/**
|
|
39
|
+
* The `onClick` event handler of the list item element.
|
|
40
|
+
*/
|
|
41
|
+
onClick?: (index: number, event: any) => void;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @hidden
|
|
45
|
+
*/
|
|
46
|
+
export interface ListItemMethods {
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
handleClick: (e: any) => void;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @hidden
|
|
52
|
+
*/
|
|
53
|
+
export interface ListItemComputed {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
itemClass: object;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @hidden
|
|
59
|
+
*/
|
|
60
|
+
export interface ListItemAll extends Vue2type, ListItemMethods, ListItemComputed {
|
|
61
|
+
itemClass: object;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @hidden
|
|
65
|
+
*/
|
|
66
|
+
declare let ListItemVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<ListItemAll>, ListItemComputed, RecordPropsDefinition<ListItemProps>>;
|
|
67
|
+
/**
|
|
68
|
+
* @hidden
|
|
69
|
+
*/
|
|
70
|
+
declare const ListItem: DefineComponent<ListItemProps, any, {}, {}, ListItemMethods, {}, {}, {}, string, ListItemProps, ListItemProps, {}>;
|
|
71
|
+
export { ListItem, ListItemVue2 };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
var __assign = this && this.__assign || function () {
|
|
2
|
+
__assign = Object.assign || function (t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
|
|
6
|
+
for (var p in s) {
|
|
7
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
}; // @ts-ignore
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
import * as Vue from 'vue';
|
|
19
|
+
var allVue = Vue;
|
|
20
|
+
var gh = allVue.h;
|
|
21
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
22
|
+
import { classNames, getTemplate } from '@progress/kendo-vue-common';
|
|
23
|
+
import { getItemValue } from './utils.js';
|
|
24
|
+
/**
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
var ListItemVue2 = {
|
|
29
|
+
name: 'list-item',
|
|
30
|
+
props: {
|
|
31
|
+
id: String,
|
|
32
|
+
index: Number,
|
|
33
|
+
dataItem: [Object, String, Number],
|
|
34
|
+
textField: String,
|
|
35
|
+
focused: Boolean,
|
|
36
|
+
selected: Boolean,
|
|
37
|
+
render: Object
|
|
38
|
+
},
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
setup: !isV3 ? undefined : function () {
|
|
41
|
+
var v3 = !!isV3;
|
|
42
|
+
return {
|
|
43
|
+
v3: v3
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
computed: {
|
|
47
|
+
itemClass: function itemClass() {
|
|
48
|
+
return {
|
|
49
|
+
'k-list-item': true,
|
|
50
|
+
'k-selected': this.$props.selected,
|
|
51
|
+
'k-focus': this.$props.focused
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
methods: {
|
|
56
|
+
handleClick: function handleClick(e) {
|
|
57
|
+
this.$emit('itemclick', this.$props.index, e);
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
// @ts-ignore
|
|
61
|
+
render: function render(createElement) {
|
|
62
|
+
var h = gh || createElement;
|
|
63
|
+
var selected = this.$props.selected;
|
|
64
|
+
var defaultRendering = h("li", {
|
|
65
|
+
id: this.$props.id,
|
|
66
|
+
attrs: this.v3 ? undefined : {
|
|
67
|
+
id: this.$props.id,
|
|
68
|
+
role: "option",
|
|
69
|
+
"aria-selected": selected
|
|
70
|
+
},
|
|
71
|
+
role: "option",
|
|
72
|
+
"aria-selected": selected,
|
|
73
|
+
"class": classNames('k-list-item', {
|
|
74
|
+
'k-selected': selected,
|
|
75
|
+
'k-focus': this.$props.focused
|
|
76
|
+
}),
|
|
77
|
+
onClick: this.handleClick,
|
|
78
|
+
on: this.v3 ? undefined : {
|
|
79
|
+
"click": this.handleClick
|
|
80
|
+
},
|
|
81
|
+
style: {
|
|
82
|
+
position: 'unset'
|
|
83
|
+
}
|
|
84
|
+
}, [h("span", {
|
|
85
|
+
"class": "k-list-item-text"
|
|
86
|
+
}, [getItemValue(this.$props.dataItem, this.$props.textField).toString()])]);
|
|
87
|
+
return getTemplate.call(this, {
|
|
88
|
+
h: h,
|
|
89
|
+
template: this.$props.render,
|
|
90
|
+
defaultRendering: defaultRendering,
|
|
91
|
+
additionalProps: __assign(__assign({}, this.$props), {
|
|
92
|
+
itemClass: this.itemClass
|
|
93
|
+
}),
|
|
94
|
+
additionalListeners: {
|
|
95
|
+
click: this.handleClick
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* @hidden
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
var ListItem = ListItemVue2;
|
|
105
|
+
export { ListItem, ListItemVue2 };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { isPresent } from './utils.js';
|
|
2
|
+
import { Keys } from '@progress/kendo-vue-common';
|
|
3
|
+
/**
|
|
4
|
+
* @hidden
|
|
5
|
+
*/
|
|
6
|
+
var Navigation = /** @class */ (function () {
|
|
7
|
+
function Navigation() {
|
|
8
|
+
}
|
|
9
|
+
Navigation.prototype.navigate = function (args) {
|
|
10
|
+
var keyCode = args.keyCode;
|
|
11
|
+
if (keyCode === Keys.up || keyCode === Keys.left) {
|
|
12
|
+
return this.next({ current: args.current, min: args.min, max: args.max, step: -1 });
|
|
13
|
+
}
|
|
14
|
+
else if (keyCode === Keys.down || keyCode === Keys.right) {
|
|
15
|
+
return this.next({ current: args.current, min: args.min, max: args.max, step: 1 });
|
|
16
|
+
}
|
|
17
|
+
else if (keyCode === Keys.home) {
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
else if (keyCode === Keys.end) {
|
|
21
|
+
return args.max;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
Navigation.prototype.next = function (args) {
|
|
25
|
+
if (!isPresent(args.current)) {
|
|
26
|
+
return args.min;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
return Math.min(args.max, Math.max(args.current + args.step, args.min));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
return Navigation;
|
|
33
|
+
}());
|
|
34
|
+
export { Navigation };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
2
|
+
declare type DefaultData<V> = object | ((this: V) => SearchBarData);
|
|
3
|
+
declare type DefaultMethods<V> = {
|
|
4
|
+
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export interface SearchBarProps {
|
|
10
|
+
value: string;
|
|
11
|
+
id?: string;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
tabIndex?: number;
|
|
14
|
+
size?: number;
|
|
15
|
+
suggestedText?: string;
|
|
16
|
+
focused?: boolean;
|
|
17
|
+
onKeydown?: any;
|
|
18
|
+
onFocus?: any;
|
|
19
|
+
onBlur?: any;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
readOnly?: boolean;
|
|
22
|
+
expanded?: boolean;
|
|
23
|
+
owns?: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
activedescendant?: string;
|
|
26
|
+
describedby?: string;
|
|
27
|
+
clearButton?: boolean;
|
|
28
|
+
clearButtonClick?: any;
|
|
29
|
+
accessKey?: string;
|
|
30
|
+
ariaLabelledBy?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @hidden
|
|
34
|
+
*/
|
|
35
|
+
export interface SearchBarMethods extends Vue2type {
|
|
36
|
+
onChange: (e: any) => void;
|
|
37
|
+
onBlur: (e: any) => void;
|
|
38
|
+
onFocus: (e: any) => void;
|
|
39
|
+
onKeyDown: (e: any) => void;
|
|
40
|
+
clearButtonClick: (e: any) => void;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @hidden
|
|
44
|
+
*/
|
|
45
|
+
export interface SearchBarData {
|
|
46
|
+
input: any;
|
|
47
|
+
prevValue: string;
|
|
48
|
+
prevSuggestedText: string;
|
|
49
|
+
inputRef: any;
|
|
50
|
+
v3: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @hidden
|
|
54
|
+
*/
|
|
55
|
+
export interface SearchBarAll extends SearchBarMethods, SearchBarData {
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @hidden
|
|
59
|
+
*/
|
|
60
|
+
declare let SearchBarVue2: ComponentOptions<Vue2type, DefaultData<SearchBarData>, DefaultMethods<SearchBarAll>, {}, RecordPropsDefinition<SearchBarProps>>;
|
|
61
|
+
/**
|
|
62
|
+
* @hidden
|
|
63
|
+
*/
|
|
64
|
+
declare const SearchBar: DefineComponent<SearchBarProps, any, SearchBarData, {}, SearchBarMethods, {}, {}, {}, string, SearchBarProps, SearchBarProps, {}>;
|
|
65
|
+
export { SearchBar, SearchBarVue2 };
|