@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
|
@@ -19,7 +19,7 @@ var __assign = undefined && undefined.__assign || function () {
|
|
|
19
19
|
Object.defineProperty(exports, "__esModule", {
|
|
20
20
|
value: true
|
|
21
21
|
});
|
|
22
|
-
exports.
|
|
22
|
+
exports.AutoCompleteVue2 = exports.AutoComplete = void 0; // @ts-ignore
|
|
23
23
|
|
|
24
24
|
var Vue = require("vue");
|
|
25
25
|
|
|
@@ -41,12 +41,14 @@ var utils_1 = require("../common/utils");
|
|
|
41
41
|
|
|
42
42
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
43
43
|
|
|
44
|
+
var sizeMap = kendo_vue_common_1.kendoThemeMaps.sizeMap,
|
|
45
|
+
roundedMap = kendo_vue_common_1.kendoThemeMaps.roundedMap;
|
|
44
46
|
var VALIDATION_MESSAGE = 'Please enter a valid value!';
|
|
45
47
|
/**
|
|
46
48
|
* Represents the default `AutoComplete` component.
|
|
47
49
|
*/
|
|
48
50
|
|
|
49
|
-
var
|
|
51
|
+
var AutoCompleteVue2 = {
|
|
50
52
|
name: 'KendoAutoComplete',
|
|
51
53
|
model: {
|
|
52
54
|
event: 'changemodel'
|
|
@@ -103,7 +105,6 @@ var AutoComplete = {
|
|
|
103
105
|
accessKey: String,
|
|
104
106
|
dataItems: Array,
|
|
105
107
|
textField: String,
|
|
106
|
-
className: String,
|
|
107
108
|
loading: Boolean,
|
|
108
109
|
popupSettings: {
|
|
109
110
|
type: Object,
|
|
@@ -124,7 +125,28 @@ var AutoComplete = {
|
|
|
124
125
|
default: false
|
|
125
126
|
},
|
|
126
127
|
ariaLabelledBy: String,
|
|
127
|
-
ariaDescribedBy: String
|
|
128
|
+
ariaDescribedBy: String,
|
|
129
|
+
rounded: {
|
|
130
|
+
type: String,
|
|
131
|
+
default: 'medium',
|
|
132
|
+
validator: function validator(value) {
|
|
133
|
+
return ['small', 'medium', 'large', 'full'].includes(value);
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
fillMode: {
|
|
137
|
+
type: String,
|
|
138
|
+
default: 'solid',
|
|
139
|
+
validator: function validator(value) {
|
|
140
|
+
return ['solid', 'flat', 'outline'].includes(value);
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
size: {
|
|
144
|
+
type: String,
|
|
145
|
+
default: 'medium',
|
|
146
|
+
validator: function validator(value) {
|
|
147
|
+
return ['small', 'medium', 'large'].includes(value);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
128
150
|
},
|
|
129
151
|
data: function data() {
|
|
130
152
|
return {
|
|
@@ -216,10 +238,10 @@ var AutoComplete = {
|
|
|
216
238
|
get: function get() {
|
|
217
239
|
var isValid = !this.hasMounted || !this.$props.validityStyles || this.validity().valid;
|
|
218
240
|
return {
|
|
219
|
-
'k-
|
|
220
|
-
'k-
|
|
221
|
-
'k-
|
|
222
|
-
'k-
|
|
241
|
+
'k-floating-label-container': true,
|
|
242
|
+
'k-focus': this.currentFocused,
|
|
243
|
+
'k-empty': !this.computedValue(),
|
|
244
|
+
'k-invalid': !isValid && isValid !== undefined,
|
|
223
245
|
'k-rtl': this.$props.dir === 'rtl'
|
|
224
246
|
};
|
|
225
247
|
}
|
|
@@ -478,17 +500,21 @@ var AutoComplete = {
|
|
|
478
500
|
}
|
|
479
501
|
},
|
|
480
502
|
render: function render(createElement) {
|
|
503
|
+
var _a;
|
|
504
|
+
|
|
481
505
|
var _this = this;
|
|
482
506
|
|
|
483
507
|
var h = gh || createElement;
|
|
484
|
-
var
|
|
485
|
-
dir =
|
|
486
|
-
disabled =
|
|
487
|
-
label =
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
508
|
+
var _b = this.$props,
|
|
509
|
+
dir = _b.dir,
|
|
510
|
+
disabled = _b.disabled,
|
|
511
|
+
label = _b.label,
|
|
512
|
+
size = _b.size,
|
|
513
|
+
rounded = _b.rounded,
|
|
514
|
+
fillMode = _b.fillMode,
|
|
515
|
+
style = _b.style,
|
|
516
|
+
loading = _b.loading,
|
|
517
|
+
suggest = _b.suggest;
|
|
492
518
|
var isValid = !this.$props.validityStyles || this.validity().valid;
|
|
493
519
|
var focused = this.currentFocused;
|
|
494
520
|
var base = this.base;
|
|
@@ -589,7 +615,7 @@ var AutoComplete = {
|
|
|
589
615
|
wrapperStyle: {
|
|
590
616
|
maxHeight: popupSettings.height
|
|
591
617
|
},
|
|
592
|
-
wrapperCssClass: "k-list-
|
|
618
|
+
wrapperCssClass: "k-list-content",
|
|
593
619
|
itemRender: itemRender,
|
|
594
620
|
noDataRender: listNoDataRender
|
|
595
621
|
},
|
|
@@ -605,7 +631,7 @@ var AutoComplete = {
|
|
|
605
631
|
wrapperStyle: {
|
|
606
632
|
maxHeight: popupSettings.height
|
|
607
633
|
},
|
|
608
|
-
wrapperCssClass: "k-list-
|
|
634
|
+
wrapperCssClass: "k-list-content",
|
|
609
635
|
onListclick: this.handleItemClick,
|
|
610
636
|
on: this.v3 ? undefined : {
|
|
611
637
|
"listclick": this.handleItemClick
|
|
@@ -619,6 +645,8 @@ var AutoComplete = {
|
|
|
619
645
|
var renderListContainer = function renderListContainer() {
|
|
620
646
|
var _this2 = this;
|
|
621
647
|
|
|
648
|
+
var _a;
|
|
649
|
+
|
|
622
650
|
var headerTemplate = kendo_vue_common_1.templateRendering.call(this, this.$props.header, kendo_vue_common_1.getListeners.call(this));
|
|
623
651
|
var footerTemplate = kendo_vue_common_1.templateRendering.call(this, this.$props.footer, kendo_vue_common_1.getListeners.call(this));
|
|
624
652
|
var header = kendo_vue_common_1.getTemplate.call(this, {
|
|
@@ -648,7 +676,8 @@ var AutoComplete = {
|
|
|
648
676
|
animate: popupSettings.animate,
|
|
649
677
|
anchor: this.anchor,
|
|
650
678
|
show: opened,
|
|
651
|
-
|
|
679
|
+
popupClass: kendo_vue_common_1.classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a)),
|
|
680
|
+
className: popupSettings.className,
|
|
652
681
|
appendTo: popupSettings.appendTo
|
|
653
682
|
},
|
|
654
683
|
dir: dir !== undefined ? dir : this.base.dirCalculated
|
|
@@ -658,13 +687,22 @@ var AutoComplete = {
|
|
|
658
687
|
animate: popupSettings.animate,
|
|
659
688
|
anchor: this.anchor,
|
|
660
689
|
show: opened,
|
|
661
|
-
|
|
690
|
+
popupClass: kendo_vue_common_1.classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a)),
|
|
691
|
+
className: popupSettings.className,
|
|
662
692
|
appendTo: popupSettings.appendTo
|
|
663
693
|
},
|
|
664
694
|
dir: dir !== undefined ? dir : this.base.dirCalculated
|
|
665
695
|
}, this.v3 ? function () {
|
|
666
|
-
return [header
|
|
667
|
-
|
|
696
|
+
return [header && h("div", {
|
|
697
|
+
"class": "k-list-header"
|
|
698
|
+
}, [header]), renderList.call(_this2), footer && h("div", {
|
|
699
|
+
"class": "k-list-footer"
|
|
700
|
+
}, [footer])];
|
|
701
|
+
} : [header && h("div", {
|
|
702
|
+
"class": "k-list-header"
|
|
703
|
+
}, [header]), renderList.call(_this2), footer && h("div", {
|
|
704
|
+
"class": "k-list-footer"
|
|
705
|
+
}, [footer])])
|
|
668
706
|
);
|
|
669
707
|
};
|
|
670
708
|
|
|
@@ -694,11 +732,7 @@ var AutoComplete = {
|
|
|
694
732
|
};
|
|
695
733
|
|
|
696
734
|
var autoComplete = h("span", {
|
|
697
|
-
"class": kendo_vue_common_1.classNames('k-
|
|
698
|
-
'k-state-disabled': disabled,
|
|
699
|
-
'k-state-focused': focused && !disabled,
|
|
700
|
-
'k-state-invalid': !isValid
|
|
701
|
-
}),
|
|
735
|
+
"class": kendo_vue_common_1.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)),
|
|
702
736
|
ref: this.v3 ? function (el) {
|
|
703
737
|
_this.kendoAnchorRef = el;
|
|
704
738
|
} : this.anchor,
|
|
@@ -727,6 +761,6 @@ var AutoComplete = {
|
|
|
727
761
|
}, [this.$props.label]) : null]) : autoComplete;
|
|
728
762
|
}
|
|
729
763
|
};
|
|
730
|
-
exports.
|
|
731
|
-
var
|
|
732
|
-
exports.
|
|
764
|
+
exports.AutoCompleteVue2 = AutoCompleteVue2;
|
|
765
|
+
var AutoComplete = AutoCompleteVue2;
|
|
766
|
+
exports.AutoComplete = AutoComplete;
|
|
@@ -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 };
|
|
@@ -19,7 +19,7 @@ var __assign = undefined && undefined.__assign || function () {
|
|
|
19
19
|
Object.defineProperty(exports, "__esModule", {
|
|
20
20
|
value: true
|
|
21
21
|
});
|
|
22
|
-
exports.
|
|
22
|
+
exports.ComboBoxVue2 = exports.ComboBox = void 0; // @ts-ignore
|
|
23
23
|
|
|
24
24
|
var Vue = require("vue");
|
|
25
25
|
|
|
@@ -31,6 +31,11 @@ var DropDownBase_1 = require("../common/DropDownBase");
|
|
|
31
31
|
|
|
32
32
|
var kendo_vue_common_1 = require("@progress/kendo-vue-common");
|
|
33
33
|
|
|
34
|
+
var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
|
|
35
|
+
|
|
36
|
+
var sizeMap = kendo_vue_common_1.kendoThemeMaps.sizeMap,
|
|
37
|
+
roundedMap = kendo_vue_common_1.kendoThemeMaps.roundedMap;
|
|
38
|
+
|
|
34
39
|
var utils_1 = require("../common/utils");
|
|
35
40
|
|
|
36
41
|
var SearchBar_1 = require("../common/SearchBar");
|
|
@@ -46,7 +51,7 @@ var VALIDATION_MESSAGE = 'Please enter a valid value!';
|
|
|
46
51
|
* Represents the default `ComboBox` component.
|
|
47
52
|
*/
|
|
48
53
|
|
|
49
|
-
var
|
|
54
|
+
var ComboBoxVue2 = {
|
|
50
55
|
name: 'KendoComboBox',
|
|
51
56
|
model: {
|
|
52
57
|
event: 'changemodel'
|
|
@@ -155,7 +160,28 @@ var ComboBox = {
|
|
|
155
160
|
default: true
|
|
156
161
|
},
|
|
157
162
|
ariaLabelledBy: String,
|
|
158
|
-
ariaDescribedBy: String
|
|
163
|
+
ariaDescribedBy: String,
|
|
164
|
+
rounded: {
|
|
165
|
+
type: String,
|
|
166
|
+
default: 'medium',
|
|
167
|
+
validator: function validator(value) {
|
|
168
|
+
return ['small', 'medium', 'large', 'full'].includes(value);
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
fillMode: {
|
|
172
|
+
type: String,
|
|
173
|
+
default: 'solid',
|
|
174
|
+
validator: function validator(value) {
|
|
175
|
+
return ['solid', 'flat', 'outline'].includes(value);
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
size: {
|
|
179
|
+
type: String,
|
|
180
|
+
default: 'medium',
|
|
181
|
+
validator: function validator(value) {
|
|
182
|
+
return ['small', 'medium', 'large'].includes(value);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
159
185
|
},
|
|
160
186
|
data: function data() {
|
|
161
187
|
return {
|
|
@@ -201,8 +227,8 @@ var ComboBox = {
|
|
|
201
227
|
this.hasMounted = true; // @ts-ignore
|
|
202
228
|
|
|
203
229
|
this.input = this.v3 ? this.inputRef.input : this.$refs.input.input;
|
|
204
|
-
this.base.wrapper = this.v3 ? this.
|
|
205
|
-
this.element = this.v3 ? this.
|
|
230
|
+
this.base.wrapper = this.v3 ? this.kendoAnchorRef : this.$refs[this.anchor];
|
|
231
|
+
this.element = this.v3 ? this.kendoAnchorRef : this.$refs[this.anchor];
|
|
206
232
|
this.base.didMount();
|
|
207
233
|
this.setValidity();
|
|
208
234
|
},
|
|
@@ -218,7 +244,6 @@ var ComboBox = {
|
|
|
218
244
|
var closing = prevOpened && !opened;
|
|
219
245
|
var list = this.$refs.list;
|
|
220
246
|
var scrollElement = this.$refs.scrollElement;
|
|
221
|
-
var scroller = this.$refs.scroller;
|
|
222
247
|
var selectedItem = this.computedValue();
|
|
223
248
|
this.valueOnDidUpdate = selectedItem;
|
|
224
249
|
|
|
@@ -233,8 +258,9 @@ var ComboBox = {
|
|
|
233
258
|
this.base.vs.scrollElement = scrollElement;
|
|
234
259
|
}
|
|
235
260
|
|
|
236
|
-
if (
|
|
237
|
-
|
|
261
|
+
if (list && dataItems.length) {
|
|
262
|
+
// @ts-ignore
|
|
263
|
+
this.base.vs.scrollerRef(list.$el);
|
|
238
264
|
} // @ts-ignore
|
|
239
265
|
|
|
240
266
|
|
|
@@ -305,10 +331,10 @@ var ComboBox = {
|
|
|
305
331
|
get: function get() {
|
|
306
332
|
var isValid = !this.hasMounted || !this.$props.validityStyles || this.validity().valid;
|
|
307
333
|
return {
|
|
308
|
-
'k-
|
|
309
|
-
'k-
|
|
310
|
-
'k-
|
|
311
|
-
'k-
|
|
334
|
+
'k-floating-label-container': true,
|
|
335
|
+
'k-focus': this.currentFocused,
|
|
336
|
+
'k-empty': !this.computedValue(),
|
|
337
|
+
'k-invalid': !isValid && isValid !== undefined,
|
|
312
338
|
'k-rtl': this.$props.dir === 'rtl'
|
|
313
339
|
};
|
|
314
340
|
}
|
|
@@ -696,20 +722,25 @@ var ComboBox = {
|
|
|
696
722
|
}
|
|
697
723
|
},
|
|
698
724
|
render: function render(createElement) {
|
|
725
|
+
var _a;
|
|
726
|
+
|
|
699
727
|
var _this = this;
|
|
700
728
|
|
|
701
729
|
var h = gh || createElement;
|
|
702
|
-
var
|
|
703
|
-
dir =
|
|
704
|
-
disabled =
|
|
705
|
-
clearButton =
|
|
706
|
-
label =
|
|
707
|
-
textField =
|
|
708
|
-
className =
|
|
709
|
-
style =
|
|
710
|
-
loading =
|
|
711
|
-
iconClassName =
|
|
712
|
-
virtual =
|
|
730
|
+
var _b = this.$props,
|
|
731
|
+
dir = _b.dir,
|
|
732
|
+
disabled = _b.disabled,
|
|
733
|
+
clearButton = _b.clearButton,
|
|
734
|
+
label = _b.label,
|
|
735
|
+
textField = _b.textField,
|
|
736
|
+
className = _b.className,
|
|
737
|
+
style = _b.style,
|
|
738
|
+
loading = _b.loading,
|
|
739
|
+
iconClassName = _b.iconClassName,
|
|
740
|
+
virtual = _b.virtual,
|
|
741
|
+
size = _b.size,
|
|
742
|
+
fillMode = _b.fillMode,
|
|
743
|
+
rounded = _b.rounded;
|
|
713
744
|
var focused = this.currentFocused;
|
|
714
745
|
var isValid = !this.$props.validityStyles || this.validity().valid;
|
|
715
746
|
var text = this.$props.filter !== undefined ? this.$props.filter : this.currentText;
|
|
@@ -762,13 +793,10 @@ var ComboBox = {
|
|
|
762
793
|
textField: textField,
|
|
763
794
|
valueField: dataItemKey,
|
|
764
795
|
optionsGuid: base.guid,
|
|
765
|
-
wrapperStyle:
|
|
796
|
+
wrapperStyle: {
|
|
766
797
|
maxHeight: popupSettings.height
|
|
767
|
-
} : {
|
|
768
|
-
float: 'left',
|
|
769
|
-
width: '100%'
|
|
770
798
|
},
|
|
771
|
-
wrapperCssClass:
|
|
799
|
+
wrapperCssClass: 'k-list-content',
|
|
772
800
|
listStyle: vs.enabled ? {
|
|
773
801
|
transform: translate
|
|
774
802
|
} : undefined,
|
|
@@ -784,13 +812,10 @@ var ComboBox = {
|
|
|
784
812
|
valueField: dataItemKey,
|
|
785
813
|
optionsGuid: base.guid,
|
|
786
814
|
ref: 'list',
|
|
787
|
-
wrapperStyle:
|
|
815
|
+
wrapperStyle: {
|
|
788
816
|
maxHeight: popupSettings.height
|
|
789
|
-
} : {
|
|
790
|
-
float: 'left',
|
|
791
|
-
width: '100%'
|
|
792
817
|
},
|
|
793
|
-
wrapperCssClass:
|
|
818
|
+
wrapperCssClass: 'k-list-content',
|
|
794
819
|
listStyle: vs.enabled ? {
|
|
795
820
|
transform: translate
|
|
796
821
|
} : undefined,
|
|
@@ -798,27 +823,14 @@ var ComboBox = {
|
|
|
798
823
|
skip: skip,
|
|
799
824
|
onListclick: this.handleItemClick,
|
|
800
825
|
on: this.v3 ? undefined : {
|
|
801
|
-
"listclick": this.handleItemClick
|
|
826
|
+
"listclick": this.handleItemClick,
|
|
827
|
+
"scroll": vs.scrollHandler
|
|
802
828
|
},
|
|
803
829
|
itemRender: itemRender,
|
|
804
|
-
noDataRender: listNoDataRender
|
|
805
|
-
|
|
830
|
+
noDataRender: listNoDataRender,
|
|
831
|
+
onScroll: vs.scrollHandler
|
|
832
|
+
}, [renderScrollElement.call(this)])
|
|
806
833
|
);
|
|
807
|
-
}; // Common rendering
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
var renderScrollWrapper = function renderScrollWrapper(children) {
|
|
811
|
-
return vs.enabled ? h("div", {
|
|
812
|
-
onScroll: vs.scrollHandler,
|
|
813
|
-
on: this.v3 ? undefined : {
|
|
814
|
-
"scroll": vs.scrollHandler
|
|
815
|
-
},
|
|
816
|
-
ref: 'scroller',
|
|
817
|
-
style: {
|
|
818
|
-
height: popupSettings.height,
|
|
819
|
-
overflowY: 'scroll'
|
|
820
|
-
}
|
|
821
|
-
}, [children]) : children;
|
|
822
834
|
};
|
|
823
835
|
|
|
824
836
|
var renderScrollElement = function renderScrollElement() {
|
|
@@ -831,6 +843,8 @@ var ComboBox = {
|
|
|
831
843
|
var renderListContainer = function renderListContainer() {
|
|
832
844
|
var _this2 = this;
|
|
833
845
|
|
|
846
|
+
var _a;
|
|
847
|
+
|
|
834
848
|
var headerTemplate = kendo_vue_common_1.templateRendering.call(this, this.$props.header, kendo_vue_common_1.getListeners.call(this));
|
|
835
849
|
var footerTemplate = kendo_vue_common_1.templateRendering.call(this, this.$props.footer, kendo_vue_common_1.getListeners.call(this));
|
|
836
850
|
var header = kendo_vue_common_1.getTemplate.call(this, {
|
|
@@ -860,7 +874,8 @@ var ComboBox = {
|
|
|
860
874
|
animate: popupSettings.animate,
|
|
861
875
|
anchor: this.anchor,
|
|
862
876
|
show: opened,
|
|
863
|
-
|
|
877
|
+
popupClass: kendo_vue_common_1.classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
|
|
878
|
+
className: popupSettings.className,
|
|
864
879
|
appendTo: popupSettings.appendTo
|
|
865
880
|
},
|
|
866
881
|
dir: dir !== undefined ? dir : this.base.dirCalculated
|
|
@@ -869,13 +884,22 @@ var ComboBox = {
|
|
|
869
884
|
animate: popupSettings.animate,
|
|
870
885
|
anchor: this.anchor,
|
|
871
886
|
show: opened,
|
|
872
|
-
|
|
887
|
+
popupClass: kendo_vue_common_1.classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
|
|
888
|
+
className: popupSettings.className,
|
|
873
889
|
appendTo: popupSettings.appendTo
|
|
874
890
|
},
|
|
875
891
|
dir: dir !== undefined ? dir : this.base.dirCalculated
|
|
876
892
|
}, this.v3 ? function () {
|
|
877
|
-
return [header
|
|
878
|
-
|
|
893
|
+
return [header && h("div", {
|
|
894
|
+
"class": "k-list-header"
|
|
895
|
+
}, [header]), renderList.call(_this2), footer && h("div", {
|
|
896
|
+
"class": "k-list-footer"
|
|
897
|
+
}, [footer])];
|
|
898
|
+
} : [header && h("div", {
|
|
899
|
+
"class": "k-list-header"
|
|
900
|
+
}, [header]), renderList.call(_this2), footer && h("div", {
|
|
901
|
+
"class": "k-list-footer"
|
|
902
|
+
}, [footer])])
|
|
879
903
|
);
|
|
880
904
|
};
|
|
881
905
|
|
|
@@ -951,10 +975,7 @@ var ComboBox = {
|
|
|
951
975
|
};
|
|
952
976
|
|
|
953
977
|
var combobox = h("span", {
|
|
954
|
-
"class": kendo_vue_common_1.classNames('k-
|
|
955
|
-
'k-combobox-clearable': clearButton,
|
|
956
|
-
'k-state-invalid': !isValid
|
|
957
|
-
}, className),
|
|
978
|
+
"class": kendo_vue_common_1.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),
|
|
958
979
|
ref: this.v3 ? function (el) {
|
|
959
980
|
_this.kendoAnchorRef = el;
|
|
960
981
|
} : this.anchor,
|
|
@@ -965,23 +986,27 @@ var ComboBox = {
|
|
|
965
986
|
attrs: this.v3 ? undefined : {
|
|
966
987
|
dir: dir
|
|
967
988
|
}
|
|
968
|
-
}, [
|
|
969
|
-
ref: this.v3 ? function (el) {
|
|
970
|
-
_this.baseWrapperRef = el;
|
|
971
|
-
} : 'baseWrapper',
|
|
972
|
-
"class": kendo_vue_common_1.classNames('k-dropdown-wrap', {
|
|
973
|
-
'k-state-disabled': disabled,
|
|
974
|
-
'k-state-focused': focused && !disabled
|
|
975
|
-
})
|
|
976
|
-
}, [renderSearchBar.call(this, inputText || '', id), renderClearButton && // @ts-ignore function children
|
|
989
|
+
}, [renderSearchBar.call(this, inputText || '', id), renderClearButton && !loading && // @ts-ignore function children
|
|
977
990
|
h(ClearButton_1.ClearButton, {
|
|
978
991
|
onClearclick: this.clearButtonClick,
|
|
979
992
|
on: this.v3 ? undefined : {
|
|
980
993
|
"clearclick": this.clearButtonClick
|
|
981
994
|
},
|
|
982
995
|
key: "clearbutton"
|
|
983
|
-
}), h("span", {
|
|
984
|
-
"class": "k-
|
|
996
|
+
}), loading && h("span", {
|
|
997
|
+
"class": "k-icon k-i-loading",
|
|
998
|
+
key: "loading"
|
|
999
|
+
}), // @ts-ignore
|
|
1000
|
+
h(kendo_vue_buttons_1.Button, {
|
|
1001
|
+
size: size,
|
|
1002
|
+
attrs: this.v3 ? undefined : {
|
|
1003
|
+
size: size,
|
|
1004
|
+
fillMode: fillMode,
|
|
1005
|
+
iconClass: kendo_vue_common_1.classNames('k-icon k-i-arrow-s', iconClassName)
|
|
1006
|
+
},
|
|
1007
|
+
fillMode: fillMode,
|
|
1008
|
+
"class": 'k-input-button',
|
|
1009
|
+
iconClass: kendo_vue_common_1.classNames('k-icon k-i-arrow-s', iconClassName),
|
|
985
1010
|
onClick: this.toggleBtnClick,
|
|
986
1011
|
on: this.v3 ? undefined : {
|
|
987
1012
|
"click": this.toggleBtnClick,
|
|
@@ -992,12 +1017,7 @@ var ComboBox = {
|
|
|
992
1017
|
onMousedown: function mousedown(e) {
|
|
993
1018
|
return e.preventDefault();
|
|
994
1019
|
}
|
|
995
|
-
},
|
|
996
|
-
"class": kendo_vue_common_1.classNames('k-icon', iconClassName, {
|
|
997
|
-
'k-i-arrow-s': !loading && !iconClassName,
|
|
998
|
-
'k-i-loading': loading && !iconClassName
|
|
999
|
-
})
|
|
1000
|
-
})])]), renderListContainer.call(this)]);
|
|
1020
|
+
}), renderListContainer.call(this)]);
|
|
1001
1021
|
return label ? h("span", {
|
|
1002
1022
|
"class": this.spanClassNames,
|
|
1003
1023
|
onFocusin: this.handleFocus,
|
|
@@ -1019,6 +1039,6 @@ var ComboBox = {
|
|
|
1019
1039
|
}, [this.$props.label]) : null]) : combobox;
|
|
1020
1040
|
}
|
|
1021
1041
|
};
|
|
1022
|
-
exports.
|
|
1023
|
-
var
|
|
1024
|
-
exports.
|
|
1042
|
+
exports.ComboBoxVue2 = ComboBoxVue2;
|
|
1043
|
+
var ComboBox = ComboBoxVue2;
|
|
1044
|
+
exports.ComboBox = ComboBox;
|
|
@@ -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 };
|