@progress/kendo-vue-dropdowns 2.7.3 → 2.8.0-dev.202201111325
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 +4 -3
- 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 +4 -6
- package/dist/es/common/ListItem.d.ts +5 -6
- package/dist/es/common/ListItem.js +14 -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 +5 -3
- 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 +6 -8
- package/dist/npm/common/ListItem.d.ts +5 -6
- package/dist/npm/common/ListItem.js +15 -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
|
@@ -33,7 +33,9 @@ import * as Vue from 'vue';
|
|
|
33
33
|
var allVue = Vue;
|
|
34
34
|
var gh = allVue.h;
|
|
35
35
|
var ref = allVue.ref;
|
|
36
|
-
import { classNames, Keys, guid, templateRendering, getListeners, getTemplate } from '@progress/kendo-vue-common';
|
|
36
|
+
import { classNames, Keys, guid, templateRendering, getListeners, getTemplate, kendoThemeMaps } from '@progress/kendo-vue-common';
|
|
37
|
+
var sizeMap = kendoThemeMaps.sizeMap,
|
|
38
|
+
roundedMap = kendoThemeMaps.roundedMap;
|
|
37
39
|
import { ListContainer } from '../common/ListContainer';
|
|
38
40
|
import { List } from '../common/List';
|
|
39
41
|
import { TagList } from './TagList';
|
|
@@ -72,7 +74,7 @@ var FocusedItemType;
|
|
|
72
74
|
*/
|
|
73
75
|
|
|
74
76
|
|
|
75
|
-
var
|
|
77
|
+
var MultiSelectVue2 = {
|
|
76
78
|
name: 'KendoMultiSelect',
|
|
77
79
|
model: {
|
|
78
80
|
event: 'changemodel'
|
|
@@ -150,7 +152,35 @@ var MultiSelect = {
|
|
|
150
152
|
default: undefined
|
|
151
153
|
},
|
|
152
154
|
ariaLabelledBy: String,
|
|
153
|
-
ariaDescribedBy: String
|
|
155
|
+
ariaDescribedBy: String,
|
|
156
|
+
rounded: {
|
|
157
|
+
type: String,
|
|
158
|
+
default: 'medium',
|
|
159
|
+
validator: function validator(value) {
|
|
160
|
+
return ['small', 'medium', 'large', 'full'].includes(value);
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
tagsRounded: {
|
|
164
|
+
type: String,
|
|
165
|
+
default: 'medium',
|
|
166
|
+
validator: function validator(value) {
|
|
167
|
+
return ['small', 'medium', 'large', 'full'].includes(value);
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
fillMode: {
|
|
171
|
+
type: String,
|
|
172
|
+
default: 'solid',
|
|
173
|
+
validator: function validator(value) {
|
|
174
|
+
return ['solid', 'flat', 'outline'].includes(value);
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
size: {
|
|
178
|
+
type: String,
|
|
179
|
+
default: 'medium',
|
|
180
|
+
validator: function validator(value) {
|
|
181
|
+
return ['small', 'medium', 'large'].includes(value);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
154
184
|
},
|
|
155
185
|
// @ts-ignore
|
|
156
186
|
setup: !gh ? undefined : function () {
|
|
@@ -169,10 +199,10 @@ var MultiSelect = {
|
|
|
169
199
|
var isValid = !this.hasMounted || !this.$props.validityStyles || this.validity().valid;
|
|
170
200
|
var editorValue = this.currentText || getItemValue(this.computedValue()[0], this.$props.textField);
|
|
171
201
|
return {
|
|
172
|
-
'k-
|
|
173
|
-
'k-
|
|
174
|
-
'k-
|
|
175
|
-
'k-
|
|
202
|
+
'k-floating-label-container': true,
|
|
203
|
+
'k-focus': this.currentFocused,
|
|
204
|
+
'k-empty': !(editorValue && editorValue !== 0),
|
|
205
|
+
'k-invalid': !isValid && isValid !== undefined,
|
|
176
206
|
'k-rtl': this.$props.dir === 'rtl'
|
|
177
207
|
};
|
|
178
208
|
}
|
|
@@ -279,7 +309,7 @@ var MultiSelect = {
|
|
|
279
309
|
this.hasMounted = true; // @ts-ignore
|
|
280
310
|
|
|
281
311
|
this.input = this.v3 ? this.inputRef.input : this.$refs.input.input;
|
|
282
|
-
this.base.wrapper = this.v3 ? this.
|
|
312
|
+
this.base.wrapper = this.v3 ? this.kendoAnchorRef : this.$refs[this.anchor];
|
|
283
313
|
this.element = this.v3 ? this.kendoAnchorRef : this.$refs[this.anchor];
|
|
284
314
|
this.base.didMount();
|
|
285
315
|
this.searchBarRef();
|
|
@@ -823,19 +853,25 @@ var MultiSelect = {
|
|
|
823
853
|
}
|
|
824
854
|
},
|
|
825
855
|
render: function render(createElement) {
|
|
856
|
+
var _a;
|
|
857
|
+
|
|
826
858
|
var _this = this;
|
|
827
859
|
|
|
828
860
|
var h = gh || createElement;
|
|
829
|
-
var
|
|
830
|
-
style =
|
|
831
|
-
label =
|
|
832
|
-
dir =
|
|
833
|
-
disabled =
|
|
834
|
-
tags =
|
|
835
|
-
textField =
|
|
836
|
-
dataItemKey =
|
|
837
|
-
virtual =
|
|
838
|
-
loading =
|
|
861
|
+
var _b = this.$props,
|
|
862
|
+
style = _b.style,
|
|
863
|
+
label = _b.label,
|
|
864
|
+
dir = _b.dir,
|
|
865
|
+
disabled = _b.disabled,
|
|
866
|
+
tags = _b.tags,
|
|
867
|
+
textField = _b.textField,
|
|
868
|
+
dataItemKey = _b.dataItemKey,
|
|
869
|
+
virtual = _b.virtual,
|
|
870
|
+
loading = _b.loading,
|
|
871
|
+
size = _b.size,
|
|
872
|
+
fillMode = _b.fillMode,
|
|
873
|
+
rounded = _b.rounded,
|
|
874
|
+
tagsRounded = _b.tagsRounded;
|
|
839
875
|
var focused = this.currentFocused;
|
|
840
876
|
var popupSettings = Object.assign({}, {
|
|
841
877
|
animate: true,
|
|
@@ -974,9 +1010,10 @@ var MultiSelect = {
|
|
|
974
1010
|
float: 'left',
|
|
975
1011
|
width: '100%'
|
|
976
1012
|
} : {
|
|
977
|
-
maxHeight: popupSettings.height
|
|
1013
|
+
maxHeight: popupSettings.height,
|
|
1014
|
+
overflowY: 'scroll'
|
|
978
1015
|
},
|
|
979
|
-
wrapperCssClass:
|
|
1016
|
+
wrapperCssClass: 'k-list-content',
|
|
980
1017
|
listStyle: vs.enabled ? {
|
|
981
1018
|
transform: translate
|
|
982
1019
|
} : undefined,
|
|
@@ -996,9 +1033,10 @@ var MultiSelect = {
|
|
|
996
1033
|
float: 'left',
|
|
997
1034
|
width: '100%'
|
|
998
1035
|
} : {
|
|
999
|
-
maxHeight: popupSettings.height
|
|
1036
|
+
maxHeight: popupSettings.height,
|
|
1037
|
+
overflowY: 'scroll'
|
|
1000
1038
|
},
|
|
1001
|
-
wrapperCssClass:
|
|
1039
|
+
wrapperCssClass: 'k-list-content',
|
|
1002
1040
|
listStyle: vs.enabled ? {
|
|
1003
1041
|
transform: translate
|
|
1004
1042
|
} : undefined,
|
|
@@ -1039,11 +1077,13 @@ var MultiSelect = {
|
|
|
1039
1077
|
var renderListContainer = function renderListContainer() {
|
|
1040
1078
|
var _this2 = this;
|
|
1041
1079
|
|
|
1080
|
+
var _a;
|
|
1081
|
+
|
|
1042
1082
|
var base = this.base;
|
|
1043
|
-
var
|
|
1044
|
-
allowCustom =
|
|
1045
|
-
|
|
1046
|
-
dataItems =
|
|
1083
|
+
var _b = this.$props,
|
|
1084
|
+
allowCustom = _b.allowCustom,
|
|
1085
|
+
_c = _b.dataItems,
|
|
1086
|
+
dataItems = _c === void 0 ? [] : _c;
|
|
1047
1087
|
var headerTemplate = templateRendering.call(this, this.$props.header, getListeners.call(this));
|
|
1048
1088
|
var footerTemplate = templateRendering.call(this, this.$props.footer, getListeners.call(this));
|
|
1049
1089
|
var header = getTemplate.call(this, {
|
|
@@ -1067,7 +1107,7 @@ var MultiSelect = {
|
|
|
1067
1107
|
}
|
|
1068
1108
|
}, [h("div", {
|
|
1069
1109
|
"class": classNames('k-item k-custom-item', {
|
|
1070
|
-
'k-
|
|
1110
|
+
'k-focus': isCustom(focusedType)
|
|
1071
1111
|
})
|
|
1072
1112
|
}, [currentText, h("span", {
|
|
1073
1113
|
"class": "k-icon k-i-plus",
|
|
@@ -1093,7 +1133,8 @@ var MultiSelect = {
|
|
|
1093
1133
|
show: opened,
|
|
1094
1134
|
onOpen: this.onPopupOpened,
|
|
1095
1135
|
onClose: this.onPopupClosed,
|
|
1096
|
-
|
|
1136
|
+
popupClass: classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
|
|
1137
|
+
className: popupSettings.className,
|
|
1097
1138
|
appendTo: popupSettings.appendTo
|
|
1098
1139
|
},
|
|
1099
1140
|
itemsCount: dataItems.length
|
|
@@ -1106,7 +1147,8 @@ var MultiSelect = {
|
|
|
1106
1147
|
show: opened,
|
|
1107
1148
|
onOpen: this.onPopupOpened,
|
|
1108
1149
|
onClose: this.onPopupClosed,
|
|
1109
|
-
|
|
1150
|
+
popupClass: classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
|
|
1151
|
+
className: popupSettings.className,
|
|
1110
1152
|
appendTo: popupSettings.appendTo
|
|
1111
1153
|
},
|
|
1112
1154
|
itemsCount: dataItems.length
|
|
@@ -1120,11 +1162,7 @@ var MultiSelect = {
|
|
|
1120
1162
|
ref: this.v3 ? function (el) {
|
|
1121
1163
|
_this.kendoAnchorRef = el;
|
|
1122
1164
|
} : this.anchor,
|
|
1123
|
-
"class": classNames('k-
|
|
1124
|
-
'k-state-focused': focused && !disabled,
|
|
1125
|
-
'k-state-invalid': !isValid,
|
|
1126
|
-
'k-state-disabled': disabled
|
|
1127
|
-
}),
|
|
1165
|
+
"class": classNames('k-multiselect', 'k-input', (_a = {}, _a["k-input-" + (sizeMap[size] || size)] = size, _a["k-rounded-" + (roundedMap[rounded] || rounded)] = rounded, _a["k-input-" + fillMode] = fillMode, _a['k-focus'] = focused && !disabled, _a['k-disabled'] = disabled, _a['k-invalid'] = !isValid, _a['k-valid'] = isValid, _a['k-loading'] = loading, _a['k-required'] = this.required, _a)),
|
|
1128
1166
|
style: !label ? style : __assign(__assign({}, style), {
|
|
1129
1167
|
width: undefined
|
|
1130
1168
|
}),
|
|
@@ -1134,23 +1172,19 @@ var MultiSelect = {
|
|
|
1134
1172
|
},
|
|
1135
1173
|
onFocusin: this.handleFocus,
|
|
1136
1174
|
on: this.v3 ? undefined : {
|
|
1137
|
-
"focusin": this.handleFocus
|
|
1138
|
-
}
|
|
1139
|
-
}, [h("div", {
|
|
1140
|
-
onClick: this.handleWrapperClick,
|
|
1141
|
-
on: this.v3 ? undefined : {
|
|
1175
|
+
"focusin": this.handleFocus,
|
|
1142
1176
|
"click": this.handleWrapperClick,
|
|
1143
1177
|
"mousedown": preventDefaultNonInputs
|
|
1144
1178
|
},
|
|
1145
|
-
|
|
1146
|
-
_this.baseWrapperRef = el;
|
|
1147
|
-
} : 'baseWrapper',
|
|
1148
|
-
"class": "k-multiselect-wrap k-floatwrap",
|
|
1179
|
+
onClick: this.handleWrapperClick,
|
|
1149
1180
|
onMousedown: preventDefaultNonInputs
|
|
1150
1181
|
}, [tagsToRender.length > 0 && // @ts-ignore function children
|
|
1151
1182
|
h(TagList, {
|
|
1152
|
-
|
|
1183
|
+
tagsRounded: tagsRounded,
|
|
1153
1184
|
attrs: this.v3 ? undefined : {
|
|
1185
|
+
tagsRounded: tagsRounded,
|
|
1186
|
+
size: size,
|
|
1187
|
+
fillMode: fillMode,
|
|
1154
1188
|
tagRender: tagRender,
|
|
1155
1189
|
dataItems: tagsToRender,
|
|
1156
1190
|
guid: this.base.guid,
|
|
@@ -1158,6 +1192,9 @@ var MultiSelect = {
|
|
|
1158
1192
|
return matchTags(t, focusedTag, dataItemKey);
|
|
1159
1193
|
}) : undefined
|
|
1160
1194
|
},
|
|
1195
|
+
size: size,
|
|
1196
|
+
fillMode: fillMode,
|
|
1197
|
+
tagRender: tagRender,
|
|
1161
1198
|
onTagdelete: this.onTagDelete,
|
|
1162
1199
|
on: this.v3 ? undefined : {
|
|
1163
1200
|
"tagdelete": this.onTagDelete
|
|
@@ -1167,7 +1204,7 @@ var MultiSelect = {
|
|
|
1167
1204
|
focused: focusedTag ? tagsToRender.find(function (t) {
|
|
1168
1205
|
return matchTags(t, focusedTag, dataItemKey);
|
|
1169
1206
|
}) : undefined
|
|
1170
|
-
}), renderSearchBar.call(this, id), renderClearButton.call(this, clearButton), renderLoading.call(this, loading)
|
|
1207
|
+
}), renderSearchBar.call(this, id), renderClearButton.call(this, clearButton), renderLoading.call(this, loading), renderListContainer.call(this)]);
|
|
1171
1208
|
return label ? h("span", {
|
|
1172
1209
|
"class": this.spanClassNames,
|
|
1173
1210
|
dir: this.$props.dir,
|
|
@@ -1185,5 +1222,5 @@ var MultiSelect = {
|
|
|
1185
1222
|
}, [this.$props.label]) : null]) : component;
|
|
1186
1223
|
}
|
|
1187
1224
|
};
|
|
1188
|
-
var
|
|
1189
|
-
export { MultiSelect,
|
|
1225
|
+
var MultiSelect = MultiSelectVue2;
|
|
1226
|
+
export { MultiSelect, MultiSelectVue2 };
|
|
@@ -199,4 +199,57 @@ export interface MultiSelectProps extends FormComponentProps {
|
|
|
199
199
|
* Sets the footer component of the MultiSelect ([see example]({% slug customrendering_multiselect %}#toc-headers-and-footers)).
|
|
200
200
|
*/
|
|
201
201
|
footer?: any;
|
|
202
|
+
/**
|
|
203
|
+
* Configures the `size` of the MultiSelect.
|
|
204
|
+
*
|
|
205
|
+
* The available options are:
|
|
206
|
+
* - small
|
|
207
|
+
* - medium
|
|
208
|
+
* - large
|
|
209
|
+
* - null—Does not set a size `class`.
|
|
210
|
+
*
|
|
211
|
+
* @default `medium`
|
|
212
|
+
*/
|
|
213
|
+
size?: null | 'small' | 'medium' | 'large' | string;
|
|
214
|
+
/**
|
|
215
|
+
* Configures the `roundness` of the MultiSelect.
|
|
216
|
+
*
|
|
217
|
+
* The available options are:
|
|
218
|
+
* - small
|
|
219
|
+
* - medium
|
|
220
|
+
* - large
|
|
221
|
+
* - circle
|
|
222
|
+
* - full
|
|
223
|
+
* - null—Does not set a rounded `class`.
|
|
224
|
+
*
|
|
225
|
+
* @default `medium`
|
|
226
|
+
*/
|
|
227
|
+
rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
|
|
228
|
+
/**
|
|
229
|
+
* Configures the `roundness` of the tags in MultiSelect.
|
|
230
|
+
*
|
|
231
|
+
* The available options are:
|
|
232
|
+
* - small
|
|
233
|
+
* - medium
|
|
234
|
+
* - large
|
|
235
|
+
* - circle
|
|
236
|
+
* - full
|
|
237
|
+
* - null—Does not set a rounded `class`.
|
|
238
|
+
*
|
|
239
|
+
* @default `medium`
|
|
240
|
+
*/
|
|
241
|
+
tagsRounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
|
|
242
|
+
/**
|
|
243
|
+
* Configures the `fillMode` of the MultiSelect.
|
|
244
|
+
*
|
|
245
|
+
* The available options are:
|
|
246
|
+
* - solid
|
|
247
|
+
* - outline
|
|
248
|
+
* - flat
|
|
249
|
+
* - link
|
|
250
|
+
* - null—Does not set a fillMode `class`.
|
|
251
|
+
*
|
|
252
|
+
* @default `solid`
|
|
253
|
+
*/
|
|
254
|
+
fillMode?: null | 'solid' | 'outline' | 'flat' | string;
|
|
202
255
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RecordPropsDefinition, ComponentOptions } from '
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
2
2
|
declare type DefaultData<V> = object | ((this: V) => TagListAll);
|
|
3
3
|
declare type DefaultMethods<V> = {
|
|
4
4
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
@@ -24,11 +24,14 @@ export interface TagListProps {
|
|
|
24
24
|
guid: string;
|
|
25
25
|
focused?: TagData;
|
|
26
26
|
tagRender?: any;
|
|
27
|
+
size?: null | 'small' | 'medium' | 'large' | string;
|
|
28
|
+
fillMode?: null | 'solid' | 'outline' | 'flat' | string;
|
|
29
|
+
tagsRounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
|
|
27
30
|
}
|
|
28
31
|
/**
|
|
29
32
|
* @hidden
|
|
30
33
|
*/
|
|
31
|
-
export interface TagListMethods extends
|
|
34
|
+
export interface TagListMethods extends Vue2type {
|
|
32
35
|
[key: string]: any;
|
|
33
36
|
onTagDelete: (data: any, e: any) => void;
|
|
34
37
|
}
|
|
@@ -40,5 +43,6 @@ export interface TagListAll extends TagListMethods {
|
|
|
40
43
|
/**
|
|
41
44
|
* Represents the default `TagList` component.
|
|
42
45
|
*/
|
|
43
|
-
declare let
|
|
44
|
-
|
|
46
|
+
declare let TagListVue2: ComponentOptions<Vue2type, DefaultData<TagListAll>, DefaultMethods<TagListAll>, {}, RecordPropsDefinition<TagListProps>>;
|
|
47
|
+
declare const TagList: DefineComponent<{}, any, {}, {}, TagListMethods, {}, {}, {}, string, {}, {}, {}>;
|
|
48
|
+
export { TagList, TagListVue2 };
|
|
@@ -15,13 +15,11 @@ var __assign = this && this.__assign || function () {
|
|
|
15
15
|
}; // @ts-ignore
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
import { getTemplate } from '@progress/kendo-vue-common';
|
|
18
|
+
import { getTemplate, kendoThemeMaps } from '@progress/kendo-vue-common';
|
|
19
19
|
import * as Vue from 'vue';
|
|
20
20
|
var allVue = Vue;
|
|
21
21
|
var gh = allVue.h;
|
|
22
22
|
var ref = allVue.ref;
|
|
23
|
-
var tagClassName = 'k-button';
|
|
24
|
-
var focusedTagClassName = tagClassName + ' k-state-focused';
|
|
25
23
|
|
|
26
24
|
var preventDefault = function preventDefault(event) {
|
|
27
25
|
return event.preventDefault();
|
|
@@ -35,13 +33,59 @@ var stopPropagation = function stopPropagation(event) {
|
|
|
35
33
|
*/
|
|
36
34
|
|
|
37
35
|
|
|
38
|
-
var
|
|
36
|
+
var TagListVue2 = {
|
|
39
37
|
name: 'TagList',
|
|
40
38
|
props: {
|
|
41
39
|
dataItems: Array,
|
|
42
40
|
guid: String,
|
|
43
41
|
focused: Object,
|
|
44
|
-
tagRender: [String, Function, Object]
|
|
42
|
+
tagRender: [String, Function, Object],
|
|
43
|
+
tagsRounded: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: 'medium',
|
|
46
|
+
validator: function validator(value) {
|
|
47
|
+
return ['small', 'medium', 'large', 'full'].includes(value);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
fillMode: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: 'solid',
|
|
53
|
+
validator: function validator(value) {
|
|
54
|
+
return ['solid', 'flat', 'outline'].includes(value);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
size: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: 'medium',
|
|
60
|
+
validator: function validator(value) {
|
|
61
|
+
return ['small', 'medium', 'large'].includes(value);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
computed: {
|
|
66
|
+
wrapperClass: function wrapperClass() {
|
|
67
|
+
var _a;
|
|
68
|
+
|
|
69
|
+
var _b = this.$props,
|
|
70
|
+
size = _b.size,
|
|
71
|
+
disabled = _b.disabled;
|
|
72
|
+
return _a = {
|
|
73
|
+
'k-chip-list': true
|
|
74
|
+
}, _a["k-chip-list-" + (kendoThemeMaps.sizeMap[size] || size)] = size, _a['k-selection-single'] = true, _a['k-disabled'] = disabled, _a;
|
|
75
|
+
},
|
|
76
|
+
chipClass: function chipClass() {
|
|
77
|
+
var _a;
|
|
78
|
+
|
|
79
|
+
var _b = this.$props,
|
|
80
|
+
size = _b.size,
|
|
81
|
+
disabled = _b.disabled,
|
|
82
|
+
tagsRounded = _b.tagsRounded,
|
|
83
|
+
fillMode = _b.fillMode;
|
|
84
|
+
return _a = {
|
|
85
|
+
'k-chip': true,
|
|
86
|
+
'k-disabled': disabled
|
|
87
|
+
}, _a["k-chip-" + (kendoThemeMaps.sizeMap[size] || size)] = size, _a["k-rounded-" + (kendoThemeMaps.roundedMap[tagsRounded] || tagsRounded)] = tagsRounded, _a["k-chip-" + fillMode] = fillMode, _a["k-chip-" + fillMode + "-base"] = Boolean(fillMode), _a;
|
|
88
|
+
}
|
|
45
89
|
},
|
|
46
90
|
// @ts-ignore
|
|
47
91
|
setup: !gh ? undefined : function () {
|
|
@@ -60,8 +104,8 @@ var TagList = {
|
|
|
60
104
|
var _a = this.$props,
|
|
61
105
|
dataItems = _a.dataItems,
|
|
62
106
|
guid = _a.guid;
|
|
63
|
-
return h("
|
|
64
|
-
"class":
|
|
107
|
+
return h("div", {
|
|
108
|
+
"class": this.wrapperClass,
|
|
65
109
|
role: "listbox",
|
|
66
110
|
attrs: this.v3 ? undefined : {
|
|
67
111
|
role: "listbox",
|
|
@@ -71,8 +115,10 @@ var TagList = {
|
|
|
71
115
|
}, [dataItems.map(function (tagData, index) {
|
|
72
116
|
var _this = this;
|
|
73
117
|
|
|
74
|
-
var defaultRendering = h("
|
|
75
|
-
"class":
|
|
118
|
+
var defaultRendering = h("div", {
|
|
119
|
+
"class": __assign(__assign({}, this.chipClass), {
|
|
120
|
+
'k-focus': tagData === this.$props.focused
|
|
121
|
+
}),
|
|
76
122
|
key: tagData.text + index,
|
|
77
123
|
id: "tag-" + guid + "-" + tagData.text.replace(/\s+/g, '-'),
|
|
78
124
|
attrs: this.v3 ? undefined : {
|
|
@@ -90,7 +136,9 @@ var TagList = {
|
|
|
90
136
|
"aria-selected": true,
|
|
91
137
|
role: "option",
|
|
92
138
|
"aria-setsize": dataItems.length
|
|
93
|
-
}, [h("span",
|
|
139
|
+
}, [h("span", {
|
|
140
|
+
"class": "k-chip-content"
|
|
141
|
+
}, [tagData.text]), h("span", {
|
|
94
142
|
"aria-label": "delete",
|
|
95
143
|
attrs: this.v3 ? undefined : {
|
|
96
144
|
"aria-label": "delete"
|
|
@@ -122,4 +170,5 @@ var TagList = {
|
|
|
122
170
|
}, this)]);
|
|
123
171
|
}
|
|
124
172
|
};
|
|
125
|
-
|
|
173
|
+
var TagList = TagListVue2;
|
|
174
|
+
export { TagList, TagListVue2 };
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
// @ts-ignore
|
|
2
2
|
import { DefineComponent } from 'vue';
|
|
3
|
-
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
import * as Vue from 'vue';
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
type Vue2type = Vue.default;
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
9
|
+
export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { DefineComponent } from '../additionalTypes';
|
|
2
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
3
2
|
declare type DefaultData<V> = object | ((this: V) => {});
|
|
4
3
|
declare type DefaultMethods<V> = {
|
|
5
4
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
@@ -7,13 +6,13 @@ declare type DefaultMethods<V> = {
|
|
|
7
6
|
/**
|
|
8
7
|
* @hidden
|
|
9
8
|
*/
|
|
10
|
-
export interface ClearButtonMethods extends
|
|
9
|
+
export interface ClearButtonMethods extends Vue2type {
|
|
11
10
|
onMouseDown: (e: any) => void;
|
|
12
11
|
onClickHandler: (e: any) => void;
|
|
13
12
|
}
|
|
14
13
|
/**
|
|
15
14
|
* Represents the default `ClearButton` component.
|
|
16
15
|
*/
|
|
17
|
-
declare let
|
|
18
|
-
declare const
|
|
19
|
-
export { ClearButton,
|
|
16
|
+
declare let ClearButtonVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<ClearButtonMethods>, {}, RecordPropsDefinition<{}>>;
|
|
17
|
+
declare const ClearButton: DefineComponent<{}, any, {}, {}, ClearButtonMethods, {}, {}, {}, string, {}, {}, {}>;
|
|
18
|
+
export { ClearButton, ClearButtonVue2 };
|
|
@@ -9,7 +9,7 @@ import { messages, clear } from '../messages';
|
|
|
9
9
|
* Represents the default `ClearButton` component.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var ClearButtonVue2 = {
|
|
13
13
|
name: 'clear-button',
|
|
14
14
|
inject: {
|
|
15
15
|
kendoLocalizationService: {
|
|
@@ -38,7 +38,7 @@ var ClearButton = {
|
|
|
38
38
|
var h = gh || createElement;
|
|
39
39
|
var title = provideLocalizationService(this).toLanguageString(clear, messages[clear]);
|
|
40
40
|
return h("span", {
|
|
41
|
-
"class": "k-
|
|
41
|
+
"class": "k-clear-value",
|
|
42
42
|
role: "button",
|
|
43
43
|
attrs: this.v3 ? undefined : {
|
|
44
44
|
role: "button",
|
|
@@ -54,8 +54,10 @@ var ClearButton = {
|
|
|
54
54
|
tabIndex: -1,
|
|
55
55
|
title: title,
|
|
56
56
|
key: "clearbutton"
|
|
57
|
-
}
|
|
57
|
+
}, [h("span", {
|
|
58
|
+
"class": "k-icon k-i-x"
|
|
59
|
+
})]);
|
|
58
60
|
}
|
|
59
61
|
};
|
|
60
|
-
var
|
|
61
|
-
export { ClearButton,
|
|
62
|
+
var ClearButton = ClearButtonVue2;
|
|
63
|
+
export { ClearButton, ClearButtonVue2 };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { VNode } from 'vue';
|
|
2
1
|
import VirtualScroll from './VirtualScroll';
|
|
3
2
|
import { Navigation } from './Navigation';
|
|
4
3
|
import { ListItemProps } from './ListItem';
|
|
@@ -28,10 +27,10 @@ export interface DropDownComponentProps {
|
|
|
28
27
|
onChange?: (event: any) => void;
|
|
29
28
|
onFilterChange?: (event: any) => void;
|
|
30
29
|
onPageChange?: (event: any) => void;
|
|
31
|
-
itemRender?: (li: Element, itemProps: ListItemProps) =>
|
|
32
|
-
listNoDataRender?: (element: any) =>
|
|
33
|
-
header?:
|
|
34
|
-
footer?:
|
|
30
|
+
itemRender?: (li: Element, itemProps: ListItemProps) => any;
|
|
31
|
+
listNoDataRender?: (element: any) => any;
|
|
32
|
+
header?: any;
|
|
33
|
+
footer?: any;
|
|
35
34
|
}
|
|
36
35
|
/**
|
|
37
36
|
* @hidden
|
package/dist/es/common/List.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RecordPropsDefinition, ComponentOptions } from '
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
2
2
|
declare type DefaultData<V> = object | ((this: V) => {});
|
|
3
3
|
declare type DefaultMethods<V> = {
|
|
4
4
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
@@ -28,7 +28,7 @@ export interface ListProps {
|
|
|
28
28
|
/**
|
|
29
29
|
* @hidden
|
|
30
30
|
*/
|
|
31
|
-
export interface ListMethods extends
|
|
31
|
+
export interface ListMethods extends Vue2type {
|
|
32
32
|
handleClick: (e: any) => void;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
@@ -48,5 +48,6 @@ export interface ListAll extends ListMethods, ListState {
|
|
|
48
48
|
/**
|
|
49
49
|
* Represents the default `List` component.
|
|
50
50
|
*/
|
|
51
|
-
declare let
|
|
52
|
-
|
|
51
|
+
declare let ListVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<ListMethods>, {}, RecordPropsDefinition<ListProps>>;
|
|
52
|
+
declare const List: DefineComponent<{}, any, {}, {}, ListMethods, {}, {}, {}, string, {}, {}, {}>;
|
|
53
|
+
export { List, ListVue2 };
|
package/dist/es/common/List.js
CHANGED
|
@@ -13,7 +13,7 @@ import { messages, nodata } from '../messages';
|
|
|
13
13
|
* Represents the default `List` component.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var ListVue2 = {
|
|
17
17
|
name: 'list',
|
|
18
18
|
props: {
|
|
19
19
|
id: String,
|
|
@@ -147,7 +147,7 @@ var List = {
|
|
|
147
147
|
},
|
|
148
148
|
role: "listbox",
|
|
149
149
|
"aria-hidden": !show ? true : undefined,
|
|
150
|
-
"class": 'k-list
|
|
150
|
+
"class": 'k-list-ul',
|
|
151
151
|
ref: this.v3 ? function (el) {
|
|
152
152
|
_this.listRef = el;
|
|
153
153
|
} : 'list',
|
|
@@ -155,4 +155,5 @@ var List = {
|
|
|
155
155
|
}, [items])]) : renderNoValueElement.call(this);
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
|
-
|
|
158
|
+
var List = ListVue2;
|
|
159
|
+
export { List, ListVue2 };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { DefineComponent } from '../additionalTypes';
|
|
2
|
-
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
1
|
+
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
|
|
3
2
|
declare type DefaultData<V> = object | ((this: V) => {});
|
|
4
3
|
declare type DefaultMethods<V> = {
|
|
5
4
|
[key: string]: (this: V, ...args: any[]) => any;
|
|
@@ -24,7 +23,7 @@ export interface ListContainerState {
|
|
|
24
23
|
/**
|
|
25
24
|
* @hidden
|
|
26
25
|
*/
|
|
27
|
-
export interface ListContainerMethods extends
|
|
26
|
+
export interface ListContainerMethods extends Vue2type {
|
|
28
27
|
onMouseDown: (e: any) => void;
|
|
29
28
|
onBlur: (e: any) => void;
|
|
30
29
|
onOpen: (e: any) => void;
|
|
@@ -33,6 +32,6 @@ export interface ListContainerMethods extends Vue {
|
|
|
33
32
|
/**
|
|
34
33
|
* Represents the default `ListContainer` component.
|
|
35
34
|
*/
|
|
36
|
-
declare let
|
|
37
|
-
declare const
|
|
38
|
-
export { ListContainer,
|
|
35
|
+
declare let ListContainerVue2: ComponentOptions<Vue2type, DefaultData<{}>, DefaultMethods<ListContainerMethods>, {}, RecordPropsDefinition<ListContainerProps>>;
|
|
36
|
+
declare const ListContainer: DefineComponent<ListContainerProps, any, {}, {}, ListContainerMethods, {}, {}, {}, string, ListContainerProps, ListContainerProps, {}>;
|
|
37
|
+
export { ListContainer, ListContainerVue2 };
|
|
@@ -8,7 +8,7 @@ import { getDefaultSlots } from '@progress/kendo-vue-common';
|
|
|
8
8
|
* Represents the default `ListContainer` component.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var ListContainerVue2 = {
|
|
12
12
|
name: 'list-container',
|
|
13
13
|
// @ts-ignore
|
|
14
14
|
emits: {
|
|
@@ -68,7 +68,8 @@ var ListContainer = {
|
|
|
68
68
|
dir = _a.dir,
|
|
69
69
|
popupSettings = _a.popupSettings; // @ts-ignore
|
|
70
70
|
|
|
71
|
-
var
|
|
71
|
+
var popupClass = popupSettings.popupClass,
|
|
72
|
+
className = popupSettings.className,
|
|
72
73
|
animate = popupSettings.animate,
|
|
73
74
|
anchor = popupSettings.anchor,
|
|
74
75
|
show = popupSettings.show,
|
|
@@ -101,6 +102,7 @@ var ListContainer = {
|
|
|
101
102
|
onClose: this.onClose
|
|
102
103
|
}, this.v3 ? function () {
|
|
103
104
|
return [h("div", {
|
|
105
|
+
"class": popupClass,
|
|
104
106
|
onMousedown: _this.onMouseDown,
|
|
105
107
|
on: _this.v3 ? undefined : {
|
|
106
108
|
"mousedown": _this.onMouseDown,
|
|
@@ -109,6 +111,7 @@ var ListContainer = {
|
|
|
109
111
|
onFocusout: _this.onBlur
|
|
110
112
|
}, [defaultSlot])];
|
|
111
113
|
} : [h("div", {
|
|
114
|
+
"class": popupClass,
|
|
112
115
|
onMousedown: _this.onMouseDown,
|
|
113
116
|
on: _this.v3 ? undefined : {
|
|
114
117
|
"mousedown": _this.onMouseDown,
|
|
@@ -119,5 +122,5 @@ var ListContainer = {
|
|
|
119
122
|
);
|
|
120
123
|
}
|
|
121
124
|
};
|
|
122
|
-
var
|
|
123
|
-
export { ListContainer,
|
|
125
|
+
var ListContainer = ListContainerVue2;
|
|
126
|
+
export { ListContainer, ListContainerVue2 };
|