@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.
Files changed (68) hide show
  1. package/dist/cdn/js/kendo-vue-dropdowns.js +1 -1
  2. package/dist/es/AutoComplete/AutoComplete.d.ts +5 -6
  3. package/dist/es/AutoComplete/AutoComplete.js +63 -29
  4. package/dist/es/AutoComplete/AutoCompleteProps.d.ts +39 -0
  5. package/dist/es/ComboBox/ComboBox.d.ts +5 -6
  6. package/dist/es/ComboBox/ComboBox.js +90 -51
  7. package/dist/es/ComboBox/ComboBoxProps.d.ts +39 -0
  8. package/dist/es/DropDownList/DropDownList.d.ts +5 -6
  9. package/dist/es/DropDownList/DropDownList.js +152 -121
  10. package/dist/es/DropDownList/DropDownListProps.d.ts +43 -0
  11. package/dist/es/MultiSelect/MultiSelect.d.ts +5 -6
  12. package/dist/es/MultiSelect/MultiSelect.js +84 -47
  13. package/dist/es/MultiSelect/MultiSelectProps.d.ts +53 -0
  14. package/dist/es/MultiSelect/TagList.d.ts +8 -4
  15. package/dist/es/MultiSelect/TagList.js +60 -11
  16. package/dist/es/additionalTypes.ts +7 -1
  17. package/dist/es/common/ClearButton.d.ts +5 -6
  18. package/dist/es/common/ClearButton.js +7 -5
  19. package/dist/es/common/DropDownBase.d.ts +4 -5
  20. package/dist/es/common/List.d.ts +5 -4
  21. package/dist/es/common/List.js +4 -3
  22. package/dist/es/common/ListContainer.d.ts +5 -6
  23. package/dist/es/common/ListContainer.js +7 -4
  24. package/dist/es/common/ListDefaultItem.d.ts +5 -6
  25. package/dist/es/common/ListDefaultItem.js +4 -4
  26. package/dist/es/common/ListFilter.d.ts +5 -6
  27. package/dist/es/common/ListFilter.js +4 -6
  28. package/dist/es/common/ListItem.d.ts +5 -6
  29. package/dist/es/common/ListItem.js +14 -9
  30. package/dist/es/common/SearchBar.d.ts +6 -6
  31. package/dist/es/common/SearchBar.js +13 -13
  32. package/dist/es/main.d.ts +5 -5
  33. package/dist/es/main.js +5 -5
  34. package/dist/es/package-metadata.js +1 -1
  35. package/dist/npm/AutoComplete/AutoComplete.d.ts +5 -6
  36. package/dist/npm/AutoComplete/AutoComplete.js +64 -30
  37. package/dist/npm/AutoComplete/AutoCompleteProps.d.ts +39 -0
  38. package/dist/npm/ComboBox/ComboBox.d.ts +5 -6
  39. package/dist/npm/ComboBox/ComboBox.js +93 -52
  40. package/dist/npm/ComboBox/ComboBoxProps.d.ts +39 -0
  41. package/dist/npm/DropDownList/DropDownList.d.ts +5 -6
  42. package/dist/npm/DropDownList/DropDownList.js +155 -122
  43. package/dist/npm/DropDownList/DropDownListProps.d.ts +43 -0
  44. package/dist/npm/MultiSelect/MultiSelect.d.ts +5 -6
  45. package/dist/npm/MultiSelect/MultiSelect.js +86 -48
  46. package/dist/npm/MultiSelect/MultiSelectProps.d.ts +53 -0
  47. package/dist/npm/MultiSelect/TagList.d.ts +8 -4
  48. package/dist/npm/MultiSelect/TagList.js +60 -10
  49. package/dist/npm/additionalTypes.ts +7 -1
  50. package/dist/npm/common/ClearButton.d.ts +5 -6
  51. package/dist/npm/common/ClearButton.js +9 -7
  52. package/dist/npm/common/DropDownBase.d.ts +4 -5
  53. package/dist/npm/common/List.d.ts +5 -4
  54. package/dist/npm/common/List.js +5 -3
  55. package/dist/npm/common/ListContainer.d.ts +5 -6
  56. package/dist/npm/common/ListContainer.js +9 -6
  57. package/dist/npm/common/ListDefaultItem.d.ts +5 -6
  58. package/dist/npm/common/ListDefaultItem.js +6 -6
  59. package/dist/npm/common/ListFilter.d.ts +5 -6
  60. package/dist/npm/common/ListFilter.js +6 -8
  61. package/dist/npm/common/ListItem.d.ts +5 -6
  62. package/dist/npm/common/ListItem.js +15 -10
  63. package/dist/npm/common/SearchBar.d.ts +6 -6
  64. package/dist/npm/common/SearchBar.js +15 -15
  65. package/dist/npm/main.d.ts +5 -5
  66. package/dist/npm/main.js +5 -5
  67. package/dist/npm/package-metadata.js +1 -1
  68. package/package.json +5 -4
@@ -19,7 +19,7 @@ var __assign = undefined && undefined.__assign || function () {
19
19
  Object.defineProperty(exports, "__esModule", {
20
20
  value: true
21
21
  });
22
- exports.ComboBoxVue3 = exports.ComboBox = void 0; // @ts-ignore
22
+ exports.ComboBoxVue2 = exports.ComboBox = void 0; // @ts-ignore
23
23
 
24
24
  var Vue = require("vue");
25
25
 
@@ -31,6 +31,11 @@ var DropDownBase_1 = require("../common/DropDownBase");
31
31
 
32
32
  var kendo_vue_common_1 = require("@progress/kendo-vue-common");
33
33
 
34
+ var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
35
+
36
+ var sizeMap = kendo_vue_common_1.kendoThemeMaps.sizeMap,
37
+ roundedMap = kendo_vue_common_1.kendoThemeMaps.roundedMap;
38
+
34
39
  var utils_1 = require("../common/utils");
35
40
 
36
41
  var SearchBar_1 = require("../common/SearchBar");
@@ -46,7 +51,7 @@ var VALIDATION_MESSAGE = 'Please enter a valid value!';
46
51
  * Represents the default `ComboBox` component.
47
52
  */
48
53
 
49
- var ComboBox = {
54
+ var ComboBoxVue2 = {
50
55
  name: 'KendoComboBox',
51
56
  model: {
52
57
  event: 'changemodel'
@@ -155,7 +160,28 @@ var ComboBox = {
155
160
  default: true
156
161
  },
157
162
  ariaLabelledBy: String,
158
- ariaDescribedBy: String
163
+ ariaDescribedBy: String,
164
+ rounded: {
165
+ type: String,
166
+ default: 'medium',
167
+ validator: function validator(value) {
168
+ return ['small', 'medium', 'large', 'full'].includes(value);
169
+ }
170
+ },
171
+ fillMode: {
172
+ type: String,
173
+ default: 'solid',
174
+ validator: function validator(value) {
175
+ return ['solid', 'flat', 'outline'].includes(value);
176
+ }
177
+ },
178
+ size: {
179
+ type: String,
180
+ default: 'medium',
181
+ validator: function validator(value) {
182
+ return ['small', 'medium', 'large'].includes(value);
183
+ }
184
+ }
159
185
  },
160
186
  data: function data() {
161
187
  return {
@@ -201,8 +227,8 @@ var ComboBox = {
201
227
  this.hasMounted = true; // @ts-ignore
202
228
 
203
229
  this.input = this.v3 ? this.inputRef.input : this.$refs.input.input;
204
- this.base.wrapper = this.v3 ? this.baseWrapperRef : this.$refs.baseWrapper;
205
- this.element = this.v3 ? this.elementRef : this.$refs.element;
230
+ this.base.wrapper = this.v3 ? this.kendoAnchorRef : this.$refs[this.anchor];
231
+ this.element = this.v3 ? this.kendoAnchorRef : this.$refs[this.anchor];
206
232
  this.base.didMount();
207
233
  this.setValidity();
208
234
  },
@@ -305,10 +331,10 @@ var ComboBox = {
305
331
  get: function get() {
306
332
  var isValid = !this.hasMounted || !this.$props.validityStyles || this.validity().valid;
307
333
  return {
308
- 'k-textbox-container': true,
309
- 'k-state-focused': this.currentFocused,
310
- 'k-state-empty': !this.computedValue(),
311
- 'k-state-invalid': !isValid && isValid !== undefined,
334
+ 'k-floating-label-container': true,
335
+ 'k-focus': this.currentFocused,
336
+ 'k-empty': !this.computedValue(),
337
+ 'k-invalid': !isValid && isValid !== undefined,
312
338
  'k-rtl': this.$props.dir === 'rtl'
313
339
  };
314
340
  }
@@ -696,20 +722,25 @@ var ComboBox = {
696
722
  }
697
723
  },
698
724
  render: function render(createElement) {
725
+ var _a;
726
+
699
727
  var _this = this;
700
728
 
701
729
  var h = gh || createElement;
702
- var _a = this.$props,
703
- dir = _a.dir,
704
- disabled = _a.disabled,
705
- clearButton = _a.clearButton,
706
- label = _a.label,
707
- textField = _a.textField,
708
- className = _a.className,
709
- style = _a.style,
710
- loading = _a.loading,
711
- iconClassName = _a.iconClassName,
712
- virtual = _a.virtual;
730
+ var _b = this.$props,
731
+ dir = _b.dir,
732
+ disabled = _b.disabled,
733
+ clearButton = _b.clearButton,
734
+ label = _b.label,
735
+ textField = _b.textField,
736
+ className = _b.className,
737
+ style = _b.style,
738
+ loading = _b.loading,
739
+ iconClassName = _b.iconClassName,
740
+ virtual = _b.virtual,
741
+ size = _b.size,
742
+ fillMode = _b.fillMode,
743
+ rounded = _b.rounded;
713
744
  var focused = this.currentFocused;
714
745
  var isValid = !this.$props.validityStyles || this.validity().valid;
715
746
  var text = this.$props.filter !== undefined ? this.$props.filter : this.currentText;
@@ -763,12 +794,13 @@ var ComboBox = {
763
794
  valueField: dataItemKey,
764
795
  optionsGuid: base.guid,
765
796
  wrapperStyle: !vs.enabled ? {
766
- maxHeight: popupSettings.height
797
+ maxHeight: popupSettings.height,
798
+ overflowY: 'scroll'
767
799
  } : {
768
800
  float: 'left',
769
801
  width: '100%'
770
802
  },
771
- wrapperCssClass: !vs.enabled ? 'k-list-scroller' : undefined,
803
+ wrapperCssClass: 'k-list-content',
772
804
  listStyle: vs.enabled ? {
773
805
  transform: translate
774
806
  } : undefined,
@@ -785,12 +817,13 @@ var ComboBox = {
785
817
  optionsGuid: base.guid,
786
818
  ref: 'list',
787
819
  wrapperStyle: !vs.enabled ? {
788
- maxHeight: popupSettings.height
820
+ maxHeight: popupSettings.height,
821
+ overflowY: 'scroll'
789
822
  } : {
790
823
  float: 'left',
791
824
  width: '100%'
792
825
  },
793
- wrapperCssClass: !vs.enabled ? 'k-list-scroller' : undefined,
826
+ wrapperCssClass: 'k-list-content',
794
827
  listStyle: vs.enabled ? {
795
828
  transform: translate
796
829
  } : undefined,
@@ -831,6 +864,8 @@ var ComboBox = {
831
864
  var renderListContainer = function renderListContainer() {
832
865
  var _this2 = this;
833
866
 
867
+ var _a;
868
+
834
869
  var headerTemplate = kendo_vue_common_1.templateRendering.call(this, this.$props.header, kendo_vue_common_1.getListeners.call(this));
835
870
  var footerTemplate = kendo_vue_common_1.templateRendering.call(this, this.$props.footer, kendo_vue_common_1.getListeners.call(this));
836
871
  var header = kendo_vue_common_1.getTemplate.call(this, {
@@ -860,7 +895,8 @@ var ComboBox = {
860
895
  animate: popupSettings.animate,
861
896
  anchor: this.anchor,
862
897
  show: opened,
863
- className: kendo_vue_common_1.classNames('k-list-container k-reset', popupSettings.className),
898
+ popupClass: kendo_vue_common_1.classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
899
+ className: popupSettings.className,
864
900
  appendTo: popupSettings.appendTo
865
901
  },
866
902
  dir: dir !== undefined ? dir : this.base.dirCalculated
@@ -869,13 +905,22 @@ var ComboBox = {
869
905
  animate: popupSettings.animate,
870
906
  anchor: this.anchor,
871
907
  show: opened,
872
- className: kendo_vue_common_1.classNames('k-list-container k-reset', popupSettings.className),
908
+ popupClass: kendo_vue_common_1.classNames(popupSettings.popupClass, 'k-list', (_a = {}, _a["k-list-" + (sizeMap[size] || size)] = size, _a['k-virtual-list'] = this.base.vs.enabled, _a)),
909
+ className: popupSettings.className,
873
910
  appendTo: popupSettings.appendTo
874
911
  },
875
912
  dir: dir !== undefined ? dir : this.base.dirCalculated
876
913
  }, this.v3 ? function () {
877
- return [header, renderScrollWrapper.call(_this2, [renderList.call(_this2), renderScrollElement.call(_this2)]), footer];
878
- } : [header, renderScrollWrapper.call(_this2, [renderList.call(_this2), renderScrollElement.call(_this2)]), footer])
914
+ return [header && h("div", {
915
+ "class": "k-list-header"
916
+ }, [header]), renderScrollWrapper.call(_this2, [renderList.call(_this2), renderScrollElement.call(_this2)]), footer && h("div", {
917
+ "class": "k-list-footer"
918
+ }, [footer])];
919
+ } : [header && h("div", {
920
+ "class": "k-list-header"
921
+ }, [header]), renderScrollWrapper.call(_this2, [renderList.call(_this2), renderScrollElement.call(_this2)]), footer && h("div", {
922
+ "class": "k-list-footer"
923
+ }, [footer])])
879
924
  );
880
925
  };
881
926
 
@@ -951,10 +996,7 @@ var ComboBox = {
951
996
  };
952
997
 
953
998
  var combobox = h("span", {
954
- "class": kendo_vue_common_1.classNames('k-widget k-combobox', {
955
- 'k-combobox-clearable': clearButton,
956
- 'k-state-invalid': !isValid
957
- }, className),
999
+ "class": kendo_vue_common_1.classNames('k-combobox k-input', (_a = {}, _a["k-input-" + (sizeMap[size] || size)] = size, _a["k-rounded-" + (roundedMap[rounded] || rounded)] = rounded, _a["k-input-" + fillMode] = fillMode, _a['k-valid'] = isValid, _a['k-invalid'] = !isValid, _a['k-loading'] = loading, _a['k-required'] = this.required, _a['k-disabled'] = disabled, _a['k-focus'] = focused && !disabled, _a), className),
958
1000
  ref: this.v3 ? function (el) {
959
1001
  _this.kendoAnchorRef = el;
960
1002
  } : this.anchor,
@@ -965,23 +1007,27 @@ var ComboBox = {
965
1007
  attrs: this.v3 ? undefined : {
966
1008
  dir: dir
967
1009
  }
968
- }, [h("span", {
969
- ref: this.v3 ? function (el) {
970
- _this.baseWrapperRef = el;
971
- } : 'baseWrapper',
972
- "class": kendo_vue_common_1.classNames('k-dropdown-wrap', {
973
- 'k-state-disabled': disabled,
974
- 'k-state-focused': focused && !disabled
975
- })
976
- }, [renderSearchBar.call(this, inputText || '', id), renderClearButton && // @ts-ignore function children
1010
+ }, [renderSearchBar.call(this, inputText || '', id), renderClearButton && !loading && // @ts-ignore function children
977
1011
  h(ClearButton_1.ClearButton, {
978
1012
  onClearclick: this.clearButtonClick,
979
1013
  on: this.v3 ? undefined : {
980
1014
  "clearclick": this.clearButtonClick
981
1015
  },
982
1016
  key: "clearbutton"
983
- }), h("span", {
984
- "class": "k-select",
1017
+ }), loading && h("span", {
1018
+ "class": "k-icon k-i-loading",
1019
+ key: "loading"
1020
+ }), // @ts-ignore
1021
+ h(kendo_vue_buttons_1.Button, {
1022
+ size: size,
1023
+ attrs: this.v3 ? undefined : {
1024
+ size: size,
1025
+ fillMode: fillMode,
1026
+ iconClass: kendo_vue_common_1.classNames('k-icon k-i-arrow-s', iconClassName)
1027
+ },
1028
+ fillMode: fillMode,
1029
+ "class": 'k-input-button',
1030
+ iconClass: kendo_vue_common_1.classNames('k-icon k-i-arrow-s', iconClassName),
985
1031
  onClick: this.toggleBtnClick,
986
1032
  on: this.v3 ? undefined : {
987
1033
  "click": this.toggleBtnClick,
@@ -992,12 +1038,7 @@ var ComboBox = {
992
1038
  onMousedown: function mousedown(e) {
993
1039
  return e.preventDefault();
994
1040
  }
995
- }, [h("span", {
996
- "class": kendo_vue_common_1.classNames('k-icon', iconClassName, {
997
- 'k-i-arrow-s': !loading && !iconClassName,
998
- 'k-i-loading': loading && !iconClassName
999
- })
1000
- })])]), renderListContainer.call(this)]);
1041
+ }), renderListContainer.call(this)]);
1001
1042
  return label ? h("span", {
1002
1043
  "class": this.spanClassNames,
1003
1044
  onFocusin: this.handleFocus,
@@ -1019,6 +1060,6 @@ var ComboBox = {
1019
1060
  }, [this.$props.label]) : null]) : combobox;
1020
1061
  }
1021
1062
  };
1022
- exports.ComboBox = ComboBox;
1023
- var ComboBoxVue3 = ComboBox;
1024
- exports.ComboBoxVue3 = ComboBoxVue3;
1063
+ exports.ComboBoxVue2 = ComboBoxVue2;
1064
+ var ComboBox = ComboBoxVue2;
1065
+ exports.ComboBox = ComboBox;
@@ -195,4 +195,43 @@ export interface ComboBoxProps extends FormComponentProps {
195
195
  * Sets the footer component of the ComboBox ([see example]({% slug customrendering_combobox %}#toc-headers-and-footers)).
196
196
  */
197
197
  footer?: any;
198
+ /**
199
+ * Configures the `size` of the ComboBox.
200
+ *
201
+ * The available options are:
202
+ * - small
203
+ * - medium
204
+ * - large
205
+ * - null—Does not set a size `class`.
206
+ *
207
+ * @default `medium`
208
+ */
209
+ size?: null | 'small' | 'medium' | 'large' | string;
210
+ /**
211
+ * Configures the `roundness` of the ComboBox.
212
+ *
213
+ * The available options are:
214
+ * - small
215
+ * - medium
216
+ * - large
217
+ * - circle
218
+ * - full
219
+ * - null—Does not set a rounded `class`.
220
+ *
221
+ * @default `medium`
222
+ */
223
+ rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
224
+ /**
225
+ * Configures the `fillMode` of the ComboBox.
226
+ *
227
+ * The available options are:
228
+ * - solid
229
+ * - outline
230
+ * - flat
231
+ * - link
232
+ * - null—Does not set a fillMode `class`.
233
+ *
234
+ * @default `solid`
235
+ */
236
+ fillMode?: null | 'solid' | 'outline' | 'flat' | string;
198
237
  }
@@ -1,10 +1,9 @@
1
- import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
2
1
  declare type DefaultData<V> = object | ((this: V) => DropDownListData);
3
2
  declare type DefaultMethods<V> = {
4
3
  [key: string]: (this: V, ...args: any[]) => any;
5
4
  };
6
5
  import { FormComponentValidity } from '@progress/kendo-vue-common';
7
- import { DefineComponent } from '../additionalTypes';
6
+ import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from '../additionalTypes';
8
7
  import { DropDownListProps } from './DropDownListProps';
9
8
  import { DropDownStateBase, InternalState } from './../common/settings';
10
9
  /**
@@ -89,11 +88,11 @@ export interface DropDownListComputed {
89
88
  /**
90
89
  * @hidden
91
90
  */
92
- export interface DropDownListAll extends DropDownListMethods, DropDownListState, DropDownListData, DropDownListComputed, Vue {
91
+ export interface DropDownListAll extends DropDownListMethods, DropDownListState, DropDownListData, DropDownListComputed, Vue2type {
93
92
  }
94
93
  /**
95
94
  * Represents the default `DropDownList` component.
96
95
  */
97
- declare let DropDownList: ComponentOptions<Vue, DefaultData<DropDownListData>, DefaultMethods<DropDownListAll>, DropDownListComputed, RecordPropsDefinition<DropDownListProps>>;
98
- declare let DropDownListVue3: DefineComponent<DropDownListProps, any, DropDownListData, DropDownListComputed, DropDownListMethods, {}, {}, {}, string, DropDownListProps, DropDownListProps, {}>;
99
- export { DropDownList, DropDownListVue3 };
96
+ declare let DropDownListVue2: ComponentOptions<Vue2type, DefaultData<DropDownListData>, DefaultMethods<DropDownListAll>, DropDownListComputed, RecordPropsDefinition<DropDownListProps>>;
97
+ declare let DropDownList: DefineComponent<DropDownListProps, any, DropDownListData, DropDownListComputed, DropDownListMethods, {}, {}, {}, string, DropDownListProps, DropDownListProps, {}>;
98
+ export { DropDownList, DropDownListVue2 };