@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
|
@@ -19,7 +19,10 @@ import * as Vue from 'vue';
|
|
|
19
19
|
var allVue = Vue;
|
|
20
20
|
var gh = allVue.h;
|
|
21
21
|
var ref = allVue.ref;
|
|
22
|
-
import { templateRendering, getListeners, classNames, Keys, guid, noop, getTemplate } from '@progress/kendo-vue-common';
|
|
22
|
+
import { templateRendering, getListeners, classNames, Keys, guid, noop, getTemplate, kendoThemeMaps, getTabIndex } from '@progress/kendo-vue-common';
|
|
23
|
+
import { Button as KButton } from '@progress/kendo-vue-buttons';
|
|
24
|
+
var sizeMap = kendoThemeMaps.sizeMap,
|
|
25
|
+
roundedMap = kendoThemeMaps.roundedMap;
|
|
23
26
|
import { ListContainer } from '../common/ListContainer';
|
|
24
27
|
import { ListFilter } from '../common/ListFilter';
|
|
25
28
|
import { ListDefaultItem } from '../common/ListDefaultItem';
|
|
@@ -31,13 +34,14 @@ var VALIDATION_MESSAGE = 'Please select a value from the list!';
|
|
|
31
34
|
* Represents the default `DropDownList` component.
|
|
32
35
|
*/
|
|
33
36
|
|
|
34
|
-
var
|
|
37
|
+
var DropDownListVue2 = {
|
|
35
38
|
name: 'KendoDropDownList',
|
|
36
39
|
model: {
|
|
37
40
|
event: 'changemodel'
|
|
38
41
|
},
|
|
39
42
|
props: {
|
|
40
43
|
id: String,
|
|
44
|
+
title: String,
|
|
41
45
|
dataItemKey: {
|
|
42
46
|
type: [Object, String]
|
|
43
47
|
},
|
|
@@ -135,7 +139,28 @@ var DropDownList = {
|
|
|
135
139
|
default: undefined
|
|
136
140
|
},
|
|
137
141
|
ariaLabelledBy: String,
|
|
138
|
-
ariaDescribedBy: String
|
|
142
|
+
ariaDescribedBy: String,
|
|
143
|
+
rounded: {
|
|
144
|
+
type: String,
|
|
145
|
+
default: 'medium',
|
|
146
|
+
validator: function validator(value) {
|
|
147
|
+
return ['small', 'medium', 'large', 'full'].includes(value);
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
fillMode: {
|
|
151
|
+
type: String,
|
|
152
|
+
default: 'solid',
|
|
153
|
+
validator: function validator(value) {
|
|
154
|
+
return ['solid', 'flat', 'outline'].includes(value);
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
size: {
|
|
158
|
+
type: String,
|
|
159
|
+
default: 'medium',
|
|
160
|
+
validator: function validator(value) {
|
|
161
|
+
return ['small', 'medium', 'large'].includes(value);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
139
164
|
},
|
|
140
165
|
data: function data() {
|
|
141
166
|
return {
|
|
@@ -207,7 +232,7 @@ var DropDownList = {
|
|
|
207
232
|
mounted: function mounted() {
|
|
208
233
|
this.hasMounted = true;
|
|
209
234
|
this.select = this.v3 ? this.selectRef : this.$refs.select;
|
|
210
|
-
this.base.wrapper = this.v3 ? this.
|
|
235
|
+
this.base.wrapper = this.v3 ? this.kendoAnchorRef : this.$refs[this.anchor];
|
|
211
236
|
this.base.didMount();
|
|
212
237
|
this.setValidity();
|
|
213
238
|
},
|
|
@@ -304,10 +329,10 @@ var DropDownList = {
|
|
|
304
329
|
get: function get() {
|
|
305
330
|
var isValid = !this.hasMounted || !this.$props.validityStyles || this.validity().valid;
|
|
306
331
|
return {
|
|
307
|
-
'k-
|
|
308
|
-
'k-
|
|
309
|
-
'k-
|
|
310
|
-
'k-
|
|
332
|
+
'k-floating-label-container': true,
|
|
333
|
+
'k-focus': this.currentFocused,
|
|
334
|
+
'k-empty': !this.computedValue(),
|
|
335
|
+
'k-invalid': !isValid && isValid !== undefined,
|
|
311
336
|
'k-rtl': this.$props.dir === 'rtl'
|
|
312
337
|
};
|
|
313
338
|
}
|
|
@@ -685,18 +710,23 @@ var DropDownList = {
|
|
|
685
710
|
}
|
|
686
711
|
},
|
|
687
712
|
render: function render(createElement) {
|
|
713
|
+
var _a;
|
|
714
|
+
|
|
688
715
|
var _this = this;
|
|
689
716
|
|
|
690
717
|
var h = gh || createElement;
|
|
691
|
-
var
|
|
692
|
-
style =
|
|
693
|
-
className =
|
|
694
|
-
label =
|
|
695
|
-
dir =
|
|
696
|
-
|
|
697
|
-
virtual =
|
|
718
|
+
var _b = this.$props,
|
|
719
|
+
style = _b.style,
|
|
720
|
+
className = _b.className,
|
|
721
|
+
label = _b.label,
|
|
722
|
+
dir = _b.dir,
|
|
723
|
+
_c = _b.virtual,
|
|
724
|
+
virtual = _c === void 0 ? {
|
|
698
725
|
skip: 0
|
|
699
|
-
} :
|
|
726
|
+
} : _c,
|
|
727
|
+
size = _b.size,
|
|
728
|
+
rounded = _b.rounded,
|
|
729
|
+
fillMode = _b.fillMode;
|
|
700
730
|
var opened = this.$props.opened !== undefined ? this.$props.opened : this.currentOpened;
|
|
701
731
|
var text = getItemValue(this.computedValue(), this.$props.textField);
|
|
702
732
|
var isValid = !this.$props.validityStyles || this.validity().valid;
|
|
@@ -708,8 +738,35 @@ var DropDownList = {
|
|
|
708
738
|
animate: true,
|
|
709
739
|
height: '200px'
|
|
710
740
|
}, this.$props.popupSettings);
|
|
711
|
-
|
|
712
|
-
|
|
741
|
+
var _d = this.$props,
|
|
742
|
+
dataItemKey = _d.dataItemKey,
|
|
743
|
+
_e = _d.dataItems,
|
|
744
|
+
dataItems = _e === void 0 ? [] : _e,
|
|
745
|
+
disabled = _d.disabled,
|
|
746
|
+
tabIndex = _d.tabIndex,
|
|
747
|
+
loading = _d.loading,
|
|
748
|
+
iconClassName = _d.iconClassName;
|
|
749
|
+
var valueRender = templateRendering.call(this, this.$props.valueRender, getListeners.call(this));
|
|
750
|
+
var focused = this.currentFocused;
|
|
751
|
+
var value = this.computedValue();
|
|
752
|
+
var selectedIndex = dataItems.findIndex(function (i) {
|
|
753
|
+
return areSame(i, value, dataItemKey);
|
|
754
|
+
});
|
|
755
|
+
var valueDefaultRendering = h("span", {
|
|
756
|
+
"class": "k-input-inner"
|
|
757
|
+
}, [h("span", {
|
|
758
|
+
"class": "k-input-value-text"
|
|
759
|
+
}, [text])]);
|
|
760
|
+
var valueElement = getTemplate.call(this, {
|
|
761
|
+
h: h,
|
|
762
|
+
template: valueRender,
|
|
763
|
+
defaultRendering: valueDefaultRendering,
|
|
764
|
+
additionalProps: __assign({
|
|
765
|
+
value: this.computedValue()
|
|
766
|
+
}, this.$data)
|
|
767
|
+
});
|
|
768
|
+
|
|
769
|
+
var dummySelect = function dummySelect(cvalue) {
|
|
713
770
|
var _this = this;
|
|
714
771
|
/* Dummy component to support forms */
|
|
715
772
|
|
|
@@ -739,97 +796,17 @@ var DropDownList = {
|
|
|
739
796
|
left: '50%'
|
|
740
797
|
}
|
|
741
798
|
}, [h("option", {
|
|
742
|
-
value: this.v3 ? this.$props.valueMap ? this.$props.valueMap.call(undefined,
|
|
799
|
+
value: this.v3 ? this.$props.valueMap ? this.$props.valueMap.call(undefined, cvalue) : cvalue : null,
|
|
743
800
|
domProps: this.v3 ? undefined : {
|
|
744
|
-
"value": this.$props.valueMap ? this.$props.valueMap.call(undefined,
|
|
801
|
+
"value": this.$props.valueMap ? this.$props.valueMap.call(undefined, cvalue) : cvalue
|
|
745
802
|
}
|
|
746
803
|
})]);
|
|
747
804
|
};
|
|
748
805
|
|
|
749
|
-
var renderDropDownWrapper = function renderDropDownWrapper() {
|
|
750
|
-
var _this = this;
|
|
751
|
-
|
|
752
|
-
var _a = this.$props,
|
|
753
|
-
dataItemKey = _a.dataItemKey,
|
|
754
|
-
_b = _a.dataItems,
|
|
755
|
-
dataItems = _b === void 0 ? [] : _b,
|
|
756
|
-
disabled = _a.disabled,
|
|
757
|
-
tabIndex = _a.tabIndex,
|
|
758
|
-
loading = _a.loading,
|
|
759
|
-
iconClassName = _a.iconClassName;
|
|
760
|
-
var valueRender = templateRendering.call(this, this.$props.valueRender, getListeners.call(this));
|
|
761
|
-
var focused = this.currentFocused;
|
|
762
|
-
var value = this.computedValue();
|
|
763
|
-
var selectedIndex = dataItems.findIndex(function (i) {
|
|
764
|
-
return areSame(i, value, dataItemKey);
|
|
765
|
-
});
|
|
766
|
-
var valueDefaultRendering = h("span", {
|
|
767
|
-
"class": "k-input"
|
|
768
|
-
}, [text]);
|
|
769
|
-
var valueElement = getTemplate.call(this, {
|
|
770
|
-
h: h,
|
|
771
|
-
template: valueRender,
|
|
772
|
-
defaultRendering: valueDefaultRendering,
|
|
773
|
-
additionalProps: __assign({
|
|
774
|
-
value: this.computedValue()
|
|
775
|
-
}, this.$data)
|
|
776
|
-
});
|
|
777
|
-
return h("span", {
|
|
778
|
-
ref: this.v3 ? function (el) {
|
|
779
|
-
_this.baseWrapperRef = el;
|
|
780
|
-
} : 'baseWrapper',
|
|
781
|
-
role: 'listbox',
|
|
782
|
-
attrs: this.v3 ? undefined : {
|
|
783
|
-
role: 'listbox',
|
|
784
|
-
tabIndex: disabled ? undefined : tabIndex,
|
|
785
|
-
accessKey: this.$props.accessKey,
|
|
786
|
-
"aria-disabled": disabled || undefined,
|
|
787
|
-
"aria-haspopup": true,
|
|
788
|
-
"aria-expanded": opened || false,
|
|
789
|
-
"aria-owns": this.base.listBoxId,
|
|
790
|
-
"aria-activedescendant": 'option-' + this.base.guid + '-' + (selectedIndex + virtual.skip),
|
|
791
|
-
"aria-label": this.$props.label,
|
|
792
|
-
"aria-labelledby": this.$props.ariaLabelledBy,
|
|
793
|
-
"aria-describedby": this.$props.ariaDescribedBy
|
|
794
|
-
},
|
|
795
|
-
tabIndex: disabled ? undefined : tabIndex,
|
|
796
|
-
accessKey: this.$props.accessKey,
|
|
797
|
-
"class": classNames('k-dropdown-wrap', {
|
|
798
|
-
'k-state-focused': focused,
|
|
799
|
-
'k-state-disabled': disabled
|
|
800
|
-
}),
|
|
801
|
-
style: this.$props.style,
|
|
802
|
-
onKeydown: this.handleKeyDown,
|
|
803
|
-
on: this.v3 ? undefined : {
|
|
804
|
-
"keydown": this.handleKeyDown,
|
|
805
|
-
"keypress": this.handleKeyPress,
|
|
806
|
-
"click": disabled ? noop : this.handleWrapperClick
|
|
807
|
-
},
|
|
808
|
-
onKeypress: this.handleKeyPress,
|
|
809
|
-
onClick: disabled ? noop : this.handleWrapperClick,
|
|
810
|
-
"aria-disabled": disabled || undefined,
|
|
811
|
-
"aria-haspopup": true,
|
|
812
|
-
"aria-expanded": opened || false,
|
|
813
|
-
"aria-owns": this.base.listBoxId,
|
|
814
|
-
"aria-activedescendant": 'option-' + this.base.guid + '-' + (selectedIndex + virtual.skip),
|
|
815
|
-
"aria-label": this.$props.label,
|
|
816
|
-
"aria-labelledby": this.$props.ariaLabelledBy,
|
|
817
|
-
"aria-describedby": this.$props.ariaDescribedBy
|
|
818
|
-
}, [valueElement, h("span", {
|
|
819
|
-
"class": "k-select"
|
|
820
|
-
}, [h("span", {
|
|
821
|
-
"class": classNames('k-icon', iconClassName, {
|
|
822
|
-
'k-i-arrow-s': !loading && !iconClassName,
|
|
823
|
-
'k-i-loading': loading && !iconClassName
|
|
824
|
-
})
|
|
825
|
-
})]), dummySelect.call(this, value)]);
|
|
826
|
-
};
|
|
827
|
-
|
|
828
806
|
var renderDefaultItem = function renderDefaultItem() {
|
|
829
807
|
var _a = this.$props,
|
|
830
808
|
textField = _a.textField,
|
|
831
|
-
defaultItem = _a.defaultItem
|
|
832
|
-
dataItemKey = _a.dataItemKey;
|
|
809
|
+
defaultItem = _a.defaultItem;
|
|
833
810
|
return defaultItem !== undefined && // @ts-ignore
|
|
834
811
|
h(ListDefaultItem, {
|
|
835
812
|
defaultItem: defaultItem,
|
|
@@ -849,11 +826,7 @@ var DropDownList = {
|
|
|
849
826
|
};
|
|
850
827
|
|
|
851
828
|
var renderList = function renderList() {
|
|
852
|
-
var
|
|
853
|
-
_b = _a.dataItems,
|
|
854
|
-
dataItems = _b === void 0 ? [] : _b,
|
|
855
|
-
textField = _a.textField,
|
|
856
|
-
dataItemKey = _a.dataItemKey;
|
|
829
|
+
var textField = this.$props.textField;
|
|
857
830
|
var itemRender = templateRendering.call(this, this.$props.itemRender, getListeners.call(this));
|
|
858
831
|
var listNoDataRender = templateRendering.call(this, this.$props.listNoDataRender, getListeners.call(this));
|
|
859
832
|
var skip = virtual.skip;
|
|
@@ -871,12 +844,13 @@ var DropDownList = {
|
|
|
871
844
|
valueField: dataItemKey,
|
|
872
845
|
optionsGuid: this.base.guid,
|
|
873
846
|
wrapperStyle: !vs.enabled ? {
|
|
874
|
-
maxHeight: popupSettings.height
|
|
847
|
+
maxHeight: popupSettings.height,
|
|
848
|
+
overflowY: 'scroll'
|
|
875
849
|
} : {
|
|
876
850
|
float: 'left',
|
|
877
851
|
width: '100%'
|
|
878
852
|
},
|
|
879
|
-
wrapperCssClass:
|
|
853
|
+
wrapperCssClass: 'k-list-content',
|
|
880
854
|
listStyle: vs.enabled ? {
|
|
881
855
|
transform: translate
|
|
882
856
|
} : undefined,
|
|
@@ -893,12 +867,13 @@ var DropDownList = {
|
|
|
893
867
|
optionsGuid: this.base.guid,
|
|
894
868
|
ref: 'list',
|
|
895
869
|
wrapperStyle: !vs.enabled ? {
|
|
896
|
-
maxHeight: popupSettings.height
|
|
870
|
+
maxHeight: popupSettings.height,
|
|
871
|
+
overflowY: 'scroll'
|
|
897
872
|
} : {
|
|
898
873
|
float: 'left',
|
|
899
874
|
width: '100%'
|
|
900
875
|
},
|
|
901
|
-
wrapperCssClass:
|
|
876
|
+
wrapperCssClass: 'k-list-content',
|
|
902
877
|
listStyle: vs.enabled ? {
|
|
903
878
|
transform: translate
|
|
904
879
|
} : undefined,
|
|
@@ -957,6 +932,8 @@ var DropDownList = {
|
|
|
957
932
|
var renderListContainer = function renderListContainer() {
|
|
958
933
|
var _this2 = this;
|
|
959
934
|
|
|
935
|
+
var _a;
|
|
936
|
+
|
|
960
937
|
var headerTemplate = templateRendering.call(this, this.$props.header, getListeners.call(this));
|
|
961
938
|
var footerTemplate = templateRendering.call(this, this.$props.footer, getListeners.call(this));
|
|
962
939
|
var header = getTemplate.call(this, {
|
|
@@ -983,7 +960,8 @@ var DropDownList = {
|
|
|
983
960
|
width: popupWidth // @ts-ignore
|
|
984
961
|
,
|
|
985
962
|
popupSettings: {
|
|
986
|
-
|
|
963
|
+
popupClass: classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
|
|
964
|
+
className: popupSettings.className,
|
|
987
965
|
animate: popupSettings.animate,
|
|
988
966
|
anchor: this.anchor,
|
|
989
967
|
show: opened
|
|
@@ -991,7 +969,8 @@ var DropDownList = {
|
|
|
991
969
|
},
|
|
992
970
|
width: popupWidth,
|
|
993
971
|
popupSettings: {
|
|
994
|
-
|
|
972
|
+
popupClass: classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
|
|
973
|
+
className: popupSettings.className,
|
|
995
974
|
animate: popupSettings.animate,
|
|
996
975
|
anchor: this.anchor,
|
|
997
976
|
show: opened
|
|
@@ -1017,25 +996,77 @@ var DropDownList = {
|
|
|
1017
996
|
ref: this.v3 ? function (el) {
|
|
1018
997
|
_this.kendoAnchorRef = el;
|
|
1019
998
|
} : this.anchor,
|
|
1020
|
-
"class": classNames('k-
|
|
1021
|
-
'k-state-invalid': !isValid
|
|
1022
|
-
}, className),
|
|
999
|
+
"class": classNames('k-dropdownlist k-picker', className, (_a = {}, _a["k-picker-" + (sizeMap[size] || size)] = size, _a["k-rounded-" + (roundedMap[rounded] || rounded)] = rounded, _a["k-picker-" + fillMode] = fillMode, _a['k-focus'] = focused, _a['k-disabled'] = disabled, _a['k-invalid'] = !isValid, _a['k-valid'] = isValid, _a['k-loading'] = loading, _a['k-required'] = this.required, _a)),
|
|
1023
1000
|
style: !label ? style : __assign(__assign({}, style), {
|
|
1024
1001
|
width: undefined
|
|
1025
1002
|
}),
|
|
1026
1003
|
dir: dir,
|
|
1027
1004
|
attrs: this.v3 ? undefined : {
|
|
1028
|
-
dir: dir
|
|
1005
|
+
dir: dir,
|
|
1006
|
+
tabIndex: getTabIndex(tabIndex, disabled),
|
|
1007
|
+
accessKey: this.$props.accessKey,
|
|
1008
|
+
role: 'listbox',
|
|
1009
|
+
"aria-disabled": disabled || undefined,
|
|
1010
|
+
"aria-haspopup": true,
|
|
1011
|
+
"aria-expanded": opened || false,
|
|
1012
|
+
"aria-owns": this.base.listBoxId,
|
|
1013
|
+
"aria-activedescendant": opened ? 'option-' + this.base.guid + '-' + (selectedIndex + (virtual ? virtual.skip : 0)) : undefined,
|
|
1014
|
+
"aria-label": this.$props.label,
|
|
1015
|
+
"aria-labelledby": this.$props.ariaLabelledBy,
|
|
1016
|
+
"aria-describedby": this.$props.ariaDescribedBy,
|
|
1017
|
+
id: this.$props.id,
|
|
1018
|
+
title: this.$props.title
|
|
1029
1019
|
},
|
|
1030
1020
|
onMousedown: opened ? preventDefaultNonInputs : noop,
|
|
1031
1021
|
on: this.v3 ? undefined : {
|
|
1032
1022
|
"mousedown": opened ? preventDefaultNonInputs : noop,
|
|
1033
1023
|
"focusin": this.handleFocus,
|
|
1034
|
-
"focusout": this.handleBlur
|
|
1024
|
+
"focusout": this.handleBlur,
|
|
1025
|
+
"keydown": this.handleKeyDown,
|
|
1026
|
+
"keypress": this.handleKeyPress,
|
|
1027
|
+
"click": disabled ? noop : this.handleWrapperClick
|
|
1035
1028
|
},
|
|
1036
1029
|
onFocusin: this.handleFocus,
|
|
1037
|
-
onFocusout: this.handleBlur
|
|
1038
|
-
|
|
1030
|
+
onFocusout: this.handleBlur,
|
|
1031
|
+
tabIndex: getTabIndex(tabIndex, disabled),
|
|
1032
|
+
accessKey: this.$props.accessKey,
|
|
1033
|
+
onKeydown: this.handleKeyDown,
|
|
1034
|
+
onKeypress: this.handleKeyPress,
|
|
1035
|
+
role: 'listbox',
|
|
1036
|
+
onClick: disabled ? noop : this.handleWrapperClick,
|
|
1037
|
+
"aria-disabled": disabled || undefined,
|
|
1038
|
+
"aria-haspopup": true,
|
|
1039
|
+
"aria-expanded": opened || false,
|
|
1040
|
+
"aria-owns": this.base.listBoxId,
|
|
1041
|
+
"aria-activedescendant": opened ? 'option-' + this.base.guid + '-' + (selectedIndex + (virtual ? virtual.skip : 0)) : undefined,
|
|
1042
|
+
"aria-label": this.$props.label,
|
|
1043
|
+
"aria-labelledby": this.$props.ariaLabelledBy,
|
|
1044
|
+
"aria-describedby": this.$props.ariaDescribedBy,
|
|
1045
|
+
id: this.$props.id,
|
|
1046
|
+
title: this.$props.title
|
|
1047
|
+
}, [valueElement, loading && h("span", {
|
|
1048
|
+
"class": "k-icon k-i-loading",
|
|
1049
|
+
key: "loading"
|
|
1050
|
+
}), // @ts-ignore
|
|
1051
|
+
h(KButton, {
|
|
1052
|
+
size: size,
|
|
1053
|
+
attrs: this.v3 ? undefined : {
|
|
1054
|
+
size: size,
|
|
1055
|
+
fillMode: fillMode,
|
|
1056
|
+
iconClass: classNames('k-icon k-i-arrow-s', iconClassName)
|
|
1057
|
+
},
|
|
1058
|
+
fillMode: fillMode,
|
|
1059
|
+
"class": 'k-input-button',
|
|
1060
|
+
iconClass: classNames('k-icon k-i-arrow-s', iconClassName),
|
|
1061
|
+
onMousedown: function onMousedown(e) {
|
|
1062
|
+
return e.preventDefault();
|
|
1063
|
+
},
|
|
1064
|
+
on: this.v3 ? undefined : {
|
|
1065
|
+
"mousedown": function onMousedown(e) {
|
|
1066
|
+
return e.preventDefault();
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
}), dummySelect.call(this, value), renderListContainer.call(this)]);
|
|
1039
1070
|
return label ? h("span", {
|
|
1040
1071
|
"class": this.spanClassNames,
|
|
1041
1072
|
onFocusin: this.handleFocus,
|
|
@@ -1059,5 +1090,5 @@ var DropDownList = {
|
|
|
1059
1090
|
}, [this.$props.label]) : null]) : dropdownlist;
|
|
1060
1091
|
}
|
|
1061
1092
|
};
|
|
1062
|
-
var
|
|
1063
|
-
export { DropDownList,
|
|
1093
|
+
var DropDownList = DropDownListVue2;
|
|
1094
|
+
export { DropDownList, DropDownListVue2 };
|
|
@@ -44,6 +44,10 @@ export interface DropDownListProps extends FormComponentProps {
|
|
|
44
44
|
* Specifies the id of the component.
|
|
45
45
|
*/
|
|
46
46
|
id?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Specifies the title of the component.
|
|
49
|
+
*/
|
|
50
|
+
title?: string;
|
|
47
51
|
/**
|
|
48
52
|
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
49
53
|
* For example these elements could contain error or hint message.
|
|
@@ -221,4 +225,43 @@ export interface DropDownListProps extends FormComponentProps {
|
|
|
221
225
|
* Useful when the DropDownList is placed inside a toolbar which needs to handle left and right keys.
|
|
222
226
|
*/
|
|
223
227
|
leftRightKeysNavigation?: boolean;
|
|
228
|
+
/**
|
|
229
|
+
* Configures the `size` of the DropDownList.
|
|
230
|
+
*
|
|
231
|
+
* The available options are:
|
|
232
|
+
* - small
|
|
233
|
+
* - medium
|
|
234
|
+
* - large
|
|
235
|
+
* - null—Does not set a size `class`.
|
|
236
|
+
*
|
|
237
|
+
* @default `medium`
|
|
238
|
+
*/
|
|
239
|
+
size?: null | 'small' | 'medium' | 'large' | string;
|
|
240
|
+
/**
|
|
241
|
+
* Configures the `roundness` of the DropDownList.
|
|
242
|
+
*
|
|
243
|
+
* The available options are:
|
|
244
|
+
* - small
|
|
245
|
+
* - medium
|
|
246
|
+
* - large
|
|
247
|
+
* - circle
|
|
248
|
+
* - full
|
|
249
|
+
* - null—Does not set a rounded `class`.
|
|
250
|
+
*
|
|
251
|
+
* @default `medium`
|
|
252
|
+
*/
|
|
253
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
|
|
254
|
+
/**
|
|
255
|
+
* Configures the `fillMode` of the DropDownList.
|
|
256
|
+
*
|
|
257
|
+
* The available options are:
|
|
258
|
+
* - solid
|
|
259
|
+
* - outline
|
|
260
|
+
* - flat
|
|
261
|
+
* - link
|
|
262
|
+
* - null—Does not set a fillMode `class`.
|
|
263
|
+
*
|
|
264
|
+
* @default `solid`
|
|
265
|
+
*/
|
|
266
|
+
fillMode?: null | 'solid' | 'outline' | 'flat' | string;
|
|
224
267
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
2
1
|
declare type DefaultData<V> = object | ((this: V) => MultiSelectData);
|
|
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 { TagData } from './TagList';
|
|
9
8
|
import { MultiSelectProps } from './MultiSelectProps';
|
|
10
9
|
import { DropDownStateBase, InternalState, ActiveDescendant } from './../common/settings';
|
|
@@ -103,11 +102,11 @@ export interface MultiSelectComputed {
|
|
|
103
102
|
/**
|
|
104
103
|
* @hidden
|
|
105
104
|
*/
|
|
106
|
-
export interface MultiSelectAll extends MultiSelectMethods, MultiSelectState, MultiSelectData, MultiSelectComputed,
|
|
105
|
+
export interface MultiSelectAll extends MultiSelectMethods, MultiSelectState, MultiSelectData, MultiSelectComputed, Vue2type {
|
|
107
106
|
}
|
|
108
107
|
/**
|
|
109
108
|
* Represents the default `MultiSelect` component.
|
|
110
109
|
*/
|
|
111
|
-
declare let
|
|
112
|
-
declare const
|
|
113
|
-
export { MultiSelect,
|
|
110
|
+
declare let MultiSelectVue2: ComponentOptions<Vue2type, DefaultData<MultiSelectData>, DefaultMethods<MultiSelectAll>, MultiSelectComputed, RecordPropsDefinition<MultiSelectProps>>;
|
|
111
|
+
declare const MultiSelect: DefineComponent<MultiSelectProps, any, MultiSelectData, MultiSelectComputed, MultiSelectMethods, {}, {}, {}, string, MultiSelectProps, MultiSelectProps, {}>;
|
|
112
|
+
export { MultiSelect, MultiSelectVue2 };
|