@progress/kendo-react-dropdowns 5.4.0-dev.202205271059 → 5.4.0-dev.202206061009

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 (70) hide show
  1. package/dist/cdn/js/kendo-react-dropdowns.js +1 -1
  2. package/dist/es/AutoComplete/AutoComplete.d.ts +6 -6
  3. package/dist/es/AutoComplete/AutoComplete.js +6 -4
  4. package/dist/es/ComboBox/ComboBox.d.ts +6 -6
  5. package/dist/es/ComboBox/ComboBox.js +12 -10
  6. package/dist/es/DropDownList/DropDownList.d.ts +3 -6
  7. package/dist/es/DropDownList/DropDownList.js +10 -8
  8. package/dist/es/DropDownTree/DropDownTree.d.ts +1 -1
  9. package/dist/es/DropDownTree/DropDownTree.js +15 -11
  10. package/dist/es/MultiColumnComboBox/MultiColumnComboBox.d.ts +2 -2
  11. package/dist/es/MultiColumnComboBox/MultiColumnComboBox.js +1 -1
  12. package/dist/es/MultiSelect/MultiSelect.d.ts +5 -5
  13. package/dist/es/MultiSelect/MultiSelect.js +23 -17
  14. package/dist/es/MultiSelect/TagList.d.ts +1 -0
  15. package/dist/es/MultiSelect/TagList.js +1 -1
  16. package/dist/es/MultiSelectTree/MultiSelectTree.d.ts +1 -1
  17. package/dist/es/MultiSelectTree/MultiSelectTree.js +14 -10
  18. package/dist/es/MultiSelectTree/utils.d.ts +1 -1
  19. package/dist/es/MultiSelectTree/utils.js +10 -6
  20. package/dist/es/common/DropDownBase.d.ts +1 -1
  21. package/dist/es/common/DropDownBase.js +2 -0
  22. package/dist/es/common/List.d.ts +2 -2
  23. package/dist/es/common/List.js +1 -1
  24. package/dist/es/common/ListContainer.d.ts +1 -0
  25. package/dist/es/common/ListFilter.js +6 -4
  26. package/dist/es/common/ListItem.d.ts +1 -1
  27. package/dist/es/common/Navigation.d.ts +1 -1
  28. package/dist/es/common/SearchBar.d.ts +1 -1
  29. package/dist/es/common/SearchBar.js +3 -1
  30. package/dist/es/common/VirtualScroll.d.ts +1 -1
  31. package/dist/es/common/VirtualScroll.js +5 -1
  32. package/dist/es/package-metadata.js +1 -1
  33. package/dist/npm/AutoComplete/AutoComplete.d.ts +6 -6
  34. package/dist/npm/AutoComplete/AutoComplete.js +21 -19
  35. package/dist/npm/ComboBox/ComboBox.d.ts +6 -6
  36. package/dist/npm/ComboBox/ComboBox.js +46 -44
  37. package/dist/npm/DropDownList/DropDownList.d.ts +3 -6
  38. package/dist/npm/DropDownList/DropDownList.js +37 -35
  39. package/dist/npm/DropDownTree/DropDownTree.d.ts +1 -1
  40. package/dist/npm/DropDownTree/DropDownTree.js +31 -27
  41. package/dist/npm/MultiColumnComboBox/MultiColumnComboBox.d.ts +2 -2
  42. package/dist/npm/MultiColumnComboBox/MultiColumnComboBox.js +10 -10
  43. package/dist/npm/MultiSelect/MultiSelect.d.ts +5 -5
  44. package/dist/npm/MultiSelect/MultiSelect.js +43 -37
  45. package/dist/npm/MultiSelect/TagList.d.ts +1 -0
  46. package/dist/npm/MultiSelect/TagList.js +1 -1
  47. package/dist/npm/MultiSelectTree/MultiSelectTree.d.ts +1 -1
  48. package/dist/npm/MultiSelectTree/MultiSelectTree.js +28 -24
  49. package/dist/npm/MultiSelectTree/utils.d.ts +1 -1
  50. package/dist/npm/MultiSelectTree/utils.js +17 -13
  51. package/dist/npm/common/ClearButton.js +2 -2
  52. package/dist/npm/common/DropDownBase.d.ts +1 -1
  53. package/dist/npm/common/DropDownBase.js +7 -5
  54. package/dist/npm/common/List.d.ts +2 -2
  55. package/dist/npm/common/List.js +7 -7
  56. package/dist/npm/common/ListContainer.d.ts +1 -0
  57. package/dist/npm/common/ListDefaultItem.js +2 -2
  58. package/dist/npm/common/ListFilter.js +7 -5
  59. package/dist/npm/common/ListItem.d.ts +1 -1
  60. package/dist/npm/common/ListItem.js +2 -2
  61. package/dist/npm/common/Navigation.d.ts +1 -1
  62. package/dist/npm/common/Navigation.js +1 -1
  63. package/dist/npm/common/SearchBar.d.ts +1 -1
  64. package/dist/npm/common/SearchBar.js +3 -1
  65. package/dist/npm/common/VirtualScroll.d.ts +1 -1
  66. package/dist/npm/common/VirtualScroll.js +5 -1
  67. package/dist/npm/main.js +5 -1
  68. package/dist/npm/package-metadata.js +1 -1
  69. package/dist/systemjs/kendo-react-dropdowns.js +1 -1
  70. package/package.json +13 -13
@@ -21,6 +21,8 @@ import { guid } from '@progress/kendo-react-common';
21
21
  var DropDownBase = /** @class */ (function () {
22
22
  function DropDownBase(component) {
23
23
  var _this = this;
24
+ this.wrapper = null;
25
+ this.list = null;
24
26
  this.vs = new VirtualScroll();
25
27
  this.navigation = new Navigation();
26
28
  this.handleItemClick = function (index, event) {
@@ -36,6 +36,6 @@ export interface ListProps {
36
36
  */
37
37
  export default class List extends React.Component<ListProps> {
38
38
  renderItems(): JSX.Element[];
39
- renderNoValueElement(localizationService: LocalizationService): any;
40
- render(): any;
39
+ renderNoValueElement(localizationService: LocalizationService): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
40
+ render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
41
41
  }
@@ -44,7 +44,7 @@ var List = /** @class */ (function (_super) {
44
44
  group = current;
45
45
  }
46
46
  }
47
- return (React.createElement(ListItem, { id: "option-" + optionsGuid + "-" + realIndex, virtual: virtual, dataItem: item, selected: selected, focused: focusedIndex === index, index: realIndex, key: realIndex, onClick: _this.props.onClick, textField: textField, group: group, render: itemRender }));
47
+ return (React.createElement(ListItem, { id: "option-".concat(optionsGuid, "-").concat(realIndex), virtual: virtual, dataItem: item, selected: selected, focused: focusedIndex === index, index: realIndex, key: realIndex, onClick: _this.props.onClick, textField: textField, group: group, render: itemRender }));
48
48
  });
49
49
  };
50
50
  List.prototype.renderNoValueElement = function (localizationService) {
@@ -8,6 +8,7 @@ export interface ListContainerProps {
8
8
  dir?: string;
9
9
  popupSettings?: PopupProps;
10
10
  itemsCount?: number[];
11
+ children?: React.ReactNode;
11
12
  }
12
13
  /**
13
14
  * @hidden
@@ -22,7 +22,9 @@ var sizeMap = kendoThemeMaps.sizeMap, roundedMap = kendoThemeMaps.roundedMap;
22
22
  var ListFilter = /** @class */ (function (_super) {
23
23
  __extends(ListFilter, _super);
24
24
  function ListFilter() {
25
- return _super !== null && _super.apply(this, arguments) || this;
25
+ var _this = _super !== null && _super.apply(this, arguments) || this;
26
+ _this.input = null;
27
+ return _this;
26
28
  }
27
29
  ListFilter.prototype.render = function () {
28
30
  var _a;
@@ -30,9 +32,9 @@ var ListFilter = /** @class */ (function (_super) {
30
32
  var _b = this.props, size = _b.size, rounded = _b.rounded, fillMode = _b.fillMode, inputRef = _b.inputRef;
31
33
  return (React.createElement("div", { className: "k-list-filter" },
32
34
  React.createElement("span", { className: classNames('k-searchbox k-input', (_a = {},
33
- _a["k-input-" + (sizeMap[size] || size)] = size,
34
- _a["k-rounded-" + (roundedMap[rounded] || rounded)] = rounded,
35
- _a["k-input-" + fillMode] = fillMode,
35
+ _a["k-input-".concat(sizeMap[size] || size)] = size,
36
+ _a["k-rounded-".concat(roundedMap[rounded] || rounded)] = rounded,
37
+ _a["k-input-".concat(fillMode)] = fillMode,
36
38
  _a)) },
37
39
  React.createElement("span", { className: "k-input-icon k-icon k-i-search" }),
38
40
  React.createElement("input", { ref: inputRef ? inputRef : function (input) { return _this.input = input; }, value: this.props.value || '', className: "k-input-inner", onChange: this.props.onChange, onKeyDown: this.props.onKeyDown, tabIndex: this.props.tabIndex, onClick: function (e) { return e.stopPropagation(); } }))));
@@ -49,5 +49,5 @@ export interface ListItemProps {
49
49
  */
50
50
  export default class ListItem extends React.Component<ListItemProps, {}> {
51
51
  handleClick: React.MouseEventHandler<HTMLLIElement>;
52
- render(): any;
52
+ render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
53
53
  }
@@ -7,6 +7,6 @@ export declare class Navigation {
7
7
  current: number;
8
8
  max: number;
9
9
  min: number;
10
- }): number;
10
+ }): number | undefined;
11
11
  private next;
12
12
  }
@@ -36,5 +36,5 @@ export default class SearchBar extends React.Component<SearchBarProps> {
36
36
  */
37
37
  get input(): HTMLInputElement | null;
38
38
  componentDidUpdate(prevProps: SearchBarProps): void;
39
- render(): any;
39
+ render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
40
40
  }
@@ -20,7 +20,9 @@ import * as React from 'react';
20
20
  var SearchBar = /** @class */ (function (_super) {
21
21
  __extends(SearchBar, _super);
22
22
  function SearchBar() {
23
- return _super !== null && _super.apply(this, arguments) || this;
23
+ var _this = _super !== null && _super.apply(this, arguments) || this;
24
+ _this._input = null;
25
+ return _this;
24
26
  }
25
27
  Object.defineProperty(SearchBar.prototype, "input", {
26
28
  /**
@@ -22,7 +22,7 @@ export default class VirtualScroll {
22
22
  enabled: boolean;
23
23
  pageSize: number;
24
24
  itemHeight: number;
25
- PageChange: (event: Page, syntheticEvent: React.SyntheticEvent<any>) => void;
25
+ PageChange: ((event: Page, syntheticEvent: React.SyntheticEvent<any>) => void) | null;
26
26
  private prevScrollPos;
27
27
  private listTranslate;
28
28
  private scrollSyncing;
@@ -5,12 +5,16 @@ var maxHeightIE = 1533915;
5
5
  var VirtualScroll = /** @class */ (function () {
6
6
  function VirtualScroll() {
7
7
  var _this = this;
8
+ this.container = null;
9
+ this.scrollElement = null;
10
+ this.list = null;
8
11
  this.containerHeight = 0;
9
12
  this.skip = 0;
10
13
  this.total = 0;
11
14
  this.enabled = false;
12
15
  this.pageSize = 0;
13
16
  this.itemHeight = 0;
17
+ this.PageChange = null;
14
18
  this.prevScrollPos = 0;
15
19
  this.listTranslate = 0;
16
20
  this.scrollSyncing = false;
@@ -48,7 +52,7 @@ var VirtualScroll = /** @class */ (function () {
48
52
  });
49
53
  VirtualScroll.prototype.changePage = function (skip, e) {
50
54
  var newSkip = Math.min(Math.max(0, skip), this.total - this.pageSize);
51
- if (newSkip !== this.skip) {
55
+ if (newSkip !== this.skip && this.PageChange) {
52
56
  this.PageChange({ skip: newSkip, take: this.pageSize }, e);
53
57
  }
54
58
  };
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-react-dropdowns',
6
6
  productName: 'KendoReact',
7
7
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1653648175,
8
+ publishDate: 1654509083,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
11
11
  };
@@ -24,9 +24,9 @@ export declare class AutoCompleteWithoutContext extends React.Component<AutoComp
24
24
  * @hidden
25
25
  */
26
26
  static propTypes: {
27
- size: PropTypes.Requireable<"small" | "medium" | "large">;
28
- rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large">;
29
- fillMode: PropTypes.Requireable<"flat" | "solid" | "outline">;
27
+ size: PropTypes.Requireable<"small" | "medium" | "large" | null | undefined>;
28
+ rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large" | null | undefined>;
29
+ fillMode: PropTypes.Requireable<"flat" | "outline" | "solid" | null | undefined>;
30
30
  suggest: PropTypes.Requireable<string | boolean>;
31
31
  placeholder: PropTypes.Requireable<string>;
32
32
  value: PropTypes.Requireable<string>;
@@ -77,9 +77,9 @@ export declare class AutoCompleteWithoutContext extends React.Component<AutoComp
77
77
  * @hidden
78
78
  */
79
79
  static defaultProps: {
80
- size: "small" | "medium" | "large";
81
- rounded: "small" | "medium" | "full" | "large";
82
- fillMode: "flat" | "solid" | "outline";
80
+ size: "small" | "medium" | "large" | null | undefined;
81
+ rounded: "small" | "medium" | "full" | "large" | null | undefined;
82
+ fillMode: "flat" | "outline" | "solid" | null | undefined;
83
83
  popupSettings: {
84
84
  height: string;
85
85
  };
@@ -51,8 +51,10 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
51
51
  */
52
52
  _this.state = {};
53
53
  _this.base = new DropDownBase_1.default(_this);
54
- _this._inputId = kendo_react_common_1.guid();
54
+ _this._element = null;
55
+ _this._inputId = (0, kendo_react_common_1.guid)();
55
56
  _this._suggested = '';
57
+ _this._input = null;
56
58
  /**
57
59
  * @hidden
58
60
  */
@@ -66,7 +68,7 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
66
68
  */
67
69
  _this.handleItemSelect = function (index, state) {
68
70
  var _a = _this.props.data, data = _a === void 0 ? [] : _a;
69
- var newText = utils_1.getItemValue(data[index], _this.props.textField);
71
+ var newText = (0, utils_1.getItemValue)(data[index], _this.props.textField);
70
72
  _this.triggerOnChange(newText, state);
71
73
  };
72
74
  /**
@@ -75,7 +77,7 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
75
77
  _this.itemFocus = function (index, state) {
76
78
  var _a = _this.props, _b = _a.data, data = _b === void 0 ? [] : _b, textField = _a.textField;
77
79
  var focusedItem = data[index];
78
- if (!utils_1.areSame(_this.state.focusedItem, focusedItem, textField)) {
80
+ if (!(0, utils_1.areSame)(_this.state.focusedItem, focusedItem, textField)) {
79
81
  state.data.focusedItem = focusedItem;
80
82
  }
81
83
  };
@@ -177,7 +179,7 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
177
179
  _this.applyInputValue(event.currentTarget.value, state);
178
180
  }
179
181
  };
180
- kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
182
+ (0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
181
183
  return _this;
182
184
  }
183
185
  Object.defineProperty(AutoCompleteWithoutContext.prototype, "element", {
@@ -305,10 +307,10 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
305
307
  if (typeof suggest === 'string') {
306
308
  this._suggested = suggest;
307
309
  }
308
- var autoComplete = (React.createElement("span", { className: kendo_react_common_1.classNames('k-autocomplete k-input', className, (_a = {},
309
- _a["k-input-" + (sizeMap[size] || size)] = size,
310
- _a["k-rounded-" + (roundedMap[rounded] || rounded)] = rounded,
311
- _a["k-input-" + fillMode] = fillMode,
310
+ var autoComplete = (React.createElement("span", { className: (0, kendo_react_common_1.classNames)('k-autocomplete k-input', className, (_a = {},
311
+ _a["k-input-".concat(sizeMap[size] || size)] = size,
312
+ _a["k-rounded-".concat(roundedMap[rounded] || rounded)] = rounded,
313
+ _a["k-input-".concat(fillMode)] = fillMode,
312
314
  _a['k-invalid'] = !isValid,
313
315
  _a['k-loading'] = loading,
314
316
  _a['k-required'] = this.required,
@@ -335,9 +337,9 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
335
337
  var typedText = this.value;
336
338
  var _a = this.props, _b = _a.data, data = _b === void 0 ? [] : _b, textField = _a.textField, focusedItemIndex = _a.focusedItemIndex;
337
339
  var focusedIndex = this.state.focusedItem !== undefined ?
338
- data.findIndex(function (i) { return utils_1.areSame(i, _this.state.focusedItem, textField); }) :
340
+ data.findIndex(function (i) { return (0, utils_1.areSame)(i, _this.state.focusedItem, textField); }) :
339
341
  (focusedItemIndex ? focusedItemIndex(data, typedText, textField) :
340
- data.indexOf(utils_1.getFocusedItem(data, typedText, textField)));
342
+ data.indexOf((0, utils_1.getFocusedItem)(data, typedText, textField)));
341
343
  var newFocused = this.base.navigation.navigate({
342
344
  keyCode: keyCode,
343
345
  current: focusedIndex,
@@ -357,7 +359,7 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
357
359
  var _a = this.props, _b = _a.data, data = _b === void 0 ? [] : _b, textField = _a.textField;
358
360
  this._suggested = '';
359
361
  if (opened && eventKey === kendo_react_common_1.Keys.enter) {
360
- var newValue = utils_1.getItemValue(data[this.focusedIndex(value)], textField);
362
+ var newValue = (0, utils_1.getItemValue)(data[this.focusedIndex(value)], textField);
361
363
  this.triggerOnChange(newValue, state);
362
364
  }
363
365
  if (opened) {
@@ -384,8 +386,8 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
384
386
  animate: popupSettings.animate,
385
387
  anchor: this.element,
386
388
  show: opened,
387
- popupClass: kendo_react_common_1.classNames(popupSettings.popupClass, 'k-list', (_a = {},
388
- _a["k-list-" + (sizeMap[size] || size)] = size,
389
+ popupClass: (0, kendo_react_common_1.classNames)(popupSettings.popupClass, 'k-list', (_a = {},
390
+ _a["k-list-".concat(sizeMap[size] || size)] = size,
389
391
  _a)),
390
392
  className: popupSettings.className,
391
393
  appendTo: popupSettings.appendTo
@@ -418,9 +420,9 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
418
420
  this._suggested = '';
419
421
  if (value) {
420
422
  var _a = this.props, _b = _a.data, data = _b === void 0 ? [] : _b, textField = _a.textField;
421
- var suggestedItem = data[utils_1.itemIndexStartsWith(data, value, textField)];
423
+ var suggestedItem = data[(0, utils_1.itemIndexStartsWith)(data, value, textField)];
422
424
  if (suggestedItem) {
423
- var suggestedText = utils_1.getItemValue(suggestedItem, textField);
425
+ var suggestedText = (0, utils_1.getItemValue)(suggestedItem, textField);
424
426
  if (value.toLowerCase() !== suggestedText.toLowerCase()) {
425
427
  this._suggested = suggestedText.substring(value.length);
426
428
  }
@@ -432,9 +434,9 @@ var AutoCompleteWithoutContext = /** @class */ (function (_super) {
432
434
  var _a = this.props, _b = _a.data, data = _b === void 0 ? [] : _b, textField = _a.textField, focusedItemIndex = _a.focusedItemIndex;
433
435
  var inputValue = value !== undefined ? value : this.value;
434
436
  return this.state.focusedItem !== undefined ?
435
- data.findIndex(function (i) { return utils_1.areSame(i, _this.state.focusedItem, textField); }) :
437
+ data.findIndex(function (i) { return (0, utils_1.areSame)(i, _this.state.focusedItem, textField); }) :
436
438
  (focusedItemIndex ? focusedItemIndex(data, inputValue, textField) :
437
- Math.max(0, data.indexOf(utils_1.getFocusedItem(data, inputValue, textField))));
439
+ Math.max(0, data.indexOf((0, utils_1.getFocusedItem)(data, inputValue, textField))));
438
440
  };
439
441
  AutoCompleteWithoutContext.displayName = 'AutoComplete';
440
442
  /**
@@ -454,7 +456,7 @@ exports.AutoCompleteWithoutContext = AutoCompleteWithoutContext;
454
456
  *
455
457
  * For more information, refer to the [Dropdowns Props Context]({% slug props-context_dropdowns %}) article.
456
458
  */
457
- exports.AutoCompletePropsContext = kendo_react_common_1.createPropsContext();
459
+ exports.AutoCompletePropsContext = (0, kendo_react_common_1.createPropsContext)();
458
460
  /* eslint-disable @typescript-eslint/no-redeclare -- intentionally naming the component the same as the type */
459
461
  /**
460
462
  * Represents the [KendoReact AutoComplete component]({% slug overview_autocomplete %}).
@@ -481,5 +483,5 @@ exports.AutoCompletePropsContext = kendo_react_common_1.createPropsContext();
481
483
  * ReactDOM.render(<App />, document.querySelector('my-app'));
482
484
  * ```
483
485
  */
484
- exports.AutoComplete = kendo_react_common_1.withPropsContext(exports.AutoCompletePropsContext, AutoCompleteWithoutContext);
486
+ exports.AutoComplete = (0, kendo_react_common_1.withPropsContext)(exports.AutoCompletePropsContext, AutoCompleteWithoutContext);
485
487
  exports.AutoComplete.displayName = 'KendoReactAutoComplete';
@@ -24,9 +24,9 @@ export declare class ComboBoxWithoutContext extends React.Component<ComboBoxProp
24
24
  * @hidden
25
25
  */
26
26
  static propTypes: {
27
- size: PropTypes.Requireable<"small" | "medium" | "large">;
28
- rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large">;
29
- fillMode: PropTypes.Requireable<"flat" | "solid" | "outline">;
27
+ size: PropTypes.Requireable<"small" | "medium" | "large" | null | undefined>;
28
+ rounded: PropTypes.Requireable<"small" | "medium" | "full" | "large" | null | undefined>;
29
+ fillMode: PropTypes.Requireable<"flat" | "outline" | "solid" | null | undefined>;
30
30
  dataItemKey: PropTypes.Requireable<string>;
31
31
  groupField: PropTypes.Requireable<string>;
32
32
  suggest: PropTypes.Requireable<boolean>;
@@ -88,9 +88,9 @@ export declare class ComboBoxWithoutContext extends React.Component<ComboBoxProp
88
88
  * @hidden
89
89
  */
90
90
  static defaultProps: {
91
- size: "small" | "medium" | "large";
92
- rounded: "small" | "medium" | "full" | "large";
93
- fillMode: "flat" | "solid" | "outline";
91
+ size: "small" | "medium" | "large" | null | undefined;
92
+ rounded: "small" | "medium" | "full" | "large" | null | undefined;
93
+ fillMode: "flat" | "outline" | "solid" | null | undefined;
94
94
  allowCustom: boolean;
95
95
  clearButton: boolean;
96
96
  required: boolean;
@@ -51,8 +51,10 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
51
51
  */
52
52
  _this.state = {};
53
53
  _this.base = new DropDownBase_1.default(_this);
54
- _this._inputId = kendo_react_common_1.guid();
54
+ _this._element = null;
55
+ _this._inputId = (0, kendo_react_common_1.guid)();
55
56
  _this._suggested = '';
57
+ _this._input = null;
56
58
  _this.itemHeight = 0;
57
59
  /**
58
60
  * @hidden
@@ -69,7 +71,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
69
71
  var _a = _this.props, _b = _a.data, data = _b === void 0 ? [] : _b, virtual = _a.virtual, dataItemKey = _a.dataItemKey;
70
72
  var skip = virtual ? virtual.skip : 0;
71
73
  var item = data[index - skip];
72
- var newSelected = !utils_1.areSame(item, _this.value, dataItemKey);
74
+ var newSelected = !(0, utils_1.areSame)(item, _this.value, dataItemKey);
73
75
  _this.triggerOnChange(item, state);
74
76
  if (_this.state.text !== undefined) {
75
77
  state.data.text = undefined;
@@ -171,8 +173,8 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
171
173
  if (_this.props.suggest) {
172
174
  var selectionAtEnd = input.selectionEnd === value.length;
173
175
  var prevText = _this.props.filter !== undefined ? _this.props.filter : _this.state.text;
174
- if (!utils_1.isPresent(prevText)) {
175
- prevText = utils_1.getItemValue(_this.value, _this.props.textField) || '';
176
+ if (!(0, utils_1.isPresent)(prevText)) {
177
+ prevText = (0, utils_1.getItemValue)(_this.value, _this.props.textField) || '';
176
178
  }
177
179
  var deletedSuggestion = prevText && prevText === value;
178
180
  var deleting = prevText && prevText.length > value.length;
@@ -218,7 +220,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
218
220
  : _this.props.validationMessage || VALIDATION_MESSAGE);
219
221
  }
220
222
  };
221
- kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
223
+ (0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
222
224
  return _this;
223
225
  }
224
226
  Object.defineProperty(ComboBoxWithoutContext.prototype, "element", {
@@ -261,7 +263,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
261
263
  var _a = this.props, _b = _a.data, data = _b === void 0 ? [] : _b, dataItemKey = _a.dataItemKey;
262
264
  var value = this.value;
263
265
  // TO DO: deprecate it!
264
- return data.findIndex(function (i) { return utils_1.areSame(i, value, dataItemKey); });
266
+ return data.findIndex(function (i) { return (0, utils_1.areSame)(i, value, dataItemKey); });
265
267
  },
266
268
  enumerable: false,
267
269
  configurable: true
@@ -334,8 +336,8 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
334
336
  }
335
337
  else {
336
338
  var prevSelectedItem = prevProps.value !== undefined ? prevProps.value : prevState.value;
337
- var selectedItemIndex = data.findIndex(function (i) { return utils_1.areSame(i, selectedItem, dataItemKey); });
338
- var selectedItemChanged = !utils_1.areSame(prevSelectedItem, selectedItem, dataItemKey);
339
+ var selectedItemIndex = data.findIndex(function (i) { return (0, utils_1.areSame)(i, selectedItem, dataItemKey); });
340
+ var selectedItemChanged = !(0, utils_1.areSame)(prevSelectedItem, selectedItem, dataItemKey);
339
341
  if (opening && virtual) {
340
342
  this.base.scrollToVirtualItem(virtual, selectedItemIndex);
341
343
  }
@@ -366,9 +368,9 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
366
368
  var _c = this.props, dir = _c.dir, disabled = _c.disabled, _d = _c.clearButton, clearButton = _d === void 0 ? ComboBoxWithoutContext.defaultProps.clearButton : _d, label = _c.label, textField = _c.textField, className = _c.className, style = _c.style, loading = _c.loading, iconClassName = _c.iconClassName, virtual = _c.virtual, size = _c.size, rounded = _c.rounded, fillMode = _c.fillMode;
367
369
  var isValid = !this.validityStyles || this.validity.valid;
368
370
  var text = this.props.filter !== undefined ? this.props.filter : this.state.text;
369
- var selectedItemText = utils_1.getItemValue(this.value, textField);
370
- var inputText = utils_1.isPresent(text) ? text : selectedItemText;
371
- var renderClearButton = clearButton && (!!(inputText) || utils_1.isPresent(this.value));
371
+ var selectedItemText = (0, utils_1.getItemValue)(this.value, textField);
372
+ var inputText = (0, utils_1.isPresent)(text) ? text : selectedItemText;
373
+ var renderClearButton = clearButton && (!!(inputText) || (0, utils_1.isPresent)(this.value));
372
374
  var base = this.base;
373
375
  var vs = base.vs;
374
376
  var id = this.props.id || this._inputId;
@@ -378,10 +380,10 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
378
380
  vs.total = virtual.total;
379
381
  vs.pageSize = virtual.pageSize;
380
382
  }
381
- var combobox = (React.createElement("span", { className: kendo_react_common_1.classNames('k-combobox k-input', (_a = {},
382
- _a["k-input-" + (sizeMap[size] || size)] = size,
383
- _a["k-rounded-" + (roundedMap[rounded] || rounded)] = rounded,
384
- _a["k-input-" + fillMode] = fillMode,
383
+ var combobox = (React.createElement("span", { className: (0, kendo_react_common_1.classNames)('k-combobox k-input', (_a = {},
384
+ _a["k-input-".concat(sizeMap[size] || size)] = size,
385
+ _a["k-rounded-".concat(roundedMap[rounded] || rounded)] = rounded,
386
+ _a["k-input-".concat(fillMode)] = fillMode,
385
387
  _a['k-invalid'] = !isValid,
386
388
  _a['k-loading'] = loading,
387
389
  _a['k-required'] = this.required,
@@ -390,12 +392,12 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
390
392
  this.renderSearchBar(inputText || '', id),
391
393
  renderClearButton && !loading && React.createElement(ClearButton_1.default, { onClick: this.clearButtonClick, key: "clearbutton" }),
392
394
  loading && React.createElement("span", { className: "k-icon k-i-loading k-input-loading-icon", key: "loading" }),
393
- React.createElement("button", { tabIndex: -1, type: "button", className: kendo_react_common_1.classNames('k-input-button k-button k-icon-button', (_b = {},
394
- _b["k-button-" + (sizeMap[size] || size)] = size,
395
- _b["k-button-" + fillMode] = fillMode,
396
- _b["k-button-" + fillMode + "-base"] = fillMode,
395
+ React.createElement("button", { tabIndex: -1, type: "button", className: (0, kendo_react_common_1.classNames)('k-input-button k-button k-icon-button', (_b = {},
396
+ _b["k-button-".concat(sizeMap[size] || size)] = size,
397
+ _b["k-button-".concat(fillMode)] = fillMode,
398
+ _b["k-button-".concat(fillMode, "-base")] = fillMode,
397
399
  _b)), onClick: this.toggleBtnClick, onMouseDown: function (e) { return e.preventDefault(); } },
398
- React.createElement("span", { className: kendo_react_common_1.classNames('k-button-icon k-icon k-i-arrow-s', iconClassName) })),
400
+ React.createElement("span", { className: (0, kendo_react_common_1.classNames)('k-button-icon k-icon k-i-arrow-s', iconClassName) })),
399
401
  this.renderListContainer()));
400
402
  return label
401
403
  ? (React.createElement(kendo_react_labels_1.FloatingLabel, { label: label, editorId: id, editorValue: inputText, editorValid: isValid, editorDisabled: disabled, style: { width: style ? style.width : undefined }, children: combobox }))
@@ -411,7 +413,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
411
413
  var vs = this.base.vs;
412
414
  var value = this.value;
413
415
  this._suggested = '';
414
- if (focusedIndex !== -1 && !utils_1.isPresent(value)) {
416
+ if (focusedIndex !== -1 && !(0, utils_1.isPresent)(value)) {
415
417
  this.handleItemSelect(focusedIndex, state);
416
418
  }
417
419
  else if (text === '') {
@@ -434,9 +436,9 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
434
436
  var _a;
435
437
  var _b = this.props, _c = _b.data, data = _c === void 0 ? [] : _c, textField = _b.textField, allowCustom = _b.allowCustom;
436
438
  var opened = this.props.opened !== undefined ? this.props.opened : this.state.opened;
437
- var currentValueText = utils_1.getItemValue(this.value, textField);
439
+ var currentValueText = (0, utils_1.getItemValue)(this.value, textField);
438
440
  var valueIndex = currentValueText === value ?
439
- this.index : utils_1.getItemIndexByText(data, value, textField);
441
+ this.index : (0, utils_1.getItemIndexByText)(data, value, textField);
440
442
  var itemSelected = valueIndex !== -1;
441
443
  var newSelected = undefined;
442
444
  this._suggested = '';
@@ -464,15 +466,15 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
464
466
  var _a;
465
467
  var _b = this.props, _c = _b.data, data = _c === void 0 ? [] : _c, textField = _b.textField, allowCustom = _b.allowCustom;
466
468
  var opened = this.props.opened !== undefined ? this.props.opened : this.state.opened;
467
- var valueItemText = utils_1.getItemValue(this.value, textField);
469
+ var valueItemText = (0, utils_1.getItemValue)(this.value, textField);
468
470
  this._suggested = '';
469
- if (text === valueItemText || (text === '' && !utils_1.isPresent(valueItemText))) {
471
+ if (text === valueItemText || (text === '' && !(0, utils_1.isPresent)(valueItemText))) {
470
472
  if (opened) {
471
473
  this.base.togglePopup(state);
472
474
  }
473
475
  return this.applyState(state);
474
476
  }
475
- var valueIndex = utils_1.getItemIndexByText(data, text, textField, true);
477
+ var valueIndex = (0, utils_1.getItemIndexByText)(data, text, textField, true);
476
478
  var itemSelected = valueIndex !== -1;
477
479
  var newSelected = null;
478
480
  if (itemSelected) {
@@ -520,22 +522,22 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
520
522
  var popupWidth = popupSettings.width !== undefined ? popupSettings.width : base.popupWidth;
521
523
  var group = this.state.group;
522
524
  if (group === undefined && groupField !== undefined) {
523
- group = utils_1.getItemValue(data[0], groupField);
525
+ group = (0, utils_1.getItemValue)(data[0], groupField);
524
526
  }
525
527
  return (React.createElement(ListContainer_1.default, { width: popupWidth, popupSettings: {
526
528
  animate: popupSettings.animate,
527
529
  anchor: this.element,
528
530
  show: opened,
529
- popupClass: kendo_react_common_1.classNames(popupSettings.popupClass, 'k-reset'),
531
+ popupClass: (0, kendo_react_common_1.classNames)(popupSettings.popupClass, 'k-reset'),
530
532
  className: popupSettings.className,
531
533
  appendTo: popupSettings.appendTo
532
534
  }, dir: dir !== undefined ? dir : this.base.dirCalculated, itemsCount: [data.length] },
533
- React.createElement("div", { className: kendo_react_common_1.classNames((_a = {},
535
+ React.createElement("div", { className: (0, kendo_react_common_1.classNames)((_a = {},
534
536
  _a['k-list'] = !list,
535
- _a["k-list-" + (sizeMap[size] || size)] = !list && size,
537
+ _a["k-list-".concat(sizeMap[size] || size)] = !list && size,
536
538
  _a['k-virtual-list'] = virtual,
537
539
  _a['k-data-table'] = list,
538
- _a["k-table-" + (sizeMap[size] || size)] = list && size,
540
+ _a["k-table-".concat(sizeMap[size] || size)] = list && size,
539
541
  _a)) },
540
542
  header && React.createElement("div", { className: "k-table-header" }, header),
541
543
  !list && group && React.createElement("div", { className: "k-list-group-sticky-header" }, group),
@@ -551,13 +553,13 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
551
553
  var vs = base.vs;
552
554
  var skip = virtual.skip;
553
555
  var opened = this.props.opened !== undefined ? this.props.opened : this.state.opened;
554
- var translate = "translateY(" + vs.translate + "px)";
556
+ var translate = "translateY(".concat(vs.translate, "px)");
555
557
  var focusedIndex = opened ? this.getFocusedIndex() : undefined;
556
558
  var text = this.props.filter !== undefined ? this.props.filter : this.state.text;
557
- var selectedItemText = utils_1.getItemValue(this.value, textField);
558
- var value = utils_1.isPresent(text) && text !== selectedItemText ? null : this.value;
559
+ var selectedItemText = (0, utils_1.getItemValue)(this.value, textField);
560
+ var value = (0, utils_1.isPresent)(text) && text !== selectedItemText ? null : this.value;
559
561
  var ListComponent = this.props.list || List_1.default;
560
- return (React.createElement(ListComponent, { id: base.listBoxId, virtual: Boolean(virtual), show: opened, data: data, focusedIndex: focusedIndex, value: value, textField: textField, valueField: dataItemKey, groupField: this.props.groupField, optionsGuid: base.guid, listRef: function (list) { vs.list = _this.base.list = list; _this.itemHeight = 0; }, wrapperStyle: { maxHeight: popupSettings.height }, wrapperCssClass: kendo_react_common_1.classNames('k-list-content', (_a = {},
562
+ return (React.createElement(ListComponent, { id: base.listBoxId, virtual: Boolean(virtual), show: opened, data: data, focusedIndex: focusedIndex, value: value, textField: textField, valueField: dataItemKey, groupField: this.props.groupField, optionsGuid: base.guid, listRef: function (list) { vs.list = _this.base.list = list; _this.itemHeight = 0; }, wrapperStyle: { maxHeight: popupSettings.height }, wrapperCssClass: (0, kendo_react_common_1.classNames)('k-list-content', (_a = {},
561
563
  _a['k-list-scroller'] = !virtual,
562
564
  _a['k-virtual-content'] = virtual,
563
565
  _a)), listStyle: vs.enabled ? { transform: translate } : undefined, key: "listkey", skip: skip, onClick: this.handleItemClick, itemRender: itemRender, noDataRender: listNoDataRender, onMouseDown: function (e) { return e.preventDefault(); }, onScroll: this.onScroll, wrapperRef: vs.scrollerRef, scroller: this.base.renderScrollElement() }));
@@ -567,15 +569,15 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
567
569
  var _a = this.props, placeholder = _a.placeholder, tabIndex = _a.tabIndex, disabled = _a.disabled, _b = _a.data, data = _b === void 0 ? [] : _b, dataItemKey = _a.dataItemKey, _c = _a.virtual, virtual = _c === void 0 ? { skip: 0 } : _c;
568
570
  var opened = this.props.opened !== undefined ? this.props.opened : this.state.opened;
569
571
  var value = this.value;
570
- var selectedIndex = Math.max(0, data.findIndex(function (i) { return utils_1.areSame(i, value, dataItemKey); }));
571
- if (this._suggested && !utils_1.areSame(this._valueOnDidUpdate, value, dataItemKey)) {
572
+ var selectedIndex = Math.max(0, data.findIndex(function (i) { return (0, utils_1.areSame)(i, value, dataItemKey); }));
573
+ if (this._suggested && !(0, utils_1.areSame)(this._valueOnDidUpdate, value, dataItemKey)) {
572
574
  this._suggested = '';
573
575
  }
574
- return (React.createElement(SearchBar_1.default, { id: id, placeholder: placeholder, tabIndex: tabIndex || undefined, accessKey: this.props.accessKey, value: text + this._suggested, suggestedText: this._suggested, ref: function (el) { return _this._input = el && el.input; }, onKeyDown: this.onInputKeyDown, onChange: this.inputOnChange, onFocus: this.base.handleFocus, onBlur: this.handleBlur, disabled: disabled, expanded: opened, owns: this.base.listBoxId, activedescendant: "option-" + this.base.guid + "-" + (selectedIndex + virtual.skip), role: "combobox", ariaLabelledBy: this.props.ariaLabelledBy, ariaDescribedBy: this.props.ariaDescribedBy, render: this.props.valueRender }));
576
+ return (React.createElement(SearchBar_1.default, { id: id, placeholder: placeholder, tabIndex: tabIndex || undefined, accessKey: this.props.accessKey, value: text + this._suggested, suggestedText: this._suggested, ref: function (el) { return _this._input = el && el.input; }, onKeyDown: this.onInputKeyDown, onChange: this.inputOnChange, onFocus: this.base.handleFocus, onBlur: this.handleBlur, disabled: disabled, expanded: opened, owns: this.base.listBoxId, activedescendant: "option-".concat(this.base.guid, "-").concat(selectedIndex + virtual.skip), role: "combobox", ariaLabelledBy: this.props.ariaLabelledBy, ariaDescribedBy: this.props.ariaDescribedBy, render: this.props.valueRender }));
575
577
  };
576
578
  ComboBoxWithoutContext.prototype.triggerOnChange = function (item, state) {
577
579
  var value = this.value;
578
- if ((!utils_1.isPresent(value) && !utils_1.isPresent(item)) || utils_1.areSame(value, item, this.props.dataItemKey)) {
580
+ if ((!(0, utils_1.isPresent)(value) && !(0, utils_1.isPresent)(item)) || (0, utils_1.areSame)(value, item, this.props.dataItemKey)) {
579
581
  return;
580
582
  }
581
583
  if (this.props.value === undefined) {
@@ -588,8 +590,8 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
588
590
  var value = this.value;
589
591
  var _a = this.props, _b = _a.data, data = _b === void 0 ? [] : _b, textField = _a.textField, dataItemKey = _a.dataItemKey, _c = _a.virtual, virtual = _c === void 0 ? { skip: 0 } : _c, _d = _a.focusedItemIndex, focusedItemIndex = _d === void 0 ? utils_1.itemIndexStartsWith : _d;
590
592
  var text = this.props.filter ? this.props.filter : this.state.text;
591
- if (utils_1.isPresent(value) && text === undefined) {
592
- return data.findIndex(function (i) { return utils_1.areSame(i, value, dataItemKey); });
593
+ if ((0, utils_1.isPresent)(value) && text === undefined) {
594
+ return data.findIndex(function (i) { return (0, utils_1.areSame)(i, value, dataItemKey); });
593
595
  }
594
596
  else if (text) {
595
597
  return focusedItemIndex(data, text, textField);
@@ -600,7 +602,7 @@ var ComboBoxWithoutContext = /** @class */ (function (_super) {
600
602
  };
601
603
  ComboBoxWithoutContext.prototype.suggestValue = function (value) {
602
604
  var _a = this.props, data = _a.data, textField = _a.textField;
603
- this._suggested = utils_1.suggestValue(value, data, textField);
605
+ this._suggested = (0, utils_1.suggestValue)(value, data, textField);
604
606
  };
605
607
  ComboBoxWithoutContext.prototype.applyState = function (state) {
606
608
  this.base.applyState(state);
@@ -624,7 +626,7 @@ exports.ComboBoxWithoutContext = ComboBoxWithoutContext;
624
626
  *
625
627
  * For more information, refer to the [Dropdowns Props Context]({% slug props-context_dropdowns %}) article.
626
628
  */
627
- exports.ComboBoxPropsContext = kendo_react_common_1.createPropsContext();
629
+ exports.ComboBoxPropsContext = (0, kendo_react_common_1.createPropsContext)();
628
630
  /* eslint-disable @typescript-eslint/no-redeclare -- intentionally naming the component the same as the type */
629
631
  /**
630
632
  * Represents the [KendoReact ComboBox component]({% slug overview_combobox %}).
@@ -651,5 +653,5 @@ exports.ComboBoxPropsContext = kendo_react_common_1.createPropsContext();
651
653
  * ReactDOM.render(<App />, document.querySelector('my-app'));
652
654
  * ```
653
655
  */
654
- exports.ComboBox = kendo_react_common_1.withPropsContext(exports.ComboBoxPropsContext, ComboBoxWithoutContext);
656
+ exports.ComboBox = (0, kendo_react_common_1.withPropsContext)(exports.ComboBoxPropsContext, ComboBoxWithoutContext);
655
657
  exports.ComboBox.displayName = 'KendoReactComboBox';
@@ -19,9 +19,6 @@ export declare class DropDownListWithoutContext extends React.Component<DropDown
19
19
  */
20
20
  static propTypes: {
21
21
  value: PropTypes.Requireable<any>;
22
- /**
23
- * @hidden
24
- */
25
22
  defaultValue: PropTypes.Requireable<any>;
26
23
  filterable: PropTypes.Requireable<boolean>;
27
24
  filter: PropTypes.Requireable<string>;
@@ -83,9 +80,9 @@ export declare class DropDownListWithoutContext extends React.Component<DropDown
83
80
  */
84
81
  static defaultProps: {
85
82
  required: boolean;
86
- size: "small" | "medium" | "large";
87
- rounded: "small" | "medium" | "full" | "large";
88
- fillMode: "flat" | "solid" | "outline";
83
+ size: "small" | "medium" | "large" | null | undefined;
84
+ rounded: "small" | "medium" | "full" | "large" | null | undefined;
85
+ fillMode: "flat" | "outline" | "solid" | null | undefined;
89
86
  popupSettings: {
90
87
  height: string;
91
88
  };