@progress/kendo-vue-dropdowns 3.5.0 → 3.5.1-dev.202208150613
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.js +9 -13
- package/dist/es/AutoComplete/AutoCompleteProps.js +1 -0
- package/dist/es/ComboBox/ComboBox.js +11 -14
- package/dist/es/ComboBox/ComboBoxProps.d.ts +1 -1
- package/dist/es/ComboBox/ComboBoxProps.js +1 -0
- package/dist/es/DropDownList/DropDownList.js +11 -21
- package/dist/es/DropDownList/DropDownListProps.js +1 -0
- package/dist/es/MultiSelect/MultiSelect.js +23 -30
- package/dist/es/MultiSelect/MultiSelectProps.d.ts +1 -1
- package/dist/es/MultiSelect/MultiSelectProps.js +1 -0
- package/dist/es/MultiSelect/TagList.js +3 -3
- package/dist/es/common/List.js +2 -2
- package/dist/es/common/ListContainer.js +8 -5
- package/dist/es/common/ListFilter.js +1 -1
- package/dist/es/common/events.js +1 -0
- package/dist/es/common/filterDescriptor.js +1 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/esm/AutoComplete/AutoComplete.d.ts +107 -0
- package/dist/esm/AutoComplete/AutoComplete.js +757 -0
- package/dist/esm/AutoComplete/AutoCompleteProps.d.ts +202 -0
- package/dist/esm/AutoComplete/AutoCompleteProps.js +2 -0
- package/dist/esm/ComboBox/ComboBox.d.ts +99 -0
- package/dist/esm/ComboBox/ComboBox.js +1060 -0
- package/dist/esm/ComboBox/ComboBoxProps.d.ts +244 -0
- package/dist/esm/ComboBox/ComboBoxProps.js +2 -0
- package/dist/esm/DropDownList/DropDownList.d.ts +100 -0
- package/dist/esm/DropDownList/DropDownList.js +1086 -0
- package/dist/esm/DropDownList/DropDownListProps.d.ts +274 -0
- package/dist/esm/DropDownList/DropDownListProps.js +2 -0
- package/dist/esm/MultiSelect/MultiSelect.d.ts +115 -0
- package/dist/esm/MultiSelect/MultiSelect.js +1246 -0
- package/dist/esm/MultiSelect/MultiSelectProps.d.ts +262 -0
- package/dist/esm/MultiSelect/MultiSelectProps.js +2 -0
- package/dist/esm/MultiSelect/TagList.d.ts +51 -0
- package/dist/esm/MultiSelect/TagList.js +180 -0
- package/dist/esm/additionalTypes.ts +21 -0
- package/dist/esm/common/ClearButton.d.ts +21 -0
- package/dist/esm/common/ClearButton.js +68 -0
- package/dist/esm/common/DropDownBase.d.ts +84 -0
- package/dist/esm/common/DropDownBase.js +303 -0
- package/dist/esm/common/List.d.ts +58 -0
- package/dist/esm/common/List.js +176 -0
- package/dist/esm/common/ListContainer.d.ts +40 -0
- package/dist/esm/common/ListContainer.js +134 -0
- package/dist/esm/common/ListDefaultItem.d.ts +29 -0
- package/dist/esm/common/ListDefaultItem.js +62 -0
- package/dist/esm/common/ListFilter.d.ts +46 -0
- package/dist/esm/common/ListFilter.js +112 -0
- package/dist/esm/common/ListItem.d.ts +71 -0
- package/dist/esm/common/ListItem.js +105 -0
- package/dist/esm/common/Navigation.d.ts +12 -0
- package/dist/esm/common/Navigation.js +34 -0
- package/dist/esm/common/SearchBar.d.ts +65 -0
- package/dist/esm/common/SearchBar.js +177 -0
- package/dist/esm/common/VirtualScroll.d.ts +42 -0
- package/dist/esm/common/VirtualScroll.js +196 -0
- package/dist/esm/common/events.d.ts +63 -0
- package/dist/esm/common/events.js +1 -0
- package/dist/esm/common/filterDescriptor.d.ts +41 -0
- package/dist/esm/common/filterDescriptor.js +2 -0
- package/dist/esm/common/settings.d.ts +102 -0
- package/dist/esm/common/settings.js +8 -0
- package/dist/esm/common/utils.d.ts +57 -0
- package/dist/esm/common/utils.js +184 -0
- package/dist/esm/main.d.ts +13 -0
- package/dist/esm/main.js +5 -0
- package/dist/esm/messages/index.d.ts +20 -0
- package/dist/esm/messages/index.js +21 -0
- package/dist/esm/package-metadata.d.ts +5 -0
- package/dist/esm/package-metadata.js +11 -0
- package/dist/esm/package.json +3 -0
- package/dist/npm/AutoComplete/AutoComplete.js +24 -28
- package/dist/npm/ComboBox/ComboBox.js +43 -46
- package/dist/npm/ComboBox/ComboBoxProps.d.ts +1 -1
- package/dist/npm/DropDownList/DropDownList.js +42 -52
- package/dist/npm/MultiSelect/MultiSelect.js +41 -48
- package/dist/npm/MultiSelect/MultiSelectProps.d.ts +1 -1
- package/dist/npm/MultiSelect/TagList.js +3 -3
- package/dist/npm/common/ClearButton.js +1 -1
- package/dist/npm/common/DropDownBase.js +6 -6
- package/dist/npm/common/List.js +8 -8
- package/dist/npm/common/ListContainer.js +9 -6
- package/dist/npm/common/ListDefaultItem.js +2 -2
- package/dist/npm/common/ListFilter.js +3 -3
- package/dist/npm/common/ListItem.js +2 -2
- package/dist/npm/common/Navigation.js +1 -1
- package/dist/npm/common/SearchBar.js +2 -2
- package/dist/npm/package-metadata.js +1 -1
- package/package.json +11 -5
|
@@ -67,6 +67,7 @@ var ComboBoxVue2 = {
|
|
|
67
67
|
'changemodel': null,
|
|
68
68
|
'update:modelValue': null,
|
|
69
69
|
'filterchange': null,
|
|
70
|
+
pagechange: null,
|
|
70
71
|
change: null,
|
|
71
72
|
focus: null,
|
|
72
73
|
blur: null,
|
|
@@ -222,8 +223,8 @@ var ComboBoxVue2 = {
|
|
|
222
223
|
this.currentOpened = undefined;
|
|
223
224
|
this.prevCurrentValue = this.computedValue();
|
|
224
225
|
this.base = new DropDownBase_1.default(this);
|
|
225
|
-
this.anchor = kendo_vue_common_1.guid();
|
|
226
|
-
this.inputId = kendo_vue_common_1.guid();
|
|
226
|
+
this.anchor = (0, kendo_vue_common_1.guid)();
|
|
227
|
+
this.inputId = (0, kendo_vue_common_1.guid)();
|
|
227
228
|
},
|
|
228
229
|
// @ts-ignore
|
|
229
230
|
setup: !isV3 ? undefined : function () {
|
|
@@ -244,8 +245,8 @@ var ComboBoxVue2 = {
|
|
|
244
245
|
this.hasMounted = true; // @ts-ignore
|
|
245
246
|
|
|
246
247
|
this.input = this.v3 ? this.inputRef.input : this.$refs.input.input;
|
|
247
|
-
this.base.wrapper = kendo_vue_common_1.getRef(this, 'kendoAnchor', this.anchor);
|
|
248
|
-
this.element = kendo_vue_common_1.getRef(this, 'kendoAnchor', this.anchor);
|
|
248
|
+
this.base.wrapper = (0, kendo_vue_common_1.getRef)(this, 'kendoAnchor', this.anchor);
|
|
249
|
+
this.element = (0, kendo_vue_common_1.getRef)(this, 'kendoAnchor', this.anchor);
|
|
249
250
|
this.base.didMount();
|
|
250
251
|
this.setValidity();
|
|
251
252
|
},
|
|
@@ -288,9 +289,9 @@ var ComboBoxVue2 = {
|
|
|
288
289
|
} else {
|
|
289
290
|
var prevSelectedItem = this.prevCurrentValue;
|
|
290
291
|
var selectedItemIndex = dataItems.findIndex(function (i) {
|
|
291
|
-
return utils_1.areSame(i, selectedItem, dataItemKey);
|
|
292
|
+
return (0, utils_1.areSame)(i, selectedItem, dataItemKey);
|
|
292
293
|
});
|
|
293
|
-
var selectedItemChanged = !utils_1.areSame(prevSelectedItem, selectedItem, dataItemKey);
|
|
294
|
+
var selectedItemChanged = !(0, utils_1.areSame)(prevSelectedItem, selectedItem, dataItemKey);
|
|
294
295
|
|
|
295
296
|
if (opening && virtual) {
|
|
296
297
|
this.base.scrollToVirtualItem(virtual, selectedItemIndex);
|
|
@@ -335,7 +336,7 @@ var ComboBoxVue2 = {
|
|
|
335
336
|
var value = this.computedValue(); // TO DO: deprecate it!
|
|
336
337
|
|
|
337
338
|
return dataItems.findIndex(function (i) {
|
|
338
|
-
return utils_1.areSame(i, value, dataItemKey);
|
|
339
|
+
return (0, utils_1.areSame)(i, value, dataItemKey);
|
|
339
340
|
});
|
|
340
341
|
}
|
|
341
342
|
},
|
|
@@ -377,13 +378,13 @@ var ComboBoxVue2 = {
|
|
|
377
378
|
},
|
|
378
379
|
findByFieldValue: function findByFieldValue(field, value) {
|
|
379
380
|
var index = this.dataItems.findIndex(function (i) {
|
|
380
|
-
return utils_1.getItemValue(i, field) === value;
|
|
381
|
+
return (0, utils_1.getItemValue)(i, field) === value;
|
|
381
382
|
});
|
|
382
383
|
return this.dataItems[index];
|
|
383
384
|
},
|
|
384
385
|
primitiveValue: function primitiveValue() {
|
|
385
386
|
var value = this.computedValue();
|
|
386
|
-
return this.valuePrimitive ? utils_1.getItemValue(value, this.valueField) : value;
|
|
387
|
+
return this.valuePrimitive ? (0, utils_1.getItemValue)(value, this.valueField) : value;
|
|
387
388
|
},
|
|
388
389
|
validity: function validity() {
|
|
389
390
|
var customError = this.$props.validationMessage !== undefined;
|
|
@@ -403,7 +404,7 @@ var ComboBoxVue2 = {
|
|
|
403
404
|
dataItemKey = _a.dataItemKey;
|
|
404
405
|
var skip = virtual ? virtual.skip : 0;
|
|
405
406
|
var item = dataItems[index - skip];
|
|
406
|
-
var newSelected = !utils_1.areSame(item, this.computedValue(), dataItemKey);
|
|
407
|
+
var newSelected = !(0, utils_1.areSame)(item, this.computedValue(), dataItemKey);
|
|
407
408
|
this.triggerOnChange(item, state);
|
|
408
409
|
|
|
409
410
|
if (this.currentText !== undefined) {
|
|
@@ -429,7 +430,7 @@ var ComboBoxVue2 = {
|
|
|
429
430
|
var value = this.computedValue();
|
|
430
431
|
this.suggested = '';
|
|
431
432
|
|
|
432
|
-
if (focusedIndex !== -1 && !utils_1.isPresent(value)) {
|
|
433
|
+
if (focusedIndex !== -1 && !(0, utils_1.isPresent)(value)) {
|
|
433
434
|
this.handleItemSelect(focusedIndex, state);
|
|
434
435
|
} else if (text === '') {
|
|
435
436
|
this.handleItemSelect(0, state);
|
|
@@ -462,8 +463,8 @@ var ComboBoxVue2 = {
|
|
|
462
463
|
textField = _b.textField,
|
|
463
464
|
allowCustom = _b.allowCustom;
|
|
464
465
|
var opened = this.$props.opened !== undefined ? this.$props.opened : this.currentOpened;
|
|
465
|
-
var currentValueText = utils_1.getItemValue(this.computedValue(), textField);
|
|
466
|
-
var valueIndex = currentValueText === value ? this.index : utils_1.getItemIndexByText(dataItems, value, textField);
|
|
466
|
+
var currentValueText = (0, utils_1.getItemValue)(this.computedValue(), textField);
|
|
467
|
+
var valueIndex = currentValueText === value ? this.index : (0, utils_1.getItemIndexByText)(dataItems, value, textField);
|
|
467
468
|
var itemSelected = valueIndex !== -1;
|
|
468
469
|
var newSelected = undefined;
|
|
469
470
|
this.suggested = '';
|
|
@@ -502,10 +503,10 @@ var ComboBoxVue2 = {
|
|
|
502
503
|
textField = _b.textField,
|
|
503
504
|
allowCustom = _b.allowCustom;
|
|
504
505
|
var opened = this.$props.opened !== undefined ? this.$props.opened : this.currentOpened;
|
|
505
|
-
var valueItemText = utils_1.getItemValue(this.computedValue(), textField);
|
|
506
|
+
var valueItemText = (0, utils_1.getItemValue)(this.computedValue(), textField);
|
|
506
507
|
this.suggested = '';
|
|
507
508
|
|
|
508
|
-
if (text === valueItemText || text === '' && !utils_1.isPresent(valueItemText)) {
|
|
509
|
+
if (text === valueItemText || text === '' && !(0, utils_1.isPresent)(valueItemText)) {
|
|
509
510
|
if (opened) {
|
|
510
511
|
this.base.togglePopup(state);
|
|
511
512
|
}
|
|
@@ -513,7 +514,7 @@ var ComboBoxVue2 = {
|
|
|
513
514
|
return this.applyState(state);
|
|
514
515
|
}
|
|
515
516
|
|
|
516
|
-
var valueIndex = utils_1.getItemIndexByText(dataItems, text, textField, true);
|
|
517
|
+
var valueIndex = (0, utils_1.getItemIndexByText)(dataItems, text, textField, true);
|
|
517
518
|
var itemSelected = valueIndex !== -1;
|
|
518
519
|
var newSelected = null;
|
|
519
520
|
|
|
@@ -638,8 +639,8 @@ var ComboBoxVue2 = {
|
|
|
638
639
|
var selectionAtEnd = input.selectionEnd === value.length;
|
|
639
640
|
var prevText = this.$props.filter !== undefined ? this.$props.filter : this.currentText;
|
|
640
641
|
|
|
641
|
-
if (!utils_1.isPresent(prevText)) {
|
|
642
|
-
prevText = utils_1.getItemValue(this.computedValue(), this.$props.textField) || '';
|
|
642
|
+
if (!(0, utils_1.isPresent)(prevText)) {
|
|
643
|
+
prevText = (0, utils_1.getItemValue)(this.computedValue(), this.$props.textField) || '';
|
|
643
644
|
}
|
|
644
645
|
|
|
645
646
|
var deletedSuggestion = prevText && prevText === value;
|
|
@@ -705,9 +706,9 @@ var ComboBoxVue2 = {
|
|
|
705
706
|
focusedItemIndex = _d === void 0 ? utils_1.itemIndexStartsWith : _d;
|
|
706
707
|
var text = this.$props.filter ? this.$props.filter : this.currentText;
|
|
707
708
|
|
|
708
|
-
if (utils_1.isPresent(value) && text === undefined) {
|
|
709
|
+
if ((0, utils_1.isPresent)(value) && text === undefined) {
|
|
709
710
|
return dataItems.findIndex(function (i) {
|
|
710
|
-
return utils_1.areSame(i, value, dataItemKey);
|
|
711
|
+
return (0, utils_1.areSame)(i, value, dataItemKey);
|
|
711
712
|
});
|
|
712
713
|
} else if (text) {
|
|
713
714
|
return focusedItemIndex(dataItems, text, textField);
|
|
@@ -719,7 +720,7 @@ var ComboBoxVue2 = {
|
|
|
719
720
|
var _a = this.$props,
|
|
720
721
|
dataItems = _a.dataItems,
|
|
721
722
|
textField = _a.textField;
|
|
722
|
-
this.suggested = utils_1.suggestValue(value, dataItems, textField);
|
|
723
|
+
this.suggested = (0, utils_1.suggestValue)(value, dataItems, textField);
|
|
723
724
|
},
|
|
724
725
|
setValidity: function setValidity() {
|
|
725
726
|
if (this.input && this.input.setCustomValidity) {
|
|
@@ -729,7 +730,7 @@ var ComboBoxVue2 = {
|
|
|
729
730
|
triggerOnChange: function triggerOnChange(item, state) {
|
|
730
731
|
var value = this.computedValue();
|
|
731
732
|
|
|
732
|
-
if (!utils_1.isPresent(value) && !utils_1.isPresent(item) || utils_1.areSame(value, item, this.$props.dataItemKey)) {
|
|
733
|
+
if (!(0, utils_1.isPresent)(value) && !(0, utils_1.isPresent)(item) || (0, utils_1.areSame)(value, item, this.$props.dataItemKey)) {
|
|
733
734
|
return;
|
|
734
735
|
}
|
|
735
736
|
|
|
@@ -768,9 +769,9 @@ var ComboBoxVue2 = {
|
|
|
768
769
|
var focused = this.currentFocused;
|
|
769
770
|
var isValid = !this.$props.validityStyles || this.validity().valid;
|
|
770
771
|
var text = this.$props.filter !== undefined ? this.$props.filter : this.currentText;
|
|
771
|
-
var selectedItemText = utils_1.getItemValue(this.computedValue(), textField);
|
|
772
|
-
var inputText = utils_1.isPresent(text) ? text : selectedItemText;
|
|
773
|
-
var renderClearButton = clearButton && (!!inputText || utils_1.isPresent(this.computedValue()));
|
|
772
|
+
var selectedItemText = (0, utils_1.getItemValue)(this.computedValue(), textField);
|
|
773
|
+
var inputText = (0, utils_1.isPresent)(text) ? text : selectedItemText;
|
|
774
|
+
var renderClearButton = clearButton && (!!inputText || (0, utils_1.isPresent)(this.computedValue()));
|
|
774
775
|
var base = this.base;
|
|
775
776
|
var vs = base.vs;
|
|
776
777
|
var id = this.$props.id || this.inputId;
|
|
@@ -778,7 +779,7 @@ var ComboBoxVue2 = {
|
|
|
778
779
|
animate: true,
|
|
779
780
|
height: '200px'
|
|
780
781
|
}, this.$props.popupSettings);
|
|
781
|
-
var ariaLabelExpandButton = kendo_vue_intl_1.provideLocalizationService(this).toLanguageString(messages_1.expandButton, messages_1.messages[messages_1.expandButton]);
|
|
782
|
+
var ariaLabelExpandButton = (0, kendo_vue_intl_1.provideLocalizationService)(this).toLanguageString(messages_1.expandButton, messages_1.messages[messages_1.expandButton]);
|
|
782
783
|
vs.enabled = virtual !== undefined;
|
|
783
784
|
|
|
784
785
|
if (virtual !== undefined) {
|
|
@@ -805,9 +806,9 @@ var ComboBoxVue2 = {
|
|
|
805
806
|
|
|
806
807
|
var skip = virtual.skip;
|
|
807
808
|
var opened = this.$props.opened !== undefined ? this.$props.opened : this.currentOpened;
|
|
808
|
-
var translate = "translateY("
|
|
809
|
+
var translate = "translateY(".concat(vs.translate, "px)");
|
|
809
810
|
var focusedIndex = opened ? this.getFocusedIndex() : undefined;
|
|
810
|
-
var value = utils_1.isPresent(text) && text !== selectedItemText ? null : this.computedValue();
|
|
811
|
+
var value = (0, utils_1.isPresent)(text) && text !== selectedItemText ? null : this.computedValue();
|
|
811
812
|
return (// @ts-ignore function children
|
|
812
813
|
h(List_1.List, {
|
|
813
814
|
id: base.listBoxId,
|
|
@@ -899,24 +900,20 @@ var ComboBoxVue2 = {
|
|
|
899
900
|
width: popupWidth,
|
|
900
901
|
attrs: this.v3 ? undefined : {
|
|
901
902
|
width: popupWidth,
|
|
902
|
-
popupSettings: {
|
|
903
|
-
animate: popupSettings.animate,
|
|
903
|
+
popupSettings: __assign(__assign({}, popupSettings), {
|
|
904
904
|
anchor: this.anchor,
|
|
905
905
|
show: opened,
|
|
906
|
-
popupClass: kendo_vue_common_1.classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-"
|
|
907
|
-
className: popupSettings.className
|
|
908
|
-
|
|
909
|
-
},
|
|
906
|
+
popupClass: (0, kendo_vue_common_1.classNames)(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-".concat(sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
|
|
907
|
+
className: (0, kendo_vue_common_1.classNames)('k-list-container', popupSettings.className)
|
|
908
|
+
}),
|
|
910
909
|
dir: dir !== undefined ? dir : this.base.dirCalculated
|
|
911
910
|
},
|
|
912
|
-
popupSettings: {
|
|
913
|
-
animate: popupSettings.animate,
|
|
911
|
+
popupSettings: __assign(__assign({}, popupSettings), {
|
|
914
912
|
anchor: this.anchor,
|
|
915
913
|
show: opened,
|
|
916
|
-
popupClass: kendo_vue_common_1.classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-"
|
|
917
|
-
className: popupSettings.className
|
|
918
|
-
|
|
919
|
-
},
|
|
914
|
+
popupClass: (0, kendo_vue_common_1.classNames)(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-".concat(sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
|
|
915
|
+
className: (0, kendo_vue_common_1.classNames)('k-list-container', popupSettings.className)
|
|
916
|
+
}),
|
|
920
917
|
dir: dir !== undefined ? dir : this.base.dirCalculated
|
|
921
918
|
}, this.v3 ? function () {
|
|
922
919
|
return [header && h("div", {
|
|
@@ -951,10 +948,10 @@ var ComboBoxVue2 = {
|
|
|
951
948
|
var opened = this.$props.opened !== undefined ? this.$props.opened : this.currentOpened;
|
|
952
949
|
var value = this.computedValue();
|
|
953
950
|
var selectedIndex = Math.max(0, dataItems.findIndex(function (i) {
|
|
954
|
-
return utils_1.areSame(i, value, dataItemKey);
|
|
951
|
+
return (0, utils_1.areSame)(i, value, dataItemKey);
|
|
955
952
|
}));
|
|
956
953
|
|
|
957
|
-
if (this.suggested && !utils_1.areSame(this.valueOnDidUpdate, value, dataItemKey)) {
|
|
954
|
+
if (this.suggested && !(0, utils_1.areSame)(this.valueOnDidUpdate, value, dataItemKey)) {
|
|
958
955
|
this.suggested = '';
|
|
959
956
|
}
|
|
960
957
|
|
|
@@ -1004,8 +1001,8 @@ var ComboBoxVue2 = {
|
|
|
1004
1001
|
};
|
|
1005
1002
|
|
|
1006
1003
|
var combobox = h("span", {
|
|
1007
|
-
"class": kendo_vue_common_1.classNames('k-combobox k-input', (_a = {}, _a["k-input-"
|
|
1008
|
-
ref: kendo_vue_common_1.setRef(this, 'kendoAnchor', this.anchor),
|
|
1004
|
+
"class": (0, kendo_vue_common_1.classNames)('k-combobox k-input', (_a = {}, _a["k-input-".concat(sizeMap[size] || size)] = size, _a["k-rounded-".concat(roundedMap[rounded] || rounded)] = rounded, _a["k-input-".concat(fillMode)] = fillMode, _a['k-invalid'] = !isValid, _a['k-loading'] = loading, _a['k-required'] = this.required, _a['k-disabled'] = disabled, _a['k-focus'] = focused && !disabled, _a), className),
|
|
1005
|
+
ref: (0, kendo_vue_common_1.setRef)(this, 'kendoAnchor', this.anchor),
|
|
1009
1006
|
style: !label ? style : __assign(__assign({}, style), {
|
|
1010
1007
|
width: undefined
|
|
1011
1008
|
}),
|
|
@@ -1033,7 +1030,7 @@ var ComboBoxVue2 = {
|
|
|
1033
1030
|
size: size,
|
|
1034
1031
|
fillMode: fillMode,
|
|
1035
1032
|
rounded: null,
|
|
1036
|
-
iconClass: kendo_vue_common_1.classNames('k-icon k-i-arrow-s', iconClassName)
|
|
1033
|
+
iconClass: (0, kendo_vue_common_1.classNames)('k-icon k-i-arrow-s', iconClassName)
|
|
1037
1034
|
},
|
|
1038
1035
|
tabIndex: -1,
|
|
1039
1036
|
"aria-label": ariaLabelExpandButton,
|
|
@@ -1041,7 +1038,7 @@ var ComboBoxVue2 = {
|
|
|
1041
1038
|
fillMode: fillMode,
|
|
1042
1039
|
rounded: null,
|
|
1043
1040
|
"class": 'k-input-button',
|
|
1044
|
-
iconClass: kendo_vue_common_1.classNames('k-icon k-i-arrow-s', iconClassName),
|
|
1041
|
+
iconClass: (0, kendo_vue_common_1.classNames)('k-icon k-i-arrow-s', iconClassName),
|
|
1045
1042
|
onClick: this.toggleBtnClick,
|
|
1046
1043
|
on: this.v3 ? undefined : {
|
|
1047
1044
|
"click": this.toggleBtnClick,
|
|
@@ -97,7 +97,7 @@ export interface ComboBoxProps extends FormComponentProps {
|
|
|
97
97
|
*/
|
|
98
98
|
filterable?: boolean;
|
|
99
99
|
/**
|
|
100
|
-
* Sets the value of ComboBox input. Useful for making the ComboBox input a
|
|
100
|
+
* Sets the value of ComboBox input. Useful for making the ComboBox input a controlled component.
|
|
101
101
|
*/
|
|
102
102
|
filter?: string | null;
|
|
103
103
|
/**
|
|
@@ -222,8 +222,8 @@ var DropDownListVue2 = {
|
|
|
222
222
|
this.currentFocused = undefined;
|
|
223
223
|
this.currentOpened = undefined;
|
|
224
224
|
this.base = new DropDownBase_1.default(this);
|
|
225
|
-
this.anchor = kendo_vue_common_1.guid();
|
|
226
|
-
this.inputId = kendo_vue_common_1.guid();
|
|
225
|
+
this.anchor = (0, kendo_vue_common_1.guid)();
|
|
226
|
+
this.inputId = (0, kendo_vue_common_1.guid)();
|
|
227
227
|
},
|
|
228
228
|
// @ts-ignore
|
|
229
229
|
setup: !isV3 ? undefined : function () {
|
|
@@ -240,8 +240,8 @@ var DropDownListVue2 = {
|
|
|
240
240
|
},
|
|
241
241
|
mounted: function mounted() {
|
|
242
242
|
this.hasMounted = true;
|
|
243
|
-
this.select = kendo_vue_common_1.getRef(this, 'select');
|
|
244
|
-
this.base.wrapper = kendo_vue_common_1.getRef(this, 'kendoAnchor', this.anchor);
|
|
243
|
+
this.select = (0, kendo_vue_common_1.getRef)(this, 'select');
|
|
244
|
+
this.base.wrapper = (0, kendo_vue_common_1.getRef)(this, 'kendoAnchor', this.anchor);
|
|
245
245
|
this.base.didMount();
|
|
246
246
|
this.setValidity();
|
|
247
247
|
},
|
|
@@ -297,9 +297,9 @@ var DropDownListVue2 = {
|
|
|
297
297
|
var selectedItem_1 = this.computedValue();
|
|
298
298
|
var prevSelectedItem = this.prevCurrentValue;
|
|
299
299
|
var selectedItemIndex = dataItems.findIndex(function (i) {
|
|
300
|
-
return utils_1.areSame(i, selectedItem_1, dataItemKey);
|
|
300
|
+
return (0, utils_1.areSame)(i, selectedItem_1, dataItemKey);
|
|
301
301
|
});
|
|
302
|
-
var selectedItemChanged = !utils_1.areSame(prevSelectedItem, selectedItem_1, dataItemKey);
|
|
302
|
+
var selectedItemChanged = !(0, utils_1.areSame)(prevSelectedItem, selectedItem_1, dataItemKey);
|
|
303
303
|
|
|
304
304
|
if (opening && virtual) {
|
|
305
305
|
this.base.scrollToVirtualItem(virtual, selectedItemIndex);
|
|
@@ -332,7 +332,7 @@ var DropDownListVue2 = {
|
|
|
332
332
|
var value = this.computedValue(); // TO DO: deprecate it!
|
|
333
333
|
|
|
334
334
|
return dataItems.findIndex(function (i) {
|
|
335
|
-
return utils_1.areSame(i, value, dataItemKey);
|
|
335
|
+
return (0, utils_1.areSame)(i, value, dataItemKey);
|
|
336
336
|
});
|
|
337
337
|
}
|
|
338
338
|
},
|
|
@@ -370,7 +370,7 @@ var DropDownListVue2 = {
|
|
|
370
370
|
value = this.$props.defaultValue;
|
|
371
371
|
}
|
|
372
372
|
|
|
373
|
-
if (!utils_1.isPresent(value) && this.$props.defaultItem !== undefined) {
|
|
373
|
+
if (!(0, utils_1.isPresent)(value) && this.$props.defaultItem !== undefined) {
|
|
374
374
|
value = this.$props.defaultItem;
|
|
375
375
|
}
|
|
376
376
|
|
|
@@ -378,13 +378,13 @@ var DropDownListVue2 = {
|
|
|
378
378
|
},
|
|
379
379
|
findByFieldValue: function findByFieldValue(field, value) {
|
|
380
380
|
var index = this.dataItems.findIndex(function (i) {
|
|
381
|
-
return utils_1.getItemValue(i, field) === value;
|
|
381
|
+
return (0, utils_1.getItemValue)(i, field) === value;
|
|
382
382
|
});
|
|
383
383
|
return this.dataItems[index];
|
|
384
384
|
},
|
|
385
385
|
primitiveValue: function primitiveValue() {
|
|
386
386
|
var value = this.computedValue();
|
|
387
|
-
return this.valuePrimitive ? utils_1.getItemValue(value, this.valueField) : value;
|
|
387
|
+
return this.valuePrimitive ? (0, utils_1.getItemValue)(value, this.valueField) : value;
|
|
388
388
|
},
|
|
389
389
|
validity: function validity() {
|
|
390
390
|
var customError = this.$props.validationMessage !== undefined;
|
|
@@ -405,7 +405,7 @@ var DropDownListVue2 = {
|
|
|
405
405
|
defaultItem = _a.defaultItem;
|
|
406
406
|
var skip = virtual ? virtual.skip : 0;
|
|
407
407
|
var item = index === -1 && defaultItem !== undefined ? defaultItem : dataItems[index - skip];
|
|
408
|
-
var newSelected = !utils_1.areSame(item, this.computedValue(), dataItemKey);
|
|
408
|
+
var newSelected = !(0, utils_1.areSame)(item, this.computedValue(), dataItemKey);
|
|
409
409
|
this.triggerOnChange(item, state);
|
|
410
410
|
|
|
411
411
|
if (newSelected) {
|
|
@@ -427,7 +427,7 @@ var DropDownListVue2 = {
|
|
|
427
427
|
var vs = this.base.vs;
|
|
428
428
|
var value = this.computedValue();
|
|
429
429
|
var index = dataItems.findIndex(function (i) {
|
|
430
|
-
return utils_1.areSame(i, value, dataItemKey);
|
|
430
|
+
return (0, utils_1.areSame)(i, value, dataItemKey);
|
|
431
431
|
});
|
|
432
432
|
var newIndex = this.base.navigation.navigate({
|
|
433
433
|
current: virtual.skip + index,
|
|
@@ -469,10 +469,10 @@ var DropDownListVue2 = {
|
|
|
469
469
|
});
|
|
470
470
|
var word = this.searchState.word;
|
|
471
471
|
var last = this.searchState.last;
|
|
472
|
-
var isInLoop = utils_1.sameCharsOnly(word, last);
|
|
472
|
+
var isInLoop = (0, utils_1.sameCharsOnly)(word, last);
|
|
473
473
|
var dataLength = mappedData.length;
|
|
474
474
|
var startIndex = Math.max(0, dataItems.findIndex(function (i) {
|
|
475
|
-
return utils_1.areSame(i, _this.computedValue(), dataItemKey);
|
|
475
|
+
return (0, utils_1.areSame)(i, _this.computedValue(), dataItemKey);
|
|
476
476
|
}));
|
|
477
477
|
var defaultItem;
|
|
478
478
|
|
|
@@ -486,7 +486,7 @@ var DropDownListVue2 = {
|
|
|
486
486
|
}
|
|
487
487
|
|
|
488
488
|
startIndex += isInLoop ? 1 : 0;
|
|
489
|
-
mappedData = utils_1.shuffleData(mappedData, startIndex, defaultItem);
|
|
489
|
+
mappedData = (0, utils_1.shuffleData)(mappedData, startIndex, defaultItem);
|
|
490
490
|
var text,
|
|
491
491
|
loopMatch,
|
|
492
492
|
nextMatch,
|
|
@@ -496,9 +496,9 @@ var DropDownListVue2 = {
|
|
|
496
496
|
ignoreCase = _c.ignoreCase;
|
|
497
497
|
|
|
498
498
|
for (; index < dataLength; index++) {
|
|
499
|
-
text = utils_1.getItemValue(mappedData[index].item, textField);
|
|
500
|
-
loopMatch = isInLoop && utils_1.matchText(text, last, ignoreCase);
|
|
501
|
-
nextMatch = utils_1.matchText(text, word, ignoreCase);
|
|
499
|
+
text = (0, utils_1.getItemValue)(mappedData[index].item, textField);
|
|
500
|
+
loopMatch = isInLoop && (0, utils_1.matchText)(text, last, ignoreCase);
|
|
501
|
+
nextMatch = (0, utils_1.matchText)(text, word, ignoreCase);
|
|
502
502
|
|
|
503
503
|
if (loopMatch || nextMatch) {
|
|
504
504
|
index = mappedData[index].itemIndex;
|
|
@@ -674,7 +674,7 @@ var DropDownListVue2 = {
|
|
|
674
674
|
}
|
|
675
675
|
},
|
|
676
676
|
focusedIndex: function focusedIndex() {
|
|
677
|
-
var filterText = utils_1.isPresent(this.$props.filter) ? this.$props.filter : this.currentText;
|
|
677
|
+
var filterText = (0, utils_1.isPresent)(this.$props.filter) ? this.$props.filter : this.currentText;
|
|
678
678
|
var _a = this.$props,
|
|
679
679
|
_b = _a.dataItems,
|
|
680
680
|
dataItems = _b === void 0 ? [] : _b,
|
|
@@ -687,12 +687,12 @@ var DropDownListVue2 = {
|
|
|
687
687
|
focusedItemIndex = _a.focusedItemIndex;
|
|
688
688
|
var value = this.computedValue();
|
|
689
689
|
var selectedIndex = dataItems.findIndex(function (i) {
|
|
690
|
-
return utils_1.areSame(i, value, dataItemKey);
|
|
690
|
+
return (0, utils_1.areSame)(i, value, dataItemKey);
|
|
691
691
|
});
|
|
692
692
|
var hasSelected = !(selectedIndex < 0 && !this.$props.defaultItem);
|
|
693
693
|
|
|
694
694
|
if (!hasSelected && filterText && virtual.skip === 0) {
|
|
695
|
-
return focusedItemIndex ? focusedItemIndex(dataItems, filterText, textField) : dataItems.indexOf(utils_1.getFocusedItem(dataItems, filterText, textField));
|
|
695
|
+
return focusedItemIndex ? focusedItemIndex(dataItems, filterText, textField) : dataItems.indexOf((0, utils_1.getFocusedItem)(dataItems, filterText, textField));
|
|
696
696
|
} else {
|
|
697
697
|
return !hasSelected && virtual.skip === 0 ? 0 : undefined;
|
|
698
698
|
}
|
|
@@ -712,7 +712,7 @@ var DropDownListVue2 = {
|
|
|
712
712
|
}
|
|
713
713
|
},
|
|
714
714
|
triggerOnChange: function triggerOnChange(item, state) {
|
|
715
|
-
if (utils_1.areSame(this.computedValue(), item, this.$props.dataItemKey)) {
|
|
715
|
+
if ((0, utils_1.areSame)(this.computedValue(), item, this.$props.dataItemKey)) {
|
|
716
716
|
return;
|
|
717
717
|
}
|
|
718
718
|
|
|
@@ -747,7 +747,7 @@ var DropDownListVue2 = {
|
|
|
747
747
|
rounded = _b.rounded,
|
|
748
748
|
fillMode = _b.fillMode;
|
|
749
749
|
var opened = this.$props.opened !== undefined ? this.$props.opened : this.currentOpened;
|
|
750
|
-
var text = utils_1.getItemValue(this.computedValue(), this.$props.textField);
|
|
750
|
+
var text = (0, utils_1.getItemValue)(this.computedValue(), this.$props.textField);
|
|
751
751
|
var isValid = !this.$props.validityStyles || this.validity().valid;
|
|
752
752
|
var base = this.base;
|
|
753
753
|
var vs = base.vs;
|
|
@@ -769,7 +769,7 @@ var DropDownListVue2 = {
|
|
|
769
769
|
var focused = this.currentFocused;
|
|
770
770
|
var value = this.primitiveValue();
|
|
771
771
|
var selectedIndex = dataItems.findIndex(function (i) {
|
|
772
|
-
return utils_1.areSame(i, value, dataItemKey);
|
|
772
|
+
return (0, utils_1.areSame)(i, value, dataItemKey);
|
|
773
773
|
});
|
|
774
774
|
var valueDefaultRendering = h("span", {
|
|
775
775
|
"class": "k-input-inner"
|
|
@@ -797,7 +797,7 @@ var DropDownListVue2 = {
|
|
|
797
797
|
title: this.$props.label
|
|
798
798
|
},
|
|
799
799
|
id: id,
|
|
800
|
-
ref: kendo_vue_common_1.setRef(this, 'select'),
|
|
800
|
+
ref: (0, kendo_vue_common_1.setRef)(this, 'select'),
|
|
801
801
|
tabindex: -1,
|
|
802
802
|
"aria-hidden": true,
|
|
803
803
|
title: this.$props.label,
|
|
@@ -827,10 +827,10 @@ var DropDownListVue2 = {
|
|
|
827
827
|
attrs: this.v3 ? undefined : {
|
|
828
828
|
defaultItem: defaultItem,
|
|
829
829
|
textField: textField,
|
|
830
|
-
selected: utils_1.areSame(this.computedValue(), defaultItem, dataItemKey)
|
|
830
|
+
selected: (0, utils_1.areSame)(this.computedValue(), defaultItem, dataItemKey)
|
|
831
831
|
},
|
|
832
832
|
textField: textField,
|
|
833
|
-
selected: utils_1.areSame(this.computedValue(), defaultItem, dataItemKey),
|
|
833
|
+
selected: (0, utils_1.areSame)(this.computedValue(), defaultItem, dataItemKey),
|
|
834
834
|
key: "defaultitemkey",
|
|
835
835
|
onDefaultitemclick: this.handleDefaultItemClick,
|
|
836
836
|
on: this.v3 ? undefined : {
|
|
@@ -846,7 +846,7 @@ var DropDownListVue2 = {
|
|
|
846
846
|
var itemRender = kendo_vue_common_1.templateRendering.call(this, this.$props.itemRender, kendo_vue_common_1.getListeners.call(this));
|
|
847
847
|
var listNoDataRender = kendo_vue_common_1.templateRendering.call(this, this.$props.listNoDataRender, kendo_vue_common_1.getListeners.call(this));
|
|
848
848
|
var skip = virtual.skip;
|
|
849
|
-
var translate = "translateY("
|
|
849
|
+
var translate = "translateY(".concat(vs.translate, "px)");
|
|
850
850
|
return (// @ts-ignore function children
|
|
851
851
|
h(List_1.List, {
|
|
852
852
|
id: this.base.listBoxId,
|
|
@@ -962,22 +962,20 @@ var DropDownListVue2 = {
|
|
|
962
962
|
dir: dir !== undefined ? dir : base.dirCalculated,
|
|
963
963
|
width: popupWidth // @ts-ignore
|
|
964
964
|
,
|
|
965
|
-
popupSettings: {
|
|
966
|
-
popupClass: kendo_vue_common_1.classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-"
|
|
967
|
-
className: popupSettings.className,
|
|
968
|
-
animate: popupSettings.animate,
|
|
965
|
+
popupSettings: __assign(__assign({}, popupSettings), {
|
|
966
|
+
popupClass: (0, kendo_vue_common_1.classNames)(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-".concat(sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
|
|
967
|
+
className: (0, kendo_vue_common_1.classNames)('k-list-container', popupSettings.className),
|
|
969
968
|
anchor: this.anchor,
|
|
970
969
|
show: opened
|
|
971
|
-
}
|
|
970
|
+
})
|
|
972
971
|
},
|
|
973
972
|
width: popupWidth,
|
|
974
|
-
popupSettings: {
|
|
975
|
-
popupClass: kendo_vue_common_1.classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-"
|
|
976
|
-
className: popupSettings.className,
|
|
977
|
-
animate: popupSettings.animate,
|
|
973
|
+
popupSettings: __assign(__assign({}, popupSettings), {
|
|
974
|
+
popupClass: (0, kendo_vue_common_1.classNames)(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-".concat(sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
|
|
975
|
+
className: (0, kendo_vue_common_1.classNames)('k-list-container', popupSettings.className),
|
|
978
976
|
anchor: this.anchor,
|
|
979
977
|
show: opened
|
|
980
|
-
},
|
|
978
|
+
}),
|
|
981
979
|
onOpen: this.onPopupOpened,
|
|
982
980
|
onClose: this.onPopupClosed,
|
|
983
981
|
onBlur: this.handleBlur
|
|
@@ -1004,15 +1002,15 @@ var DropDownListVue2 = {
|
|
|
1004
1002
|
}
|
|
1005
1003
|
|
|
1006
1004
|
var dropdownlist = h("span", {
|
|
1007
|
-
ref: kendo_vue_common_1.setRef(this, 'kendoAnchor', this.anchor),
|
|
1008
|
-
"class": kendo_vue_common_1.classNames('k-dropdownlist k-picker', className, (_a = {}, _a["k-picker-"
|
|
1005
|
+
ref: (0, kendo_vue_common_1.setRef)(this, 'kendoAnchor', this.anchor),
|
|
1006
|
+
"class": (0, kendo_vue_common_1.classNames)('k-dropdownlist k-picker', className, (_a = {}, _a["k-picker-".concat(sizeMap[size] || size)] = size, _a["k-rounded-".concat(roundedMap[rounded] || rounded)] = rounded, _a["k-picker-".concat(fillMode)] = fillMode, _a['k-focus'] = focused, _a['k-disabled'] = disabled, _a['k-invalid'] = !isValid, _a['k-loading'] = loading, _a['k-required'] = this.required, _a)),
|
|
1009
1007
|
style: !label ? style : __assign(__assign({}, style), {
|
|
1010
1008
|
width: undefined
|
|
1011
1009
|
}),
|
|
1012
1010
|
dir: dir,
|
|
1013
1011
|
attrs: this.v3 ? undefined : {
|
|
1014
1012
|
dir: dir,
|
|
1015
|
-
tabindex: kendo_vue_common_1.getTabIndex(tabIndex, disabled),
|
|
1013
|
+
tabindex: (0, kendo_vue_common_1.getTabIndex)(tabIndex, disabled),
|
|
1016
1014
|
accesskey: this.$props.accessKey,
|
|
1017
1015
|
role: 'listbox',
|
|
1018
1016
|
"aria-disabled": disabled || undefined,
|
|
@@ -1037,7 +1035,7 @@ var DropDownListVue2 = {
|
|
|
1037
1035
|
},
|
|
1038
1036
|
onFocusin: this.handleFocus,
|
|
1039
1037
|
onFocusout: this.handleBlur,
|
|
1040
|
-
tabindex: kendo_vue_common_1.getTabIndex(tabIndex, disabled),
|
|
1038
|
+
tabindex: (0, kendo_vue_common_1.getTabIndex)(tabIndex, disabled),
|
|
1041
1039
|
accesskey: this.$props.accessKey,
|
|
1042
1040
|
onKeydown: this.handleKeyDown,
|
|
1043
1041
|
onKeypress: this.handleKeyPress,
|
|
@@ -1065,22 +1063,14 @@ var DropDownListVue2 = {
|
|
|
1065
1063
|
size: size,
|
|
1066
1064
|
fillMode: fillMode,
|
|
1067
1065
|
rounded: null,
|
|
1068
|
-
iconClass: kendo_vue_common_1.classNames('k-icon k-i-arrow-s', iconClassName)
|
|
1066
|
+
iconClass: (0, kendo_vue_common_1.classNames)('k-icon k-i-arrow-s', iconClassName)
|
|
1069
1067
|
},
|
|
1070
1068
|
tabIndex: -1,
|
|
1071
1069
|
size: size,
|
|
1072
1070
|
fillMode: fillMode,
|
|
1073
1071
|
rounded: null,
|
|
1074
1072
|
"class": 'k-input-button',
|
|
1075
|
-
iconClass: kendo_vue_common_1.classNames('k-icon k-i-arrow-s', iconClassName)
|
|
1076
|
-
onMousedown: function onMousedown(e) {
|
|
1077
|
-
return e.preventDefault();
|
|
1078
|
-
},
|
|
1079
|
-
on: this.v3 ? undefined : {
|
|
1080
|
-
"mousedown": function onMousedown(e) {
|
|
1081
|
-
return e.preventDefault();
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1073
|
+
iconClass: (0, kendo_vue_common_1.classNames)('k-icon k-i-arrow-s', iconClassName)
|
|
1084
1074
|
}), dummySelect.call(this, value), renderListContainer.call(this)]);
|
|
1085
1075
|
return label ? h("span", {
|
|
1086
1076
|
"class": this.spanClassNames,
|