@progress/kendo-vue-dropdowns 2.7.3-dev.202201070829 → 2.8.0-dev.202201131525
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.d.ts +5 -6
- package/dist/es/AutoComplete/AutoComplete.js +63 -29
- package/dist/es/AutoComplete/AutoCompleteProps.d.ts +39 -0
- package/dist/es/ComboBox/ComboBox.d.ts +5 -6
- package/dist/es/ComboBox/ComboBox.js +96 -78
- package/dist/es/ComboBox/ComboBoxProps.d.ts +39 -0
- package/dist/es/DropDownList/DropDownList.d.ts +5 -6
- package/dist/es/DropDownList/DropDownList.js +182 -153
- package/dist/es/DropDownList/DropDownListProps.d.ts +43 -0
- package/dist/es/MultiSelect/MultiSelect.d.ts +5 -6
- package/dist/es/MultiSelect/MultiSelect.js +106 -78
- package/dist/es/MultiSelect/MultiSelectProps.d.ts +53 -0
- package/dist/es/MultiSelect/TagList.d.ts +8 -4
- package/dist/es/MultiSelect/TagList.js +60 -11
- package/dist/es/additionalTypes.ts +7 -1
- package/dist/es/common/ClearButton.d.ts +5 -6
- package/dist/es/common/ClearButton.js +7 -5
- package/dist/es/common/DropDownBase.d.ts +4 -5
- package/dist/es/common/List.d.ts +7 -4
- package/dist/es/common/List.js +21 -6
- package/dist/es/common/ListContainer.d.ts +5 -6
- package/dist/es/common/ListContainer.js +7 -4
- package/dist/es/common/ListDefaultItem.d.ts +5 -6
- package/dist/es/common/ListDefaultItem.js +7 -4
- package/dist/es/common/ListFilter.d.ts +8 -6
- package/dist/es/common/ListFilter.js +50 -7
- package/dist/es/common/ListItem.d.ts +5 -6
- package/dist/es/common/ListItem.js +17 -9
- package/dist/es/common/SearchBar.d.ts +6 -6
- package/dist/es/common/SearchBar.js +13 -13
- package/dist/es/common/VirtualScroll.js +6 -4
- package/dist/es/main.d.ts +5 -5
- package/dist/es/main.js +5 -5
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/AutoComplete/AutoComplete.d.ts +5 -6
- package/dist/npm/AutoComplete/AutoComplete.js +64 -30
- package/dist/npm/AutoComplete/AutoCompleteProps.d.ts +39 -0
- package/dist/npm/ComboBox/ComboBox.d.ts +5 -6
- package/dist/npm/ComboBox/ComboBox.js +99 -79
- package/dist/npm/ComboBox/ComboBoxProps.d.ts +39 -0
- package/dist/npm/DropDownList/DropDownList.d.ts +5 -6
- package/dist/npm/DropDownList/DropDownList.js +185 -154
- package/dist/npm/DropDownList/DropDownListProps.d.ts +43 -0
- package/dist/npm/MultiSelect/MultiSelect.d.ts +5 -6
- package/dist/npm/MultiSelect/MultiSelect.js +108 -79
- package/dist/npm/MultiSelect/MultiSelectProps.d.ts +53 -0
- package/dist/npm/MultiSelect/TagList.d.ts +8 -4
- package/dist/npm/MultiSelect/TagList.js +60 -10
- package/dist/npm/additionalTypes.ts +7 -1
- package/dist/npm/common/ClearButton.d.ts +5 -6
- package/dist/npm/common/ClearButton.js +9 -7
- package/dist/npm/common/DropDownBase.d.ts +4 -5
- package/dist/npm/common/List.d.ts +7 -4
- package/dist/npm/common/List.js +21 -5
- package/dist/npm/common/ListContainer.d.ts +5 -6
- package/dist/npm/common/ListContainer.js +9 -6
- package/dist/npm/common/ListDefaultItem.d.ts +5 -6
- package/dist/npm/common/ListDefaultItem.js +9 -6
- package/dist/npm/common/ListFilter.d.ts +8 -6
- package/dist/npm/common/ListFilter.js +54 -9
- package/dist/npm/common/ListItem.d.ts +5 -6
- package/dist/npm/common/ListItem.js +18 -10
- package/dist/npm/common/SearchBar.d.ts +6 -6
- package/dist/npm/common/SearchBar.js +15 -15
- package/dist/npm/common/VirtualScroll.js +6 -4
- package/dist/npm/main.d.ts +5 -5
- package/dist/npm/main.js +5 -5
- package/dist/npm/package-metadata.js +1 -1
- package/package.json +5 -4
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
2
1
|
declare type DefaultData<V> = object | ((this: V) => AutoCompleteData);
|
|
3
2
|
declare type DefaultMethods<V> = {
|
|
4
3
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
@@ -6,7 +5,7 @@ declare type DefaultMethods<V> = {
|
|
|
6
5
|
import { AutoCompleteProps } from './AutoCompleteProps';
|
|
7
6
|
import { DropDownStateBase, InternalState } from './../common/settings';
|
|
8
7
|
import { FormComponentValidity } from '@progress/kendo-vue-common';
|
|
9
|
-
import { DefineComponent } from '../additionalTypes';
|
|
8
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
10
9
|
/**
|
|
11
10
|
* @hidden
|
|
12
11
|
*/
|
|
@@ -95,11 +94,11 @@ export interface AutoCompleteComputed {
|
|
|
95
94
|
/**
|
|
96
95
|
* @hidden
|
|
97
96
|
*/
|
|
98
|
-
export interface AutoCompleteAll extends AutoCompleteMethods, AutoCompleteState, AutoCompleteData, AutoCompleteComputed,
|
|
97
|
+
export interface AutoCompleteAll extends AutoCompleteMethods, AutoCompleteState, AutoCompleteData, AutoCompleteComputed, Vue2type {
|
|
99
98
|
}
|
|
100
99
|
/**
|
|
101
100
|
* Represents the default `AutoComplete` component.
|
|
102
101
|
*/
|
|
103
|
-
declare let
|
|
104
|
-
declare const
|
|
105
|
-
export { AutoComplete,
|
|
102
|
+
declare let AutoCompleteVue2: ComponentOptions<Vue2type, DefaultData<AutoCompleteData>, DefaultMethods<AutoCompleteAll>, AutoCompleteComputed, RecordPropsDefinition<AutoCompleteProps>>;
|
|
103
|
+
declare const AutoComplete: DefineComponent<AutoCompleteProps, any, AutoCompleteData, AutoCompleteComputed, AutoCompleteMethods, {}, {}, {}, string, AutoCompleteProps, AutoCompleteProps, {}>;
|
|
104
|
+
export { AutoComplete, AutoCompleteVue2 };
|
|
@@ -25,13 +25,15 @@ import { List } from './../common/List';
|
|
|
25
25
|
import DropDownBase from '../common/DropDownBase';
|
|
26
26
|
import { ClearButton } from '../common/ClearButton';
|
|
27
27
|
import { itemIndexStartsWith, getItemValue, areSame, getFocusedItem } from '../common/utils';
|
|
28
|
-
import { guid, Keys, classNames, templateRendering, getListeners, getTemplate } from '@progress/kendo-vue-common';
|
|
28
|
+
import { guid, Keys, classNames, templateRendering, getListeners, getTemplate, kendoThemeMaps } from '@progress/kendo-vue-common';
|
|
29
|
+
var sizeMap = kendoThemeMaps.sizeMap,
|
|
30
|
+
roundedMap = kendoThemeMaps.roundedMap;
|
|
29
31
|
var VALIDATION_MESSAGE = 'Please enter a valid value!';
|
|
30
32
|
/**
|
|
31
33
|
* Represents the default `AutoComplete` component.
|
|
32
34
|
*/
|
|
33
35
|
|
|
34
|
-
var
|
|
36
|
+
var AutoCompleteVue2 = {
|
|
35
37
|
name: 'KendoAutoComplete',
|
|
36
38
|
model: {
|
|
37
39
|
event: 'changemodel'
|
|
@@ -88,7 +90,6 @@ var AutoComplete = {
|
|
|
88
90
|
accessKey: String,
|
|
89
91
|
dataItems: Array,
|
|
90
92
|
textField: String,
|
|
91
|
-
className: String,
|
|
92
93
|
loading: Boolean,
|
|
93
94
|
popupSettings: {
|
|
94
95
|
type: Object,
|
|
@@ -109,7 +110,28 @@ var AutoComplete = {
|
|
|
109
110
|
default: false
|
|
110
111
|
},
|
|
111
112
|
ariaLabelledBy: String,
|
|
112
|
-
ariaDescribedBy: String
|
|
113
|
+
ariaDescribedBy: String,
|
|
114
|
+
rounded: {
|
|
115
|
+
type: String,
|
|
116
|
+
default: 'medium',
|
|
117
|
+
validator: function validator(value) {
|
|
118
|
+
return ['small', 'medium', 'large', 'full'].includes(value);
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
fillMode: {
|
|
122
|
+
type: String,
|
|
123
|
+
default: 'solid',
|
|
124
|
+
validator: function validator(value) {
|
|
125
|
+
return ['solid', 'flat', 'outline'].includes(value);
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
size: {
|
|
129
|
+
type: String,
|
|
130
|
+
default: 'medium',
|
|
131
|
+
validator: function validator(value) {
|
|
132
|
+
return ['small', 'medium', 'large'].includes(value);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
113
135
|
},
|
|
114
136
|
data: function data() {
|
|
115
137
|
return {
|
|
@@ -201,10 +223,10 @@ var AutoComplete = {
|
|
|
201
223
|
get: function get() {
|
|
202
224
|
var isValid = !this.hasMounted || !this.$props.validityStyles || this.validity().valid;
|
|
203
225
|
return {
|
|
204
|
-
'k-
|
|
205
|
-
'k-
|
|
206
|
-
'k-
|
|
207
|
-
'k-
|
|
226
|
+
'k-floating-label-container': true,
|
|
227
|
+
'k-focus': this.currentFocused,
|
|
228
|
+
'k-empty': !this.computedValue(),
|
|
229
|
+
'k-invalid': !isValid && isValid !== undefined,
|
|
208
230
|
'k-rtl': this.$props.dir === 'rtl'
|
|
209
231
|
};
|
|
210
232
|
}
|
|
@@ -463,17 +485,21 @@ var AutoComplete = {
|
|
|
463
485
|
}
|
|
464
486
|
},
|
|
465
487
|
render: function render(createElement) {
|
|
488
|
+
var _a;
|
|
489
|
+
|
|
466
490
|
var _this = this;
|
|
467
491
|
|
|
468
492
|
var h = gh || createElement;
|
|
469
|
-
var
|
|
470
|
-
dir =
|
|
471
|
-
disabled =
|
|
472
|
-
label =
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
493
|
+
var _b = this.$props,
|
|
494
|
+
dir = _b.dir,
|
|
495
|
+
disabled = _b.disabled,
|
|
496
|
+
label = _b.label,
|
|
497
|
+
size = _b.size,
|
|
498
|
+
rounded = _b.rounded,
|
|
499
|
+
fillMode = _b.fillMode,
|
|
500
|
+
style = _b.style,
|
|
501
|
+
loading = _b.loading,
|
|
502
|
+
suggest = _b.suggest;
|
|
477
503
|
var isValid = !this.$props.validityStyles || this.validity().valid;
|
|
478
504
|
var focused = this.currentFocused;
|
|
479
505
|
var base = this.base;
|
|
@@ -574,7 +600,7 @@ var AutoComplete = {
|
|
|
574
600
|
wrapperStyle: {
|
|
575
601
|
maxHeight: popupSettings.height
|
|
576
602
|
},
|
|
577
|
-
wrapperCssClass: "k-list-
|
|
603
|
+
wrapperCssClass: "k-list-content",
|
|
578
604
|
itemRender: itemRender,
|
|
579
605
|
noDataRender: listNoDataRender
|
|
580
606
|
},
|
|
@@ -590,7 +616,7 @@ var AutoComplete = {
|
|
|
590
616
|
wrapperStyle: {
|
|
591
617
|
maxHeight: popupSettings.height
|
|
592
618
|
},
|
|
593
|
-
wrapperCssClass: "k-list-
|
|
619
|
+
wrapperCssClass: "k-list-content",
|
|
594
620
|
onListclick: this.handleItemClick,
|
|
595
621
|
on: this.v3 ? undefined : {
|
|
596
622
|
"listclick": this.handleItemClick
|
|
@@ -604,6 +630,8 @@ var AutoComplete = {
|
|
|
604
630
|
var renderListContainer = function renderListContainer() {
|
|
605
631
|
var _this2 = this;
|
|
606
632
|
|
|
633
|
+
var _a;
|
|
634
|
+
|
|
607
635
|
var headerTemplate = templateRendering.call(this, this.$props.header, getListeners.call(this));
|
|
608
636
|
var footerTemplate = templateRendering.call(this, this.$props.footer, getListeners.call(this));
|
|
609
637
|
var header = getTemplate.call(this, {
|
|
@@ -633,7 +661,8 @@ var AutoComplete = {
|
|
|
633
661
|
animate: popupSettings.animate,
|
|
634
662
|
anchor: this.anchor,
|
|
635
663
|
show: opened,
|
|
636
|
-
|
|
664
|
+
popupClass: classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a)),
|
|
665
|
+
className: popupSettings.className,
|
|
637
666
|
appendTo: popupSettings.appendTo
|
|
638
667
|
},
|
|
639
668
|
dir: dir !== undefined ? dir : this.base.dirCalculated
|
|
@@ -643,13 +672,22 @@ var AutoComplete = {
|
|
|
643
672
|
animate: popupSettings.animate,
|
|
644
673
|
anchor: this.anchor,
|
|
645
674
|
show: opened,
|
|
646
|
-
|
|
675
|
+
popupClass: classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a)),
|
|
676
|
+
className: popupSettings.className,
|
|
647
677
|
appendTo: popupSettings.appendTo
|
|
648
678
|
},
|
|
649
679
|
dir: dir !== undefined ? dir : this.base.dirCalculated
|
|
650
680
|
}, this.v3 ? function () {
|
|
651
|
-
return [header
|
|
652
|
-
|
|
681
|
+
return [header && h("div", {
|
|
682
|
+
"class": "k-list-header"
|
|
683
|
+
}, [header]), renderList.call(_this2), footer && h("div", {
|
|
684
|
+
"class": "k-list-footer"
|
|
685
|
+
}, [footer])];
|
|
686
|
+
} : [header && h("div", {
|
|
687
|
+
"class": "k-list-header"
|
|
688
|
+
}, [header]), renderList.call(_this2), footer && h("div", {
|
|
689
|
+
"class": "k-list-footer"
|
|
690
|
+
}, [footer])])
|
|
653
691
|
);
|
|
654
692
|
};
|
|
655
693
|
|
|
@@ -679,11 +717,7 @@ var AutoComplete = {
|
|
|
679
717
|
};
|
|
680
718
|
|
|
681
719
|
var autoComplete = h("span", {
|
|
682
|
-
"class": classNames('k-
|
|
683
|
-
'k-state-disabled': disabled,
|
|
684
|
-
'k-state-focused': focused && !disabled,
|
|
685
|
-
'k-state-invalid': !isValid
|
|
686
|
-
}),
|
|
720
|
+
"class": classNames('k-autocomplete k-input', (_a = {}, _a["k-input-" + (sizeMap[size] || size)] = size, _a["k-rounded-" + (roundedMap[rounded] || rounded)] = rounded, _a["k-input-" + fillMode] = fillMode, _a['k-valid'] = isValid, _a['k-invalid'] = !isValid, _a['k-focus'] = focused && !disabled, _a['k-loading'] = loading, _a['k-required'] = this.required, _a['k-disabled'] = disabled, _a)),
|
|
687
721
|
ref: this.v3 ? function (el) {
|
|
688
722
|
_this.kendoAnchorRef = el;
|
|
689
723
|
} : this.anchor,
|
|
@@ -712,5 +746,5 @@ var AutoComplete = {
|
|
|
712
746
|
}, [this.$props.label]) : null]) : autoComplete;
|
|
713
747
|
}
|
|
714
748
|
};
|
|
715
|
-
var
|
|
716
|
-
export { AutoComplete,
|
|
749
|
+
var AutoComplete = AutoCompleteVue2;
|
|
750
|
+
export { AutoComplete, AutoCompleteVue2 };
|
|
@@ -165,4 +165,43 @@ export interface AutoCompleteProps extends FormComponentProps {
|
|
|
165
165
|
* Sets the footer component of the AutoComplete ([see example]({% slug customrendering_autocomplete %}#toc-headers-and-footers)).
|
|
166
166
|
*/
|
|
167
167
|
footer?: any;
|
|
168
|
+
/**
|
|
169
|
+
* Configures the `size` of the AutoComnplete.
|
|
170
|
+
*
|
|
171
|
+
* The available options are:
|
|
172
|
+
* - small
|
|
173
|
+
* - medium
|
|
174
|
+
* - large
|
|
175
|
+
* - null—Does not set a size `class`.
|
|
176
|
+
*
|
|
177
|
+
* @default `medium`
|
|
178
|
+
*/
|
|
179
|
+
size?: null | 'small' | 'medium' | 'large' | string;
|
|
180
|
+
/**
|
|
181
|
+
* Configures the `roundness` of the AutoComnplete.
|
|
182
|
+
*
|
|
183
|
+
* The available options are:
|
|
184
|
+
* - small
|
|
185
|
+
* - medium
|
|
186
|
+
* - large
|
|
187
|
+
* - circle
|
|
188
|
+
* - full
|
|
189
|
+
* - null—Does not set a rounded `class`.
|
|
190
|
+
*
|
|
191
|
+
* @default `medium`
|
|
192
|
+
*/
|
|
193
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
|
|
194
|
+
/**
|
|
195
|
+
* Configures the `fillMode` of the AutoComnplete.
|
|
196
|
+
*
|
|
197
|
+
* The available options are:
|
|
198
|
+
* - solid
|
|
199
|
+
* - outline
|
|
200
|
+
* - flat
|
|
201
|
+
* - link
|
|
202
|
+
* - null—Does not set a fillMode `class`.
|
|
203
|
+
*
|
|
204
|
+
* @default `solid`
|
|
205
|
+
*/
|
|
206
|
+
fillMode?: null | 'solid' | 'outline' | 'flat' | string;
|
|
168
207
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
2
1
|
declare type DefaultData<V> = object | ((this: V) => ComboBoxData);
|
|
3
2
|
declare type DefaultMethods<V> = {
|
|
4
3
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
@@ -6,7 +5,7 @@ declare type DefaultMethods<V> = {
|
|
|
6
5
|
import { ComboBoxProps } from './ComboBoxProps';
|
|
7
6
|
import { DropDownStateBase, InternalState } from './../common/settings';
|
|
8
7
|
import { FormComponentValidity } from '@progress/kendo-vue-common';
|
|
9
|
-
import { DefineComponent } from '../additionalTypes';
|
|
8
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
10
9
|
/**
|
|
11
10
|
* @hidden
|
|
12
11
|
*/
|
|
@@ -88,11 +87,11 @@ export interface ComboBoxComputed {
|
|
|
88
87
|
/**
|
|
89
88
|
* @hidden
|
|
90
89
|
*/
|
|
91
|
-
export interface ComboBoxAll extends ComboBoxMethods, ComboBoxState, ComboBoxData, ComboBoxComputed,
|
|
90
|
+
export interface ComboBoxAll extends ComboBoxMethods, ComboBoxState, ComboBoxData, ComboBoxComputed, Vue2type {
|
|
92
91
|
}
|
|
93
92
|
/**
|
|
94
93
|
* Represents the default `ComboBox` component.
|
|
95
94
|
*/
|
|
96
|
-
declare let
|
|
97
|
-
declare const
|
|
98
|
-
export { ComboBox,
|
|
95
|
+
declare let ComboBoxVue2: ComponentOptions<Vue2type, DefaultData<ComboBoxData>, DefaultMethods<ComboBoxAll>, ComboBoxComputed, RecordPropsDefinition<ComboBoxProps>>;
|
|
96
|
+
declare const ComboBox: DefineComponent<ComboBoxProps, any, ComboBoxData, ComboBoxComputed, ComboBoxMethods, {}, {}, {}, string, ComboBoxProps, ComboBoxProps, {}>;
|
|
97
|
+
export { ComboBox, ComboBoxVue2 };
|
|
@@ -20,7 +20,10 @@ var allVue = Vue;
|
|
|
20
20
|
var gh = allVue.h;
|
|
21
21
|
var ref = allVue.ref;
|
|
22
22
|
import DropDownBase from '../common/DropDownBase';
|
|
23
|
-
import { guid, classNames, Keys, templateRendering, getListeners, getTemplate } from '@progress/kendo-vue-common';
|
|
23
|
+
import { guid, classNames, Keys, templateRendering, getListeners, getTemplate, kendoThemeMaps } from '@progress/kendo-vue-common';
|
|
24
|
+
import { Button as KButton } from '@progress/kendo-vue-buttons';
|
|
25
|
+
var sizeMap = kendoThemeMaps.sizeMap,
|
|
26
|
+
roundedMap = kendoThemeMaps.roundedMap;
|
|
24
27
|
import { areSame, itemIndexStartsWith, getItemIndexByText, getItemValue, isPresent, suggestValue as _suggestValue } from '../common/utils';
|
|
25
28
|
import { SearchBar } from '../common/SearchBar';
|
|
26
29
|
import { ListContainer } from '../common/ListContainer';
|
|
@@ -31,7 +34,7 @@ var VALIDATION_MESSAGE = 'Please enter a valid value!';
|
|
|
31
34
|
* Represents the default `ComboBox` component.
|
|
32
35
|
*/
|
|
33
36
|
|
|
34
|
-
var
|
|
37
|
+
var ComboBoxVue2 = {
|
|
35
38
|
name: 'KendoComboBox',
|
|
36
39
|
model: {
|
|
37
40
|
event: 'changemodel'
|
|
@@ -140,7 +143,28 @@ var ComboBox = {
|
|
|
140
143
|
default: true
|
|
141
144
|
},
|
|
142
145
|
ariaLabelledBy: String,
|
|
143
|
-
ariaDescribedBy: String
|
|
146
|
+
ariaDescribedBy: String,
|
|
147
|
+
rounded: {
|
|
148
|
+
type: String,
|
|
149
|
+
default: 'medium',
|
|
150
|
+
validator: function validator(value) {
|
|
151
|
+
return ['small', 'medium', 'large', 'full'].includes(value);
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
fillMode: {
|
|
155
|
+
type: String,
|
|
156
|
+
default: 'solid',
|
|
157
|
+
validator: function validator(value) {
|
|
158
|
+
return ['solid', 'flat', 'outline'].includes(value);
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
size: {
|
|
162
|
+
type: String,
|
|
163
|
+
default: 'medium',
|
|
164
|
+
validator: function validator(value) {
|
|
165
|
+
return ['small', 'medium', 'large'].includes(value);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
144
168
|
},
|
|
145
169
|
data: function data() {
|
|
146
170
|
return {
|
|
@@ -186,8 +210,8 @@ var ComboBox = {
|
|
|
186
210
|
this.hasMounted = true; // @ts-ignore
|
|
187
211
|
|
|
188
212
|
this.input = this.v3 ? this.inputRef.input : this.$refs.input.input;
|
|
189
|
-
this.base.wrapper = this.v3 ? this.
|
|
190
|
-
this.element = this.v3 ? this.
|
|
213
|
+
this.base.wrapper = this.v3 ? this.kendoAnchorRef : this.$refs[this.anchor];
|
|
214
|
+
this.element = this.v3 ? this.kendoAnchorRef : this.$refs[this.anchor];
|
|
191
215
|
this.base.didMount();
|
|
192
216
|
this.setValidity();
|
|
193
217
|
},
|
|
@@ -203,7 +227,6 @@ var ComboBox = {
|
|
|
203
227
|
var closing = prevOpened && !opened;
|
|
204
228
|
var list = this.$refs.list;
|
|
205
229
|
var scrollElement = this.$refs.scrollElement;
|
|
206
|
-
var scroller = this.$refs.scroller;
|
|
207
230
|
var selectedItem = this.computedValue();
|
|
208
231
|
this.valueOnDidUpdate = selectedItem;
|
|
209
232
|
|
|
@@ -218,8 +241,9 @@ var ComboBox = {
|
|
|
218
241
|
this.base.vs.scrollElement = scrollElement;
|
|
219
242
|
}
|
|
220
243
|
|
|
221
|
-
if (
|
|
222
|
-
|
|
244
|
+
if (list && dataItems.length) {
|
|
245
|
+
// @ts-ignore
|
|
246
|
+
this.base.vs.scrollerRef(list.$el);
|
|
223
247
|
} // @ts-ignore
|
|
224
248
|
|
|
225
249
|
|
|
@@ -290,10 +314,10 @@ var ComboBox = {
|
|
|
290
314
|
get: function get() {
|
|
291
315
|
var isValid = !this.hasMounted || !this.$props.validityStyles || this.validity().valid;
|
|
292
316
|
return {
|
|
293
|
-
'k-
|
|
294
|
-
'k-
|
|
295
|
-
'k-
|
|
296
|
-
'k-
|
|
317
|
+
'k-floating-label-container': true,
|
|
318
|
+
'k-focus': this.currentFocused,
|
|
319
|
+
'k-empty': !this.computedValue(),
|
|
320
|
+
'k-invalid': !isValid && isValid !== undefined,
|
|
297
321
|
'k-rtl': this.$props.dir === 'rtl'
|
|
298
322
|
};
|
|
299
323
|
}
|
|
@@ -681,20 +705,25 @@ var ComboBox = {
|
|
|
681
705
|
}
|
|
682
706
|
},
|
|
683
707
|
render: function render(createElement) {
|
|
708
|
+
var _a;
|
|
709
|
+
|
|
684
710
|
var _this = this;
|
|
685
711
|
|
|
686
712
|
var h = gh || createElement;
|
|
687
|
-
var
|
|
688
|
-
dir =
|
|
689
|
-
disabled =
|
|
690
|
-
clearButton =
|
|
691
|
-
label =
|
|
692
|
-
textField =
|
|
693
|
-
className =
|
|
694
|
-
style =
|
|
695
|
-
loading =
|
|
696
|
-
iconClassName =
|
|
697
|
-
virtual =
|
|
713
|
+
var _b = this.$props,
|
|
714
|
+
dir = _b.dir,
|
|
715
|
+
disabled = _b.disabled,
|
|
716
|
+
clearButton = _b.clearButton,
|
|
717
|
+
label = _b.label,
|
|
718
|
+
textField = _b.textField,
|
|
719
|
+
className = _b.className,
|
|
720
|
+
style = _b.style,
|
|
721
|
+
loading = _b.loading,
|
|
722
|
+
iconClassName = _b.iconClassName,
|
|
723
|
+
virtual = _b.virtual,
|
|
724
|
+
size = _b.size,
|
|
725
|
+
fillMode = _b.fillMode,
|
|
726
|
+
rounded = _b.rounded;
|
|
698
727
|
var focused = this.currentFocused;
|
|
699
728
|
var isValid = !this.$props.validityStyles || this.validity().valid;
|
|
700
729
|
var text = this.$props.filter !== undefined ? this.$props.filter : this.currentText;
|
|
@@ -747,13 +776,10 @@ var ComboBox = {
|
|
|
747
776
|
textField: textField,
|
|
748
777
|
valueField: dataItemKey,
|
|
749
778
|
optionsGuid: base.guid,
|
|
750
|
-
wrapperStyle:
|
|
779
|
+
wrapperStyle: {
|
|
751
780
|
maxHeight: popupSettings.height
|
|
752
|
-
} : {
|
|
753
|
-
float: 'left',
|
|
754
|
-
width: '100%'
|
|
755
781
|
},
|
|
756
|
-
wrapperCssClass:
|
|
782
|
+
wrapperCssClass: 'k-list-content',
|
|
757
783
|
listStyle: vs.enabled ? {
|
|
758
784
|
transform: translate
|
|
759
785
|
} : undefined,
|
|
@@ -769,13 +795,10 @@ var ComboBox = {
|
|
|
769
795
|
valueField: dataItemKey,
|
|
770
796
|
optionsGuid: base.guid,
|
|
771
797
|
ref: 'list',
|
|
772
|
-
wrapperStyle:
|
|
798
|
+
wrapperStyle: {
|
|
773
799
|
maxHeight: popupSettings.height
|
|
774
|
-
} : {
|
|
775
|
-
float: 'left',
|
|
776
|
-
width: '100%'
|
|
777
800
|
},
|
|
778
|
-
wrapperCssClass:
|
|
801
|
+
wrapperCssClass: 'k-list-content',
|
|
779
802
|
listStyle: vs.enabled ? {
|
|
780
803
|
transform: translate
|
|
781
804
|
} : undefined,
|
|
@@ -783,27 +806,14 @@ var ComboBox = {
|
|
|
783
806
|
skip: skip,
|
|
784
807
|
onListclick: this.handleItemClick,
|
|
785
808
|
on: this.v3 ? undefined : {
|
|
786
|
-
"listclick": this.handleItemClick
|
|
809
|
+
"listclick": this.handleItemClick,
|
|
810
|
+
"scroll": vs.scrollHandler
|
|
787
811
|
},
|
|
788
812
|
itemRender: itemRender,
|
|
789
|
-
noDataRender: listNoDataRender
|
|
790
|
-
|
|
813
|
+
noDataRender: listNoDataRender,
|
|
814
|
+
onScroll: vs.scrollHandler
|
|
815
|
+
}, [renderScrollElement.call(this)])
|
|
791
816
|
);
|
|
792
|
-
}; // Common rendering
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
var renderScrollWrapper = function renderScrollWrapper(children) {
|
|
796
|
-
return vs.enabled ? h("div", {
|
|
797
|
-
onScroll: vs.scrollHandler,
|
|
798
|
-
on: this.v3 ? undefined : {
|
|
799
|
-
"scroll": vs.scrollHandler
|
|
800
|
-
},
|
|
801
|
-
ref: 'scroller',
|
|
802
|
-
style: {
|
|
803
|
-
height: popupSettings.height,
|
|
804
|
-
overflowY: 'scroll'
|
|
805
|
-
}
|
|
806
|
-
}, [children]) : children;
|
|
807
817
|
};
|
|
808
818
|
|
|
809
819
|
var renderScrollElement = function renderScrollElement() {
|
|
@@ -816,6 +826,8 @@ var ComboBox = {
|
|
|
816
826
|
var renderListContainer = function renderListContainer() {
|
|
817
827
|
var _this2 = this;
|
|
818
828
|
|
|
829
|
+
var _a;
|
|
830
|
+
|
|
819
831
|
var headerTemplate = templateRendering.call(this, this.$props.header, getListeners.call(this));
|
|
820
832
|
var footerTemplate = templateRendering.call(this, this.$props.footer, getListeners.call(this));
|
|
821
833
|
var header = getTemplate.call(this, {
|
|
@@ -845,7 +857,8 @@ var ComboBox = {
|
|
|
845
857
|
animate: popupSettings.animate,
|
|
846
858
|
anchor: this.anchor,
|
|
847
859
|
show: opened,
|
|
848
|
-
|
|
860
|
+
popupClass: classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
|
|
861
|
+
className: popupSettings.className,
|
|
849
862
|
appendTo: popupSettings.appendTo
|
|
850
863
|
},
|
|
851
864
|
dir: dir !== undefined ? dir : this.base.dirCalculated
|
|
@@ -854,13 +867,22 @@ var ComboBox = {
|
|
|
854
867
|
animate: popupSettings.animate,
|
|
855
868
|
anchor: this.anchor,
|
|
856
869
|
show: opened,
|
|
857
|
-
|
|
870
|
+
popupClass: classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
|
|
871
|
+
className: popupSettings.className,
|
|
858
872
|
appendTo: popupSettings.appendTo
|
|
859
873
|
},
|
|
860
874
|
dir: dir !== undefined ? dir : this.base.dirCalculated
|
|
861
875
|
}, this.v3 ? function () {
|
|
862
|
-
return [header
|
|
863
|
-
|
|
876
|
+
return [header && h("div", {
|
|
877
|
+
"class": "k-list-header"
|
|
878
|
+
}, [header]), renderList.call(_this2), footer && h("div", {
|
|
879
|
+
"class": "k-list-footer"
|
|
880
|
+
}, [footer])];
|
|
881
|
+
} : [header && h("div", {
|
|
882
|
+
"class": "k-list-header"
|
|
883
|
+
}, [header]), renderList.call(_this2), footer && h("div", {
|
|
884
|
+
"class": "k-list-footer"
|
|
885
|
+
}, [footer])])
|
|
864
886
|
);
|
|
865
887
|
};
|
|
866
888
|
|
|
@@ -936,10 +958,7 @@ var ComboBox = {
|
|
|
936
958
|
};
|
|
937
959
|
|
|
938
960
|
var combobox = h("span", {
|
|
939
|
-
"class": classNames('k-
|
|
940
|
-
'k-combobox-clearable': clearButton,
|
|
941
|
-
'k-state-invalid': !isValid
|
|
942
|
-
}, className),
|
|
961
|
+
"class": classNames('k-combobox k-input', (_a = {}, _a["k-input-" + (sizeMap[size] || size)] = size, _a["k-rounded-" + (roundedMap[rounded] || rounded)] = rounded, _a["k-input-" + fillMode] = fillMode, _a['k-valid'] = isValid, _a['k-invalid'] = !isValid, _a['k-loading'] = loading, _a['k-required'] = this.required, _a['k-disabled'] = disabled, _a['k-focus'] = focused && !disabled, _a), className),
|
|
943
962
|
ref: this.v3 ? function (el) {
|
|
944
963
|
_this.kendoAnchorRef = el;
|
|
945
964
|
} : this.anchor,
|
|
@@ -950,23 +969,27 @@ var ComboBox = {
|
|
|
950
969
|
attrs: this.v3 ? undefined : {
|
|
951
970
|
dir: dir
|
|
952
971
|
}
|
|
953
|
-
}, [
|
|
954
|
-
ref: this.v3 ? function (el) {
|
|
955
|
-
_this.baseWrapperRef = el;
|
|
956
|
-
} : 'baseWrapper',
|
|
957
|
-
"class": classNames('k-dropdown-wrap', {
|
|
958
|
-
'k-state-disabled': disabled,
|
|
959
|
-
'k-state-focused': focused && !disabled
|
|
960
|
-
})
|
|
961
|
-
}, [renderSearchBar.call(this, inputText || '', id), renderClearButton && // @ts-ignore function children
|
|
972
|
+
}, [renderSearchBar.call(this, inputText || '', id), renderClearButton && !loading && // @ts-ignore function children
|
|
962
973
|
h(ClearButton, {
|
|
963
974
|
onClearclick: this.clearButtonClick,
|
|
964
975
|
on: this.v3 ? undefined : {
|
|
965
976
|
"clearclick": this.clearButtonClick
|
|
966
977
|
},
|
|
967
978
|
key: "clearbutton"
|
|
968
|
-
}), h("span", {
|
|
969
|
-
"class": "k-
|
|
979
|
+
}), loading && h("span", {
|
|
980
|
+
"class": "k-icon k-i-loading",
|
|
981
|
+
key: "loading"
|
|
982
|
+
}), // @ts-ignore
|
|
983
|
+
h(KButton, {
|
|
984
|
+
size: size,
|
|
985
|
+
attrs: this.v3 ? undefined : {
|
|
986
|
+
size: size,
|
|
987
|
+
fillMode: fillMode,
|
|
988
|
+
iconClass: classNames('k-icon k-i-arrow-s', iconClassName)
|
|
989
|
+
},
|
|
990
|
+
fillMode: fillMode,
|
|
991
|
+
"class": 'k-input-button',
|
|
992
|
+
iconClass: classNames('k-icon k-i-arrow-s', iconClassName),
|
|
970
993
|
onClick: this.toggleBtnClick,
|
|
971
994
|
on: this.v3 ? undefined : {
|
|
972
995
|
"click": this.toggleBtnClick,
|
|
@@ -977,12 +1000,7 @@ var ComboBox = {
|
|
|
977
1000
|
onMousedown: function mousedown(e) {
|
|
978
1001
|
return e.preventDefault();
|
|
979
1002
|
}
|
|
980
|
-
},
|
|
981
|
-
"class": classNames('k-icon', iconClassName, {
|
|
982
|
-
'k-i-arrow-s': !loading && !iconClassName,
|
|
983
|
-
'k-i-loading': loading && !iconClassName
|
|
984
|
-
})
|
|
985
|
-
})])]), renderListContainer.call(this)]);
|
|
1003
|
+
}), renderListContainer.call(this)]);
|
|
986
1004
|
return label ? h("span", {
|
|
987
1005
|
"class": this.spanClassNames,
|
|
988
1006
|
onFocusin: this.handleFocus,
|
|
@@ -1004,5 +1022,5 @@ var ComboBox = {
|
|
|
1004
1022
|
}, [this.$props.label]) : null]) : combobox;
|
|
1005
1023
|
}
|
|
1006
1024
|
};
|
|
1007
|
-
var
|
|
1008
|
-
export { ComboBox,
|
|
1025
|
+
var ComboBox = ComboBoxVue2;
|
|
1026
|
+
export { ComboBox, ComboBoxVue2 };
|
|
@@ -195,4 +195,43 @@ export interface ComboBoxProps extends FormComponentProps {
|
|
|
195
195
|
* Sets the footer component of the ComboBox ([see example]({% slug customrendering_combobox %}#toc-headers-and-footers)).
|
|
196
196
|
*/
|
|
197
197
|
footer?: any;
|
|
198
|
+
/**
|
|
199
|
+
* Configures the `size` of the ComboBox.
|
|
200
|
+
*
|
|
201
|
+
* The available options are:
|
|
202
|
+
* - small
|
|
203
|
+
* - medium
|
|
204
|
+
* - large
|
|
205
|
+
* - null—Does not set a size `class`.
|
|
206
|
+
*
|
|
207
|
+
* @default `medium`
|
|
208
|
+
*/
|
|
209
|
+
size?: null | 'small' | 'medium' | 'large' | string;
|
|
210
|
+
/**
|
|
211
|
+
* Configures the `roundness` of the ComboBox.
|
|
212
|
+
*
|
|
213
|
+
* The available options are:
|
|
214
|
+
* - small
|
|
215
|
+
* - medium
|
|
216
|
+
* - large
|
|
217
|
+
* - circle
|
|
218
|
+
* - full
|
|
219
|
+
* - null—Does not set a rounded `class`.
|
|
220
|
+
*
|
|
221
|
+
* @default `medium`
|
|
222
|
+
*/
|
|
223
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
|
|
224
|
+
/**
|
|
225
|
+
* Configures the `fillMode` of the ComboBox.
|
|
226
|
+
*
|
|
227
|
+
* The available options are:
|
|
228
|
+
* - solid
|
|
229
|
+
* - outline
|
|
230
|
+
* - flat
|
|
231
|
+
* - link
|
|
232
|
+
* - null—Does not set a fillMode `class`.
|
|
233
|
+
*
|
|
234
|
+
* @default `solid`
|
|
235
|
+
*/
|
|
236
|
+
fillMode?: null | 'solid' | 'outline' | 'flat' | string;
|
|
198
237
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
2
1
|
declare type DefaultData<V> = object | ((this: V) => DropDownListData);
|
|
3
2
|
declare type DefaultMethods<V> = {
|
|
4
3
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
4
|
};
|
|
6
5
|
import { FormComponentValidity } from '@progress/kendo-vue-common';
|
|
7
|
-
import { DefineComponent } from '../additionalTypes';
|
|
6
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
8
7
|
import { DropDownListProps } from './DropDownListProps';
|
|
9
8
|
import { DropDownStateBase, InternalState } from './../common/settings';
|
|
10
9
|
/**
|
|
@@ -89,11 +88,11 @@ export interface DropDownListComputed {
|
|
|
89
88
|
/**
|
|
90
89
|
* @hidden
|
|
91
90
|
*/
|
|
92
|
-
export interface DropDownListAll extends DropDownListMethods, DropDownListState, DropDownListData, DropDownListComputed,
|
|
91
|
+
export interface DropDownListAll extends DropDownListMethods, DropDownListState, DropDownListData, DropDownListComputed, Vue2type {
|
|
93
92
|
}
|
|
94
93
|
/**
|
|
95
94
|
* Represents the default `DropDownList` component.
|
|
96
95
|
*/
|
|
97
|
-
declare let
|
|
98
|
-
declare let
|
|
99
|
-
export { DropDownList,
|
|
96
|
+
declare let DropDownListVue2: ComponentOptions<Vue2type, DefaultData<DropDownListData>, DefaultMethods<DropDownListAll>, DropDownListComputed, RecordPropsDefinition<DropDownListProps>>;
|
|
97
|
+
declare let DropDownList: DefineComponent<DropDownListProps, any, DropDownListData, DropDownListComputed, DropDownListMethods, {}, {}, {}, string, DropDownListProps, DropDownListProps, {}>;
|
|
98
|
+
export { DropDownList, DropDownListVue2 };
|