@progress/kendo-react-dropdowns 14.5.0-develop.13 → 14.5.0-develop.15

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 (53) hide show
  1. package/AutoComplete/AutoComplete.d.ts +4 -23
  2. package/AutoComplete/AutoComplete.js +1 -1
  3. package/AutoComplete/AutoComplete.mjs +206 -196
  4. package/AutoComplete/AutoCompleteProps.d.ts +18 -1
  5. package/AutoCompleteMcpWrapper.d.ts +17 -0
  6. package/AutoCompleteMcpWrapper.js +8 -0
  7. package/AutoCompleteMcpWrapper.mjs +18 -0
  8. package/ComboBox/ComboBox.d.ts +1 -1
  9. package/ComboBox/ComboBox.js +1 -1
  10. package/ComboBox/ComboBox.mjs +224 -224
  11. package/ComboBox/ComboBoxProps.d.ts +6 -1
  12. package/ComboBoxMcpWrapper.d.ts +17 -0
  13. package/ComboBoxMcpWrapper.js +8 -0
  14. package/ComboBoxMcpWrapper.mjs +18 -0
  15. package/DropDownList/DropDownList.js +1 -1
  16. package/DropDownList/DropDownList.mjs +283 -282
  17. package/DropDownList/DropDownListProps.d.ts +6 -1
  18. package/DropDownTree/DropDownTree.js +1 -1
  19. package/DropDownTree/DropDownTree.mjs +206 -200
  20. package/DropDownTree/DropDownTreeProps.d.ts +18 -1
  21. package/MultiSelect/MultiSelect.d.ts +2 -1
  22. package/MultiSelect/MultiSelect.js +1 -1
  23. package/MultiSelect/MultiSelect.mjs +182 -175
  24. package/MultiSelect/MultiSelectProps.d.ts +6 -1
  25. package/MultiSelect/TagList.js +1 -1
  26. package/MultiSelect/TagList.mjs +1 -1
  27. package/MultiSelectMcpWrapper.d.ts +17 -0
  28. package/MultiSelectMcpWrapper.js +8 -0
  29. package/MultiSelectMcpWrapper.mjs +18 -0
  30. package/MultiSelectTree/MultiSelectTree.js +1 -1
  31. package/MultiSelectTree/MultiSelectTree.mjs +237 -221
  32. package/MultiSelectTree/MultiSelectTreeProps.d.ts +12 -0
  33. package/common/ClearButton.js +1 -1
  34. package/common/ClearButton.mjs +6 -7
  35. package/common/List.d.ts +1 -0
  36. package/common/List.js +1 -1
  37. package/common/List.mjs +84 -81
  38. package/common/ListFilter.js +1 -1
  39. package/common/ListFilter.mjs +20 -17
  40. package/common/SearchBar.d.ts +1 -0
  41. package/common/SearchBar.js +1 -1
  42. package/common/SearchBar.mjs +7 -7
  43. package/dist/cdn/js/kendo-react-dropdowns.js +1 -1
  44. package/index.d.mts +9 -3
  45. package/index.d.ts +9 -3
  46. package/index.js +1 -1
  47. package/index.mjs +51 -47
  48. package/messages/index.d.ts +14 -4
  49. package/messages/index.js +1 -1
  50. package/messages/index.mjs +15 -11
  51. package/package-metadata.js +1 -1
  52. package/package-metadata.mjs +2 -2
  53. package/package.json +10 -10
@@ -6,46 +6,48 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as c from "react";
9
- import u from "prop-types";
9
+ import l from "prop-types";
10
10
  import N from "../common/SearchBar.mjs";
11
- import R from "../common/ListContainer.mjs";
12
- import K from "../common/List.mjs";
13
- import x from "../common/DropDownBase.mjs";
14
- import L from "../common/GroupStickyHeader.mjs";
15
- import { getFilteredData as b, getItemValue as I, areSame as S, isPresent as z, getFocusedItem as F, itemIndexStartsWith as H } from "../common/utils.mjs";
16
- import { withIdHOC as A, withPropsContext as q, withAdaptiveModeContext as W, createPropsContext as G, classNames as w, kendoThemeMaps as U, Keys as f, canUseDOM as E, subscribeToKendoPaste as $, IconWrap as j } from "@progress/kendo-react-common";
17
- import { FloatingLabel as J } from "@progress/kendo-react-labels";
18
- import Q from "../common/ClearButton.mjs";
19
- import { AdaptiveMode as X } from "../common/AdaptiveMode.mjs";
20
- import M from "../common/withCustomComponent.mjs";
21
- import { ActionSheetContent as Y } from "@progress/kendo-react-layout";
22
- import Z from "../common/ListFilter.mjs";
23
- const ee = "Please enter a valid value!", { sizeMap: D, roundedMap: te } = U, y = class y extends c.Component {
11
+ import z from "../common/ListContainer.mjs";
12
+ import R from "../common/List.mjs";
13
+ import S from "../common/DropDownBase.mjs";
14
+ import K from "../common/GroupStickyHeader.mjs";
15
+ import { getFilteredData as b, getItemValue as I, areSame as w, isPresent as A, getFocusedItem as F, itemIndexStartsWith as H } from "../common/utils.mjs";
16
+ import { createPropsContext as q, classNames as k, kendoThemeMaps as W, Keys as f, canUseDOM as E, subscribeToKendoPaste as G, IconWrap as $, withIdHOC as U, withPropsContext as j, withAdaptiveModeContext as J } from "@progress/kendo-react-common";
17
+ import { FloatingLabel as Q } from "@progress/kendo-react-labels";
18
+ import { provideLocalizationService as X, registerForLocalization as Y } from "@progress/kendo-react-intl";
19
+ import { autoCompleteListAriaLabel as M, messages as Z } from "../messages/index.mjs";
20
+ import ee from "../common/ClearButton.mjs";
21
+ import { AdaptiveMode as te } from "../common/AdaptiveMode.mjs";
22
+ import D from "../common/withCustomComponent.mjs";
23
+ import { ActionSheetContent as se } from "@progress/kendo-react-layout";
24
+ import ie from "../common/ListFilter.mjs";
25
+ const oe = "Please enter a valid value!", { sizeMap: P, roundedMap: ne } = W, y = class y extends c.Component {
24
26
  constructor() {
25
- super(...arguments), this.state = {}, this.base = new x(this), this._element = null, this._suggested = "", this._input = null, this._adaptiveInput = null, this._skipFocusEvent = !1, this._isScrolling = !1, this.itemHeight = 0, this.focus = () => {
27
+ super(...arguments), this.state = {}, this.base = new S(this), this._element = null, this._suggested = "", this._input = null, this._adaptiveInput = null, this._skipFocusEvent = !1, this._isScrolling = !1, this.itemHeight = 0, this.focus = () => {
26
28
  this._input && this._input.focus();
27
29
  }, this.handleKendoPasteValue = (e) => {
28
- const s = e != null ? String(e) : "", t = this.base.initState();
29
- t.syntheticEvent = {
30
+ const t = e != null ? String(e) : "", s = this.base.initState();
31
+ s.syntheticEvent = {
30
32
  target: this._element,
31
33
  currentTarget: this._element,
32
34
  nativeEvent: new Event("change", { bubbles: !0 })
33
- }, this.triggerOnChange(s, t), this.applyState(t);
34
- }, this.handleItemSelect = (e, s) => {
35
- const t = b(this.props), n = I(t[e], this.props.textField);
36
- this.state.text && !this.mobileMode && (this.state.text && (s.data.text = ""), this.base.filterChanged("", s)), this._adaptiveInput && this._adaptiveInput.blur(), this.triggerOnChange(n, s);
37
- }, this.itemFocus = (e, s) => {
38
- const { textField: t } = this.props, i = b(this.props)[e];
39
- S(this.state.focusedItem, i, t) || (s.data.focusedItem = i);
35
+ }, this.triggerOnChange(t, s), this.applyState(s);
36
+ }, this.handleItemSelect = (e, t) => {
37
+ const s = b(this.props), n = I(s[e], this.props.textField);
38
+ this.state.text && !this.mobileMode && (this.state.text && (t.data.text = ""), this.base.filterChanged("", t)), this._adaptiveInput && this._adaptiveInput.blur(), this.triggerOnChange(n, t);
39
+ }, this.itemFocus = (e, t) => {
40
+ const { textField: s } = this.props, i = b(this.props)[e];
41
+ w(this.state.focusedItem, i, s) || (t.data.focusedItem = i);
40
42
  }, this.togglePopup = (e) => {
41
43
  this.base.togglePopup(e);
42
44
  }, this.setValidity = () => {
43
45
  this._input && this._input.setCustomValidity && this._input.setCustomValidity(
44
- this.validity.valid ? "" : this.props.validationMessage || ee
46
+ this.validity.valid ? "" : this.props.validationMessage || oe
45
47
  );
46
48
  }, this.renderAdaptiveListContainer = () => {
47
- const { windowWidth: e = 0 } = this.state, s = /* @__PURE__ */ c.createElement(
48
- Z,
49
+ const { windowWidth: e = 0 } = this.state, t = /* @__PURE__ */ c.createElement(
50
+ ie,
49
51
  {
50
52
  value: this.value,
51
53
  ref: (n) => {
@@ -58,72 +60,72 @@ const ee = "Please enter a valid value!", { sizeMap: D, roundedMap: te } = U, y
58
60
  fillMode: this.props.fillMode,
59
61
  placeholder: this.props.placeholder
60
62
  }
61
- ), t = {
63
+ ), s = {
62
64
  title: this.props.adaptiveTitle || this.props.label,
63
65
  subTitle: this.props.adaptiveSubtitle,
64
66
  expand: this.opened,
65
67
  onClose: (n) => this.onCancel(n),
66
68
  windowWidth: e,
67
- mobileFilter: s
69
+ mobileFilter: t
68
70
  };
69
- return /* @__PURE__ */ c.createElement(X, { ...t }, /* @__PURE__ */ c.createElement(Y, null, /* @__PURE__ */ c.createElement("div", { className: "k-list-container" }, this.listContainerContent())));
71
+ return /* @__PURE__ */ c.createElement(te, { ...s }, /* @__PURE__ */ c.createElement(se, null, /* @__PURE__ */ c.createElement("div", { className: "k-list-container" }, this.listContainerContent())));
70
72
  }, this.onCancel = (e) => {
71
- const s = this.base.initState();
72
- s.syntheticEvent = e, e.stopPropagation(), this.opened && this.base.togglePopup(s), s.events.push({ type: "onCancel" });
73
- const t = this.state.text;
74
- z(t) && t !== "" && this.base.filterChanged("", s), this.state.text && (s.data.text = ""), this.applyState(s);
73
+ const t = this.base.initState();
74
+ t.syntheticEvent = e, e.stopPropagation(), this.opened && this.base.togglePopup(t), t.events.push({ type: "onCancel" });
75
+ const s = this.state.text;
76
+ A(s) && s !== "" && this.base.filterChanged("", t), this.state.text && (t.data.text = ""), this.applyState(t);
75
77
  }, this.listContainerContent = () => {
76
- const { header: e, footer: s, size: t, groupStickyHeaderItemRender: n, groupField: i, list: a } = this.props, d = b(this.props);
78
+ const { header: e, footer: t, size: s, groupStickyHeaderItemRender: n, groupField: i, list: a } = this.props, d = b(this.props);
77
79
  let { group: o } = this.state;
78
80
  return o === void 0 && i !== void 0 && (o = I(d[0], i)), /* @__PURE__ */ c.createElement(c.Fragment, null, e && /* @__PURE__ */ c.createElement("div", { className: "k-list-header" }, e), /* @__PURE__ */ c.createElement(
79
81
  "div",
80
82
  {
81
- className: w("k-list", {
82
- [`k-list-${this.mobileMode ? "lg" : D[t] || t}`]: this.mobileMode || t
83
+ className: k("k-list", {
84
+ [`k-list-${this.mobileMode ? "lg" : P[s] || s}`]: this.mobileMode || s
83
85
  })
84
86
  },
85
- !a && o && d.length !== 0 && /* @__PURE__ */ c.createElement(L, { group: o, render: n }),
87
+ !a && o && d.length !== 0 && /* @__PURE__ */ c.createElement(K, { group: o, render: n }),
86
88
  this.renderList()
87
- ), s && /* @__PURE__ */ c.createElement("div", { className: "k-list-footer" }, s));
89
+ ), t && /* @__PURE__ */ c.createElement("div", { className: "k-list-footer" }, t));
88
90
  }, this.onScroll = (e) => {
89
91
  this._isScrolling = !0;
90
- const { list: s } = this.base, { groupField: t } = this.props;
92
+ const { list: t } = this.base, { groupField: s } = this.props;
91
93
  let n = b(this.props);
92
- if (!t || !n.length)
94
+ if (!s || !n.length)
93
95
  return;
94
- const i = this.itemHeight || (s ? s.children[0].offsetHeight : 0), d = e.target.scrollTop;
95
- t && (n = this.base.getGroupedDataModernMode(n, t));
96
- let o = n[0][t];
96
+ const i = this.itemHeight || (t ? t.children[0].offsetHeight : 0), d = e.target.scrollTop;
97
+ s && (n = this.base.getGroupedDataModernMode(n, s));
98
+ let o = n[0][s];
97
99
  for (let r = 1; r < n.length && !(i * r > d); r++)
98
- n[r] && n[r][t] && (o = n[r][t]);
100
+ n[r] && n[r][s] && (o = n[r][s]);
99
101
  o !== this.state.group && this.setState({
100
102
  group: o
101
103
  });
102
- }, this.handleItemClick = (e, s) => {
103
- this.base.handleItemClick(e, s), this._valueDuringOnChange = void 0;
104
+ }, this.handleItemClick = (e, t) => {
105
+ this.base.handleItemClick(e, t), this._valueDuringOnChange = void 0;
104
106
  }, this.onChangeHandler = (e) => {
105
- const t = this.base.initState(), n = this.mobileMode ? e.target.element : e.currentTarget, i = n.value, a = n.selectionEnd === i.length;
106
- t.syntheticEvent = e;
107
- const d = this._suggested, o = this.value, r = o && o.substring(0, o.length - d.length), p = r && r === i, l = r && r.length > i.length, { suggest: v } = this.props, h = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
107
+ const s = this.base.initState(), n = this.mobileMode ? e.target.element : e.currentTarget, i = n.value, a = n.selectionEnd === i.length;
108
+ s.syntheticEvent = e;
109
+ const d = this._suggested, o = this.value, r = o && o.substring(0, o.length - d.length), u = r && r === i, p = r && r.length > i.length, { suggest: v } = this.props, h = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
108
110
  if (v !== void 0 && v !== !1) {
109
- p || l || !a ? this._suggested = "" : this.suggestValue(i);
111
+ u || p || !a ? this._suggested = "" : this.suggestValue(i);
110
112
  const g = i + this._suggested, m = { userInput: i, value: this._suggested };
111
- this.triggerOnChange(g, t, { suggestion: m });
113
+ this.triggerOnChange(g, s, { suggestion: m });
112
114
  } else
113
- this._suggested = "", this.triggerOnChange(i, t);
114
- (!h && i || h && !i) && this.togglePopup(t), t.data.focusedItem = void 0, this.applyState(t), this.setState({ group: void 0 });
115
+ this._suggested = "", this.triggerOnChange(i, s);
116
+ (!h && i || h && !i) && this.togglePopup(s), s.data.focusedItem = void 0, this.applyState(s), this.setState({ group: void 0 });
115
117
  }, this.clearButtonClick = (e) => {
116
- const t = this.base.initState(), n = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
117
- t.syntheticEvent = e;
118
+ const s = this.base.initState(), n = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
119
+ s.syntheticEvent = e;
118
120
  const i = "";
119
- this._suggested = "", this.triggerOnChange(i, t), this.state.focusedItem !== void 0 && (t.data.focusedItem = void 0), n && this.togglePopup(t), this.applyState(t);
121
+ this._suggested = "", this.triggerOnChange(i, s), this.state.focusedItem !== void 0 && (s.data.focusedItem = void 0), n && this.togglePopup(s), this.applyState(s);
120
122
  }, this.onInputKeyDown = (e) => {
121
- const { skipDisabledItems: s, groupField: t, textField: n } = this.props, i = b(this.props);
123
+ const { skipDisabledItems: t, groupField: s, textField: n } = this.props, i = b(this.props);
122
124
  this._isScrolling && (this._isScrolling = !1);
123
- const a = this.focusedIndex(), d = i[a], o = e.keyCode, r = e.altKey, p = this.props.opened !== void 0 ? this.props.opened : this.state.opened, l = this.base.initState();
124
- l.syntheticEvent = e;
125
+ const a = this.focusedIndex(), d = i[a], o = e.keyCode, r = e.altKey, u = this.props.opened !== void 0 ? this.props.opened : this.state.opened, p = this.base.initState();
126
+ p.syntheticEvent = e;
125
127
  const v = () => {
126
- p && e.preventDefault();
128
+ u && e.preventDefault();
127
129
  };
128
130
  if (r && o === f.down)
129
131
  this.setState({
@@ -133,18 +135,18 @@ const ee = "Please enter a valid value!", { sizeMap: D, roundedMap: te } = U, y
133
135
  this.setState({
134
136
  opened: !1
135
137
  });
136
- else if (p && o === f.pageUp)
138
+ else if (u && o === f.pageUp)
137
139
  v(), this.base.scrollPopupByPageSize(-1);
138
- else if (p && o === f.pageDown)
140
+ else if (u && o === f.pageDown)
139
141
  v(), this.base.scrollPopupByPageSize(1);
140
- else if (p && (o === f.enter || o === f.esc))
141
- v(), s === !1 && d && d.disabled ? (p && this.togglePopup(l), this.applyState(l)) : this.applyInputValue(e.currentTarget.value, l, e.keyCode);
142
- else if (!p && o === f.esc)
143
- this._suggested = "", this.triggerOnChange("", l), this.state.focusedItem !== void 0 && (l.data.focusedItem = void 0), this.applyState(l);
142
+ else if (u && (o === f.enter || o === f.esc))
143
+ v(), t === !1 && d && d.disabled ? (u && this.togglePopup(p), this.applyState(p)) : this.applyInputValue(e.currentTarget.value, p, e.keyCode);
144
+ else if (!u && o === f.esc)
145
+ this._suggested = "", this.triggerOnChange("", p), this.state.focusedItem !== void 0 && (p.data.focusedItem = void 0), this.applyState(p);
144
146
  else if (o === f.up || o === f.down) {
145
- if (t !== "" && n)
146
- if (!this.props.skipDisabledItems && p)
147
- this.onNavigate(l, o);
147
+ if (s !== "" && n)
148
+ if (!this.props.skipDisabledItems && u)
149
+ this.onNavigate(p, o);
148
150
  else {
149
151
  let h = 0;
150
152
  if (o === f.down || o === f.right) {
@@ -164,11 +166,11 @@ const ee = "Please enter a valid value!", { sizeMap: D, roundedMap: te } = U, y
164
166
  }
165
167
  if (h !== void 0) {
166
168
  const g = h - a;
167
- this.onNavigate(l, o, g);
168
- } else h === void 0 && a === i.length - 1 && this.onNavigate(l, o);
169
+ this.onNavigate(p, o, g);
170
+ } else h === void 0 && a === i.length - 1 && this.onNavigate(p, o);
169
171
  }
170
- else if (!this.props.skipDisabledItems && p)
171
- this.onNavigate(l, o);
172
+ else if (!this.props.skipDisabledItems && u)
173
+ this.onNavigate(p, o);
172
174
  else {
173
175
  let h = null;
174
176
  if (o === f.down || o === f.right)
@@ -180,22 +182,22 @@ const ee = "Please enter a valid value!", { sizeMap: D, roundedMap: te } = U, y
180
182
  }
181
183
  if (h) {
182
184
  const g = h.id - a - 1;
183
- this.onNavigate(l, o, g);
185
+ this.onNavigate(p, o, g);
184
186
  } else
185
- this.onNavigate(l, o);
187
+ this.onNavigate(p, o);
186
188
  }
187
- this.applyState(l), v();
189
+ this.applyState(p), v();
188
190
  }
189
191
  }, this.handleFocus = (e) => {
190
192
  this._skipFocusEvent || this.base.handleFocus(e);
191
193
  }, this.handleBlur = (e) => {
192
- const s = this.base.initState();
193
- !this.state.focused || this._skipFocusEvent || (s.syntheticEvent = e, s.data.focused = !1, s.events.push({ type: "onBlur" }), this.opened && !this.mobileMode && (this.state.opened && (s.data.opened = !1), s.events.push({ type: "onClose" })), this.applyState(s));
194
- }, this.handleWrapperClick = (e) => {
195
- const s = this._input;
196
- !this.opened && s && this.focusElement(s);
197
194
  const t = this.base.initState();
198
- t.syntheticEvent = e, !this.state.focused && !this.mobileMode && (t.events.push({ type: "onFocus" }), t.data.focused = !0), this.mobileMode && window.setTimeout(() => this._adaptiveInput && this._adaptiveInput.focus(), 300), this.base.togglePopup(t), this.applyState(t);
195
+ !this.state.focused || this._skipFocusEvent || (t.syntheticEvent = e, t.data.focused = !1, t.events.push({ type: "onBlur" }), this.opened && !this.mobileMode && (this.state.opened && (t.data.opened = !1), t.events.push({ type: "onClose" })), this.applyState(t));
196
+ }, this.handleWrapperClick = (e) => {
197
+ const t = this._input;
198
+ !this.opened && t && this.focusElement(t);
199
+ const s = this.base.initState();
200
+ s.syntheticEvent = e, !this.state.focused && !this.mobileMode && (s.events.push({ type: "onFocus" }), s.data.focused = !0), this.mobileMode && window.setTimeout(() => this._adaptiveInput && this._adaptiveInput.focus(), 300), this.base.togglePopup(s), this.applyState(s);
199
201
  };
200
202
  }
201
203
  get _inputId() {
@@ -227,10 +229,10 @@ const ee = "Please enter a valid value!", { sizeMap: D, roundedMap: te } = U, y
227
229
  * Represents the validity state into which the AutoComplete is set.
228
230
  */
229
231
  get validity() {
230
- const e = this.props.validationMessage !== void 0, s = !this.required || this.value !== "", t = this.props.valid !== void 0 ? this.props.valid : s;
232
+ const e = this.props.validationMessage !== void 0, t = !this.required || this.value !== "", s = this.props.valid !== void 0 ? this.props.valid : t;
231
233
  return {
232
234
  customError: e,
233
- valid: t,
235
+ valid: s,
234
236
  valueMissing: this.value === null
235
237
  };
236
238
  }
@@ -242,8 +244,8 @@ const ee = "Please enter a valid value!", { sizeMap: D, roundedMap: te } = U, y
242
244
  * The mobile mode of the AutoComplete.
243
245
  */
244
246
  get mobileMode() {
245
- var s;
246
- return !!(this.state.windowWidth && this.props._adaptiveMode && this.state.windowWidth <= ((s = this.props._adaptiveMode) == null ? void 0 : s.medium) && this.props.adaptive);
247
+ var t;
248
+ return !!(this.state.windowWidth && this.props._adaptiveMode && this.state.windowWidth <= ((t = this.props._adaptiveMode) == null ? void 0 : t.medium) && this.props.adaptive);
247
249
  }
248
250
  /**
249
251
  * @hidden
@@ -260,14 +262,14 @@ const ee = "Please enter a valid value!", { sizeMap: D, roundedMap: te } = U, y
260
262
  /**
261
263
  * @hidden
262
264
  */
263
- componentDidUpdate(e, s) {
265
+ componentDidUpdate(e, t) {
264
266
  var h;
265
- const { groupField: t = "" } = this.props, n = b(this.props), { data: i = [] } = e, a = this.focusedIndex(), d = n[a], o = i !== n, r = d !== void 0 && s.focusedItem !== d, p = this.props.opened !== void 0 ? this.props.opened : this.state.opened, l = e.opened !== void 0 ? e.opened : s.opened, v = !l && p;
266
- if (t === "")
267
- (p && (r || o) || v) && this.base.scrollToItem(a);
267
+ const { groupField: s = "" } = this.props, n = b(this.props), { data: i = [] } = e, a = this.focusedIndex(), d = n[a], o = i !== n, r = d !== void 0 && t.focusedItem !== d, u = this.props.opened !== void 0 ? this.props.opened : this.state.opened, p = e.opened !== void 0 ? e.opened : t.opened, v = !p && u;
268
+ if (s === "")
269
+ (u && (r || o) || v) && this.base.scrollToItem(a);
268
270
  else if (!this._isScrolling) {
269
- const g = (h = this.base.getGroupedDataModernMode(n, t)) == null ? void 0 : h.indexOf(d);
270
- v && (n && n.length !== 0 && this.base.resetGroupStickyHeader(n[0][t], this), this.base.scrollToItem(g)), p && l && r && this.base.scrollToItem(g);
271
+ const g = (h = this.base.getGroupedDataModernMode(n, s)) == null ? void 0 : h.indexOf(d);
272
+ v && (n && n.length !== 0 && this.base.resetGroupStickyHeader(n[0][s], this), this.base.scrollToItem(g)), u && p && r && this.base.scrollToItem(g);
271
273
  }
272
274
  this.setValidity();
273
275
  }
@@ -275,13 +277,13 @@ const ee = "Please enter a valid value!", { sizeMap: D, roundedMap: te } = U, y
275
277
  * @hidden
276
278
  */
277
279
  componentDidMount() {
278
- var s;
279
- this.observerResize = E && window.ResizeObserver && new window.ResizeObserver(this.calculateMedia.bind(this)), this.base.didMount(), this.setValidity(), (s = this.document) != null && s.body && this.observerResize && this.observerResize.observe(this.document.body);
280
+ var t;
281
+ this.observerResize = E && window.ResizeObserver && new window.ResizeObserver(this.calculateMedia.bind(this)), this.base.didMount(), this.setValidity(), (t = this.document) != null && t.body && this.observerResize && this.observerResize.observe(this.document.body);
280
282
  const e = this.props.name || this.props.id;
281
- this.KendoPasteSubscription = $(this._element, {
283
+ this.KendoPasteSubscription = G(this._element, {
282
284
  fieldName: e,
283
- onValueChange: (t) => {
284
- this.handleKendoPasteValue(t);
285
+ onValueChange: (s) => {
286
+ this.handleKendoPasteValue(s);
285
287
  }
286
288
  });
287
289
  }
@@ -296,45 +298,45 @@ const ee = "Please enter a valid value!", { sizeMap: D, roundedMap: te } = U, y
296
298
  * @hidden
297
299
  */
298
300
  render() {
299
- const { dir: e, disabled: s, label: t, className: n, style: i, loading: a, suggest: d, size: o, rounded: r, fillMode: p } = this.props, l = !this.validityStyles || this.validity.valid, v = this.base, h = this.value, g = this.props.clearButton !== !1 && !a && !!h, m = this.props.id || this._inputId, P = this.state.focused;
301
+ const { dir: e, disabled: t, label: s, className: n, style: i, loading: a, suggest: d, size: o, rounded: r, fillMode: u } = this.props, p = !this.validityStyles || this.validity.valid, v = this.base, h = this.value, g = this.props.clearButton !== !1 && !a && !!h, m = this.props.id || this._inputId, O = this.state.focused;
300
302
  typeof d == "string" && (this._suggested = d);
301
- const [O, B] = M(this.props.prefix || c.Fragment), [T, V] = M(this.props.suffix || c.Fragment), _ = /* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.createElement(
303
+ const [B, T] = D(this.props.prefix || c.Fragment), [V, L] = D(this.props.suffix || c.Fragment), _ = /* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.createElement(
302
304
  "span",
303
305
  {
304
- className: w("k-autocomplete k-input", n, {
305
- [`k-input-${D[o] || o}`]: o,
306
- [`k-rounded-${te[r] || r}`]: r,
307
- [`k-input-${p}`]: p,
308
- "k-invalid": !l,
309
- "k-focus": P && !s,
306
+ className: k("k-autocomplete k-input", n, {
307
+ [`k-input-${P[o] || o}`]: o,
308
+ [`k-rounded-${ne[r] || r}`]: r,
309
+ [`k-input-${u}`]: u,
310
+ "k-invalid": !p,
311
+ "k-focus": O && !t,
310
312
  "k-loading": a,
311
313
  "k-required": this.required,
312
- "k-disabled": s
314
+ "k-disabled": t
313
315
  }),
314
316
  ref: (C) => {
315
317
  this._element = C, v.wrapper = C;
316
318
  },
317
- style: t ? { ...i, width: void 0 } : i,
319
+ style: s ? { ...i, width: void 0 } : i,
318
320
  dir: e,
319
321
  onFocus: this.mobileMode ? (C) => this.handleWrapperClick(C) : this.handleFocus,
320
322
  onBlur: this.handleBlur,
321
323
  onClick: this.handleWrapperClick
322
324
  },
323
- this.props.prefix && /* @__PURE__ */ c.createElement(O, { ...B }),
325
+ this.props.prefix && /* @__PURE__ */ c.createElement(B, { ...T }),
324
326
  this.renderSearchBar(h || "", m),
325
- a && /* @__PURE__ */ c.createElement(j, { className: "k-input-loading-icon", name: "loading" }),
326
- g && !a && /* @__PURE__ */ c.createElement(Q, { onClick: this.clearButtonClick, key: "clearbutton" }),
327
- this.props.suffix && /* @__PURE__ */ c.createElement(T, { ...V }),
327
+ a && /* @__PURE__ */ c.createElement($, { className: "k-input-loading-icon", name: "loading" }),
328
+ g && !a && /* @__PURE__ */ c.createElement(ee, { onClick: this.clearButtonClick, key: "clearbutton" }),
329
+ this.props.suffix && /* @__PURE__ */ c.createElement(V, { ...L }),
328
330
  !this.mobileMode && this.renderListContainer()
329
331
  ), this.mobileMode && this.renderAdaptiveListContainer());
330
- return t ? /* @__PURE__ */ c.createElement(
331
- J,
332
+ return s ? /* @__PURE__ */ c.createElement(
333
+ Q,
332
334
  {
333
- label: t,
335
+ label: s,
334
336
  editorId: m,
335
337
  editorValue: h,
336
- editorValid: l,
337
- editorDisabled: s,
338
+ editorValid: p,
339
+ editorDisabled: t,
338
340
  style: { width: i ? i.width : void 0 },
339
341
  children: _
340
342
  }
@@ -343,33 +345,33 @@ const ee = "Please enter a valid value!", { sizeMap: D, roundedMap: te } = U, y
343
345
  /**
344
346
  * @hidden
345
347
  */
346
- onNavigate(e, s, t) {
347
- const n = this.value, { textField: i, focusedItemIndex: a } = this.props, d = b(this.props), o = this.state.focusedItem !== void 0 ? d.findIndex((p) => S(p, this.state.focusedItem, i)) : a ? a(d, n, i) : d.indexOf(F(d, n, i)), r = this.base.navigation.navigate({
348
- keyCode: s,
348
+ onNavigate(e, t, s) {
349
+ const n = this.value, { textField: i, focusedItemIndex: a } = this.props, d = b(this.props), o = this.state.focusedItem !== void 0 ? d.findIndex((u) => w(u, this.state.focusedItem, i)) : a ? a(d, n, i) : d.indexOf(F(d, n, i)), r = this.base.navigation.navigate({
350
+ keyCode: t,
349
351
  current: o,
350
352
  max: d.length - 1,
351
353
  min: 0,
352
- skipItems: t || void 0
354
+ skipItems: s || void 0
353
355
  });
354
356
  r !== void 0 && this.itemFocus(r, e), this.applyState(e);
355
357
  }
356
358
  /**
357
359
  * @hidden
358
360
  */
359
- applyInputValue(e, s, t) {
361
+ applyInputValue(e, t, s) {
360
362
  const n = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { textField: i } = this.props, a = b(this.props), d = this.focusedIndex(), o = a[d];
361
- if (this._suggested = "", n && t === f.enter && o && !o.disabled) {
363
+ if (this._suggested = "", n && s === f.enter && o && !o.disabled) {
362
364
  const r = I(a[this.focusedIndex(e)], i);
363
- this.triggerOnChange(r, s);
365
+ this.triggerOnChange(r, t);
364
366
  }
365
- n && this.togglePopup(s), this.applyState(s);
367
+ n && this.togglePopup(t), this.applyState(t);
366
368
  }
367
- renderSearchBar(e, s) {
368
- const t = this.base, { placeholder: n, tabIndex: i, disabled: a, readonly: d, inputAttributes: o } = this.props, { focused: r } = this.state, p = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
369
+ renderSearchBar(e, t) {
370
+ const s = this.base, { placeholder: n, tabIndex: i, disabled: a, readonly: d, inputAttributes: o } = this.props, { focused: r } = this.state, u = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
369
371
  return /* @__PURE__ */ c.createElement(
370
372
  N,
371
373
  {
372
- id: s,
374
+ id: t,
373
375
  placeholder: n,
374
376
  tabIndex: i,
375
377
  accessKey: this.props.accessKey,
@@ -377,20 +379,21 @@ const ee = "Please enter a valid value!", { sizeMap: D, roundedMap: te } = U, y
377
379
  suggestedText: this._suggested,
378
380
  focused: r,
379
381
  name: this.props.name,
380
- ref: (l) => {
381
- this._input = l && l.input;
382
+ ref: (p) => {
383
+ this._input = p && p.input;
382
384
  },
383
385
  onKeyDown: this.onInputKeyDown,
384
386
  onChange: this.onChangeHandler,
385
- onFocus: t.handleFocus,
387
+ onFocus: s.handleFocus,
386
388
  onBlur: this.handleBlur,
387
389
  disabled: a,
388
390
  readOnly: d,
389
- expanded: p,
390
- owns: t.listBoxId,
391
- activedescendant: "option-" + t.guid + "-" + this.focusedIndex(),
391
+ expanded: u,
392
+ ariaControls: u ? s.listBoxId : void 0,
393
+ activedescendant: `k-${s.guid}-item-${this.focusedIndex() + 1}`,
392
394
  role: "combobox",
393
395
  ariaLabelledBy: this.props.ariaLabelledBy,
396
+ ariaLabel: this.props.ariaLabel,
394
397
  ariaDescribedBy: this.props.ariaDescribedBy,
395
398
  ariaRequired: this.required,
396
399
  render: this.props.valueRender,
@@ -399,55 +402,59 @@ const ee = "Please enter a valid value!", { sizeMap: D, roundedMap: te } = U, y
399
402
  );
400
403
  }
401
404
  renderListContainer() {
402
- const e = this.base, { dir: s, groupField: t } = this.props, n = b(this.props), i = e.getPopupSettings(), a = this.props.opened !== void 0 ? this.props.opened : this.state.opened, d = i.width !== void 0 ? i.width : e.popupWidth;
405
+ const e = this.base, { dir: t, groupField: s } = this.props, n = b(this.props), i = e.getPopupSettings(), a = this.props.opened !== void 0 ? this.props.opened : this.state.opened, d = i.width !== void 0 ? i.width : e.popupWidth;
403
406
  let { group: o } = this.state;
404
- return o === void 0 && t !== void 0 && (o = I(n[0], t)), /* @__PURE__ */ c.createElement(
405
- R,
407
+ return o === void 0 && s !== void 0 && (o = I(n[0], s)), /* @__PURE__ */ c.createElement(
408
+ z,
406
409
  {
407
410
  width: d,
408
411
  popupSettings: {
409
412
  ...i,
410
413
  anchor: i.anchor || this.element,
411
414
  show: a,
412
- popupClass: w(i.popupClass, "k-list-container", "k-autocomplete-popup")
415
+ popupClass: k(i.popupClass, "k-list-container", "k-autocomplete-popup")
413
416
  },
414
- dir: s !== void 0 ? s : this.base.dirCalculated,
417
+ dir: t !== void 0 ? t : this.base.dirCalculated,
415
418
  itemsCount: [n.length]
416
419
  },
417
420
  this.listContainerContent()
418
421
  );
419
422
  }
420
423
  renderList() {
421
- const e = this.base, s = e.getPopupSettings(), { textField: t, listNoDataRender: n, itemRender: i, groupHeaderItemRender: a } = this.props, d = b(this.props), o = this.value, r = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
424
+ const e = this.base, t = X(this), s = e.getPopupSettings(), { textField: n, listNoDataRender: i, itemRender: a, groupHeaderItemRender: d } = this.props, o = b(this.props), r = this.value, u = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
422
425
  return /* @__PURE__ */ c.createElement(
423
- K,
426
+ R,
424
427
  {
425
428
  id: e.listBoxId,
426
- show: r,
427
- data: d.slice(),
429
+ show: u,
430
+ data: o.slice(),
428
431
  focusedIndex: this.focusedIndex(),
429
- value: o,
430
- textField: t,
431
- valueField: t,
432
- highlightSelected: !1,
432
+ value: r,
433
+ textField: n,
434
+ valueField: n,
435
+ highlightSelected: !0,
433
436
  optionsGuid: e.guid,
434
437
  groupField: this.props.groupField,
438
+ ariaLabel: t.toLanguageString(
439
+ M,
440
+ Z[M]
441
+ ),
435
442
  listRef: (p) => {
436
443
  e.list = p;
437
444
  },
438
445
  wrapperStyle: this.mobileMode ? {} : { maxHeight: s.height },
439
446
  wrapperCssClass: "k-list-content",
440
447
  onClick: this.handleItemClick,
441
- itemRender: i,
442
- groupHeaderItemRender: a,
443
- noDataRender: n,
448
+ itemRender: a,
449
+ groupHeaderItemRender: d,
450
+ noDataRender: i,
444
451
  onMouseDown: (p) => p.preventDefault(),
445
452
  onScroll: this.onScroll
446
453
  }
447
454
  );
448
455
  }
449
- triggerOnChange(e, s, t) {
450
- this.value === e && !t || (s.data.value = e, this._valueDuringOnChange = e, s.events.push({ type: "onChange", ...t || {} }));
456
+ triggerOnChange(e, t, s) {
457
+ this.value === e && !s || (t.data.value = e, this._valueDuringOnChange = e, t.events.push({ type: "onChange", ...s || {} }));
451
458
  }
452
459
  focusElement(e) {
453
460
  this._skipFocusEvent = !0, e.focus(), window.setTimeout(() => this._skipFocusEvent = !1, 0);
@@ -457,54 +464,55 @@ const ee = "Please enter a valid value!", { sizeMap: D, roundedMap: te } = U, y
457
464
  }
458
465
  suggestValue(e) {
459
466
  if (this._suggested = "", e) {
460
- const { textField: s } = this.props, t = b(this.props), n = t[H(t, e, s)];
467
+ const { textField: t } = this.props, s = b(this.props), n = s[H(s, e, t)];
461
468
  if (n) {
462
- const i = I(n, s);
469
+ const i = I(n, t);
463
470
  e.toLowerCase() !== i.toLowerCase() && (this._suggested = i.substring(e.length));
464
471
  }
465
472
  }
466
473
  }
467
474
  focusedIndex(e) {
468
- const { textField: s, focusedItemIndex: t, skipDisabledItems: n } = this.props, i = b(this.props), a = e !== void 0 ? e : this.value;
475
+ const { textField: t, focusedItemIndex: s, skipDisabledItems: n } = this.props, i = b(this.props), a = e !== void 0 ? e : this.value;
469
476
  if (this.state.focusedItem !== void 0)
470
- return i.findIndex((o) => S(o, this.state.focusedItem, s));
471
- if (t)
472
- return t(i, a, s);
473
- const d = i.indexOf(F(i, a, s));
474
- return n && s && d === -1 ? i.findIndex((o) => !o.disabled) : Math.max(0, d);
477
+ return i.findIndex((o) => w(o, this.state.focusedItem, t));
478
+ if (s)
479
+ return s(i, a, t);
480
+ const d = i.indexOf(F(i, a, t));
481
+ return n && t && d === -1 ? i.findIndex((o) => !o.disabled) : Math.max(0, d);
475
482
  }
476
483
  calculateMedia(e) {
477
- for (const s of e)
478
- this.setState({ windowWidth: s.target.clientWidth });
484
+ for (const t of e)
485
+ this.setState({ windowWidth: t.target.clientWidth });
479
486
  }
480
487
  };
481
488
  y.displayName = "AutoComplete", y.propTypes = {
482
- ...x.basicPropTypes,
483
- size: u.oneOf(["small", "medium", "large"]),
484
- rounded: u.oneOf(["small", "medium", "large", "full", "none"]),
485
- fillMode: u.oneOf(["solid", "flat", "outline"]),
486
- groupField: u.string,
487
- suggest: u.oneOfType([u.bool, u.string]),
488
- placeholder: u.string,
489
- value: u.string,
490
- defaultValue: u.string,
491
- validationMessage: u.string,
492
- required: u.bool,
493
- readonly: u.bool,
494
- clearButton: u.bool,
495
- valueRender: u.func,
496
- id: u.string,
497
- ariaLabelledBy: u.string,
498
- ariaDescribedBy: u.string,
499
- list: u.any,
500
- adaptive: u.bool,
501
- adaptiveTitle: u.string,
502
- adaptiveSubtitle: u.string,
503
- onCancel: u.func,
504
- skipDisabledItems: u.bool,
505
- inputAttributes: u.object
489
+ ...S.basicPropTypes,
490
+ size: l.oneOf(["small", "medium", "large"]),
491
+ rounded: l.oneOf(["small", "medium", "large", "full", "none"]),
492
+ fillMode: l.oneOf(["solid", "flat", "outline"]),
493
+ groupField: l.string,
494
+ suggest: l.oneOfType([l.bool, l.string]),
495
+ placeholder: l.string,
496
+ value: l.string,
497
+ defaultValue: l.string,
498
+ validationMessage: l.string,
499
+ required: l.bool,
500
+ readonly: l.bool,
501
+ clearButton: l.bool,
502
+ valueRender: l.func,
503
+ id: l.string,
504
+ ariaLabelledBy: l.string,
505
+ ariaLabel: l.string,
506
+ ariaDescribedBy: l.string,
507
+ list: l.any,
508
+ adaptive: l.bool,
509
+ adaptiveTitle: l.string,
510
+ adaptiveSubtitle: l.string,
511
+ onCancel: l.func,
512
+ skipDisabledItems: l.bool,
513
+ inputAttributes: l.object
506
514
  }, y.defaultProps = {
507
- ...x.defaultProps,
515
+ ...S.defaultProps,
508
516
  size: void 0,
509
517
  rounded: void 0,
510
518
  fillMode: void 0,
@@ -512,16 +520,18 @@ y.displayName = "AutoComplete", y.propTypes = {
512
520
  prefix: void 0,
513
521
  suffix: void 0
514
522
  };
515
- let k = y;
516
- const se = G(), ie = A(
517
- q(
518
- se,
519
- W(k)
523
+ let x = y;
524
+ const ae = q();
525
+ Y(x);
526
+ const de = U(
527
+ j(
528
+ ae,
529
+ J(x)
520
530
  )
521
531
  );
522
- ie.displayName = "KendoReactAutoComplete";
532
+ de.displayName = "KendoReactAutoComplete";
523
533
  export {
524
- ie as AutoComplete,
525
- se as AutoCompletePropsContext,
526
- k as AutoCompleteWithoutContext
534
+ de as AutoComplete,
535
+ ae as AutoCompletePropsContext,
536
+ x as AutoCompleteWithoutContext
527
537
  };