@progress/kendo-vue-dropdowns 2.7.2 → 2.8.0-dev.202201121019
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 +90 -51
- package/dist/es/ComboBox/ComboBoxProps.d.ts +39 -0
- package/dist/es/DropDownList/DropDownList.d.ts +5 -6
- package/dist/es/DropDownList/DropDownList.js +152 -121
- package/dist/es/DropDownList/DropDownListProps.d.ts +43 -0
- package/dist/es/MultiSelect/MultiSelect.d.ts +5 -6
- package/dist/es/MultiSelect/MultiSelect.js +84 -47
- 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 +5 -4
- package/dist/es/common/List.js +6 -5
- 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 +4 -4
- package/dist/es/common/ListFilter.d.ts +5 -6
- package/dist/es/common/ListFilter.js +11 -7
- package/dist/es/common/ListItem.d.ts +17 -6
- package/dist/es/common/ListItem.js +38 -9
- package/dist/es/common/SearchBar.d.ts +6 -6
- package/dist/es/common/SearchBar.js +13 -13
- 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 +93 -52
- package/dist/npm/ComboBox/ComboBoxProps.d.ts +39 -0
- package/dist/npm/DropDownList/DropDownList.d.ts +5 -6
- package/dist/npm/DropDownList/DropDownList.js +155 -122
- package/dist/npm/DropDownList/DropDownListProps.d.ts +43 -0
- package/dist/npm/MultiSelect/MultiSelect.d.ts +5 -6
- package/dist/npm/MultiSelect/MultiSelect.js +86 -48
- 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 +5 -4
- package/dist/npm/common/List.js +7 -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 +6 -6
- package/dist/npm/common/ListFilter.d.ts +5 -6
- package/dist/npm/common/ListFilter.js +13 -9
- package/dist/npm/common/ListItem.d.ts +17 -6
- package/dist/npm/common/ListItem.js +39 -10
- package/dist/npm/common/SearchBar.d.ts +6 -6
- package/dist/npm/common/SearchBar.js +15 -15
- 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
|
},
|
|
@@ -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;
|
|
@@ -748,12 +777,13 @@ var ComboBox = {
|
|
|
748
777
|
valueField: dataItemKey,
|
|
749
778
|
optionsGuid: base.guid,
|
|
750
779
|
wrapperStyle: !vs.enabled ? {
|
|
751
|
-
maxHeight: popupSettings.height
|
|
780
|
+
maxHeight: popupSettings.height,
|
|
781
|
+
overflowY: 'scroll'
|
|
752
782
|
} : {
|
|
753
783
|
float: 'left',
|
|
754
784
|
width: '100%'
|
|
755
785
|
},
|
|
756
|
-
wrapperCssClass:
|
|
786
|
+
wrapperCssClass: 'k-list-content',
|
|
757
787
|
listStyle: vs.enabled ? {
|
|
758
788
|
transform: translate
|
|
759
789
|
} : undefined,
|
|
@@ -770,12 +800,13 @@ var ComboBox = {
|
|
|
770
800
|
optionsGuid: base.guid,
|
|
771
801
|
ref: 'list',
|
|
772
802
|
wrapperStyle: !vs.enabled ? {
|
|
773
|
-
maxHeight: popupSettings.height
|
|
803
|
+
maxHeight: popupSettings.height,
|
|
804
|
+
overflowY: 'scroll'
|
|
774
805
|
} : {
|
|
775
806
|
float: 'left',
|
|
776
807
|
width: '100%'
|
|
777
808
|
},
|
|
778
|
-
wrapperCssClass:
|
|
809
|
+
wrapperCssClass: 'k-list-content',
|
|
779
810
|
listStyle: vs.enabled ? {
|
|
780
811
|
transform: translate
|
|
781
812
|
} : undefined,
|
|
@@ -816,6 +847,8 @@ var ComboBox = {
|
|
|
816
847
|
var renderListContainer = function renderListContainer() {
|
|
817
848
|
var _this2 = this;
|
|
818
849
|
|
|
850
|
+
var _a;
|
|
851
|
+
|
|
819
852
|
var headerTemplate = templateRendering.call(this, this.$props.header, getListeners.call(this));
|
|
820
853
|
var footerTemplate = templateRendering.call(this, this.$props.footer, getListeners.call(this));
|
|
821
854
|
var header = getTemplate.call(this, {
|
|
@@ -845,7 +878,8 @@ var ComboBox = {
|
|
|
845
878
|
animate: popupSettings.animate,
|
|
846
879
|
anchor: this.anchor,
|
|
847
880
|
show: opened,
|
|
848
|
-
|
|
881
|
+
popupClass: classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
|
|
882
|
+
className: popupSettings.className,
|
|
849
883
|
appendTo: popupSettings.appendTo
|
|
850
884
|
},
|
|
851
885
|
dir: dir !== undefined ? dir : this.base.dirCalculated
|
|
@@ -854,13 +888,22 @@ var ComboBox = {
|
|
|
854
888
|
animate: popupSettings.animate,
|
|
855
889
|
anchor: this.anchor,
|
|
856
890
|
show: opened,
|
|
857
|
-
|
|
891
|
+
popupClass: classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
|
|
892
|
+
className: popupSettings.className,
|
|
858
893
|
appendTo: popupSettings.appendTo
|
|
859
894
|
},
|
|
860
895
|
dir: dir !== undefined ? dir : this.base.dirCalculated
|
|
861
896
|
}, this.v3 ? function () {
|
|
862
|
-
return [header
|
|
863
|
-
|
|
897
|
+
return [header && h("div", {
|
|
898
|
+
"class": "k-list-header"
|
|
899
|
+
}, [header]), renderScrollWrapper.call(_this2, [renderList.call(_this2), renderScrollElement.call(_this2)]), footer && h("div", {
|
|
900
|
+
"class": "k-list-footer"
|
|
901
|
+
}, [footer])];
|
|
902
|
+
} : [header && h("div", {
|
|
903
|
+
"class": "k-list-header"
|
|
904
|
+
}, [header]), renderScrollWrapper.call(_this2, [renderList.call(_this2), renderScrollElement.call(_this2)]), footer && h("div", {
|
|
905
|
+
"class": "k-list-footer"
|
|
906
|
+
}, [footer])])
|
|
864
907
|
);
|
|
865
908
|
};
|
|
866
909
|
|
|
@@ -936,10 +979,7 @@ var ComboBox = {
|
|
|
936
979
|
};
|
|
937
980
|
|
|
938
981
|
var combobox = h("span", {
|
|
939
|
-
"class": classNames('k-
|
|
940
|
-
'k-combobox-clearable': clearButton,
|
|
941
|
-
'k-state-invalid': !isValid
|
|
942
|
-
}, className),
|
|
982
|
+
"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
983
|
ref: this.v3 ? function (el) {
|
|
944
984
|
_this.kendoAnchorRef = el;
|
|
945
985
|
} : this.anchor,
|
|
@@ -950,23 +990,27 @@ var ComboBox = {
|
|
|
950
990
|
attrs: this.v3 ? undefined : {
|
|
951
991
|
dir: dir
|
|
952
992
|
}
|
|
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
|
|
993
|
+
}, [renderSearchBar.call(this, inputText || '', id), renderClearButton && !loading && // @ts-ignore function children
|
|
962
994
|
h(ClearButton, {
|
|
963
995
|
onClearclick: this.clearButtonClick,
|
|
964
996
|
on: this.v3 ? undefined : {
|
|
965
997
|
"clearclick": this.clearButtonClick
|
|
966
998
|
},
|
|
967
999
|
key: "clearbutton"
|
|
968
|
-
}), h("span", {
|
|
969
|
-
"class": "k-
|
|
1000
|
+
}), loading && h("span", {
|
|
1001
|
+
"class": "k-icon k-i-loading",
|
|
1002
|
+
key: "loading"
|
|
1003
|
+
}), // @ts-ignore
|
|
1004
|
+
h(KButton, {
|
|
1005
|
+
size: size,
|
|
1006
|
+
attrs: this.v3 ? undefined : {
|
|
1007
|
+
size: size,
|
|
1008
|
+
fillMode: fillMode,
|
|
1009
|
+
iconClass: classNames('k-icon k-i-arrow-s', iconClassName)
|
|
1010
|
+
},
|
|
1011
|
+
fillMode: fillMode,
|
|
1012
|
+
"class": 'k-input-button',
|
|
1013
|
+
iconClass: classNames('k-icon k-i-arrow-s', iconClassName),
|
|
970
1014
|
onClick: this.toggleBtnClick,
|
|
971
1015
|
on: this.v3 ? undefined : {
|
|
972
1016
|
"click": this.toggleBtnClick,
|
|
@@ -977,12 +1021,7 @@ var ComboBox = {
|
|
|
977
1021
|
onMousedown: function mousedown(e) {
|
|
978
1022
|
return e.preventDefault();
|
|
979
1023
|
}
|
|
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)]);
|
|
1024
|
+
}), renderListContainer.call(this)]);
|
|
986
1025
|
return label ? h("span", {
|
|
987
1026
|
"class": this.spanClassNames,
|
|
988
1027
|
onFocusin: this.handleFocus,
|
|
@@ -1004,5 +1043,5 @@ var ComboBox = {
|
|
|
1004
1043
|
}, [this.$props.label]) : null]) : combobox;
|
|
1005
1044
|
}
|
|
1006
1045
|
};
|
|
1007
|
-
var
|
|
1008
|
-
export { ComboBox,
|
|
1046
|
+
var ComboBox = ComboBoxVue2;
|
|
1047
|
+
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 };
|