@progress/kendo-react-dropdowns 8.2.0 → 8.2.1-develop.2

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.
@@ -8,142 +8,142 @@
8
8
  "use client";
9
9
  import * as I from "react";
10
10
  import c from "prop-types";
11
- import M from "../common/SearchBar.mjs";
12
- import T from "../common/ListContainer.mjs";
13
- import N from "../common/List.mjs";
14
- import S from "../common/DropDownBase.mjs";
15
- import L from "../common/GroupStickyHeader.mjs";
16
- import { getItemValue as b, areSame as C, getFocusedItem as F, itemIndexStartsWith as H } from "../common/utils.mjs";
17
- import { Keys as m, validatePackage as R, classNames as k, IconWrap as q, createPropsContext as K, withIdHOC as z, withPropsContext as G, kendoThemeMaps as $ } from "@progress/kendo-react-common";
18
- import { FloatingLabel as A } from "@progress/kendo-react-labels";
19
- import { packageMetadata as U } from "../package-metadata.mjs";
20
- import j from "../common/ClearButton.mjs";
21
- import O from "../common/withCustomComponent.mjs";
22
- const J = "Please enter a valid value!", { sizeMap: P, roundedMap: Q } = $, y = class y extends I.Component {
11
+ import T from "../common/SearchBar.mjs";
12
+ import N from "../common/ListContainer.mjs";
13
+ import L from "../common/List.mjs";
14
+ import C from "../common/DropDownBase.mjs";
15
+ import H from "../common/GroupStickyHeader.mjs";
16
+ import { getFilteredData as y, getItemValue as x, areSame as k, getFocusedItem as O, itemIndexStartsWith as R } from "../common/utils.mjs";
17
+ import { Keys as m, validatePackage as q, classNames as w, IconWrap as K, createPropsContext as z, withIdHOC as G, withPropsContext as $, kendoThemeMaps as A } from "@progress/kendo-react-common";
18
+ import { FloatingLabel as U } from "@progress/kendo-react-labels";
19
+ import { packageMetadata as j } from "../package-metadata.mjs";
20
+ import J from "../common/ClearButton.mjs";
21
+ import P from "../common/withCustomComponent.mjs";
22
+ const Q = "Please enter a valid value!", { sizeMap: B, roundedMap: W } = A, b = class b extends I.Component {
23
23
  constructor(a) {
24
- super(a), this.state = {}, this.base = new S(this), this._element = null, this._suggested = "", this._input = null, this._isScrolling = !1, this.itemHeight = 0, this.focus = () => {
24
+ super(a), this.state = {}, this.base = new C(this), this._element = null, this._suggested = "", this._input = null, this._isScrolling = !1, this.itemHeight = 0, this.focus = () => {
25
25
  this._input && this._input.focus();
26
- }, this.handleItemSelect = (t, e) => {
27
- const { data: s = [] } = this.props, n = b(s[t], this.props.textField);
28
- this.triggerOnChange(n, e);
29
- }, this.itemFocus = (t, e) => {
30
- const { data: s = [], textField: n } = this.props, i = s[t];
31
- C(this.state.focusedItem, i, n) || (e.data.focusedItem = i);
32
- }, this.togglePopup = (t) => {
33
- this.base.togglePopup(t);
26
+ }, this.handleItemSelect = (e, o) => {
27
+ const s = y(this.props), t = x(s[e], this.props.textField);
28
+ this.triggerOnChange(t, o);
29
+ }, this.itemFocus = (e, o) => {
30
+ const { textField: s } = this.props, i = y(this.props)[e];
31
+ k(this.state.focusedItem, i, s) || (o.data.focusedItem = i);
32
+ }, this.togglePopup = (e) => {
33
+ this.base.togglePopup(e);
34
34
  }, this.setValidity = () => {
35
35
  this._input && this._input.setCustomValidity && this._input.setCustomValidity(
36
- this.validity.valid ? "" : this.props.validationMessage || J
36
+ this.validity.valid ? "" : this.props.validationMessage || Q
37
37
  );
38
- }, this.onScroll = (t) => {
38
+ }, this.onScroll = (e) => {
39
39
  this._isScrolling = !0;
40
- const { list: e } = this.base, { groupField: s } = this.props;
41
- let { data: n = [] } = this.props;
42
- if (!s || !n.length)
40
+ const { list: o } = this.base, { groupField: s } = this.props;
41
+ let t = y(this.props);
42
+ if (!s || !t.length)
43
43
  return;
44
- const i = this.itemHeight || (e ? e.children[0].offsetHeight : 0), l = t.target.scrollTop;
45
- s && (n = this.base.getGroupedDataModernMode(n, s));
46
- let o = n[0][s];
47
- for (let d = 1; d < n.length && !(i * d > l); d++)
48
- n[d] && n[d][s] && (o = n[d][s]);
49
- o !== this.state.group && this.setState({
50
- group: o
44
+ const i = this.itemHeight || (o ? o.children[0].offsetHeight : 0), p = e.target.scrollTop;
45
+ s && (t = this.base.getGroupedDataModernMode(t, s));
46
+ let n = t[0][s];
47
+ for (let r = 1; r < t.length && !(i * r > p); r++)
48
+ t[r] && t[r][s] && (n = t[r][s]);
49
+ n !== this.state.group && this.setState({
50
+ group: n
51
51
  });
52
- }, this.handleItemClick = (t, e) => {
53
- this.base.handleItemClick(t, e), this._valueDuringOnChange = void 0;
54
- }, this.onChangeHandler = (t) => {
55
- const s = this.base.initState(), n = t.currentTarget, i = n.value, r = n.selectionEnd === i.length;
56
- s.syntheticEvent = t;
57
- const l = this._suggested, o = this.value, d = o && o.substring(0, o.length - l.length), f = d && d === i, h = d && d.length > i.length, { suggest: g } = this.props, p = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
52
+ }, this.handleItemClick = (e, o) => {
53
+ this.base.handleItemClick(e, o), this._valueDuringOnChange = void 0;
54
+ }, this.onChangeHandler = (e) => {
55
+ const s = this.base.initState(), t = e.currentTarget, i = t.value, d = t.selectionEnd === i.length;
56
+ s.syntheticEvent = e;
57
+ const p = this._suggested, n = this.value, r = n && n.substring(0, n.length - p.length), f = r && r === i, h = r && r.length > i.length, { suggest: g } = this.props, l = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
58
58
  if (g !== void 0 && g !== !1) {
59
- f || h || !r ? this._suggested = "" : this.suggestValue(i);
59
+ f || h || !d ? this._suggested = "" : this.suggestValue(i);
60
60
  const u = i + this._suggested, v = { userInput: i, value: this._suggested };
61
61
  this.triggerOnChange(u, s, { suggestion: v });
62
62
  } else
63
63
  this._suggested = "", this.triggerOnChange(i, s);
64
- (!p && i || p && !i) && this.togglePopup(s), s.data.focusedItem = void 0, this.applyState(s), this.setState({ group: void 0 });
65
- }, this.clearButtonClick = (t) => {
66
- const s = this.base.initState(), n = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
67
- s.syntheticEvent = t;
64
+ (!l && i || l && !i) && this.togglePopup(s), s.data.focusedItem = void 0, this.applyState(s), this.setState({ group: void 0 });
65
+ }, this.clearButtonClick = (e) => {
66
+ const s = this.base.initState(), t = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
67
+ s.syntheticEvent = e;
68
68
  const i = "";
69
- this._suggested = "", this.triggerOnChange(i, s), this.state.focusedItem !== void 0 && (s.data.focusedItem = void 0), n && this.togglePopup(s), this.applyState(s);
70
- }, this.onInputKeyDown = (t) => {
71
- const { data: e = [], skipDisabledItems: s, groupField: n, textField: i } = this.props;
69
+ this._suggested = "", this.triggerOnChange(i, s), this.state.focusedItem !== void 0 && (s.data.focusedItem = void 0), t && this.togglePopup(s), this.applyState(s);
70
+ }, this.onInputKeyDown = (e) => {
71
+ const { skipDisabledItems: o, groupField: s, textField: t } = this.props, i = y(this.props);
72
72
  this._isScrolling && (this._isScrolling = !1);
73
- const r = this.focusedIndex(), l = e[r], o = t.keyCode, d = t.altKey, f = this.props.opened !== void 0 ? this.props.opened : this.state.opened, h = this.base.initState();
74
- h.syntheticEvent = t;
73
+ const d = this.focusedIndex(), p = i[d], n = e.keyCode, r = e.altKey, f = this.props.opened !== void 0 ? this.props.opened : this.state.opened, h = this.base.initState();
74
+ h.syntheticEvent = e;
75
75
  const g = () => {
76
- f && t.preventDefault();
76
+ f && e.preventDefault();
77
77
  };
78
- if (d && o === m.down)
78
+ if (r && n === m.down)
79
79
  this.setState({
80
80
  opened: !0
81
81
  });
82
- else if (d && o === m.up)
82
+ else if (r && n === m.up)
83
83
  this.setState({
84
84
  opened: !1
85
85
  });
86
- else if (f && o === m.pageUp)
86
+ else if (f && n === m.pageUp)
87
87
  g(), this.base.scrollPopupByPageSize(-1);
88
- else if (f && o === m.pageDown)
88
+ else if (f && n === m.pageDown)
89
89
  g(), this.base.scrollPopupByPageSize(1);
90
- else if (f && (o === m.enter || o === m.esc))
91
- g(), s === !1 && l && l.disabled ? (f && this.togglePopup(h), this.applyState(h)) : this.applyInputValue(t.currentTarget.value, h, t.keyCode);
92
- else if (!f && o === m.esc) {
93
- const p = "";
94
- this._suggested = "", this.triggerOnChange(p, h), this.state.focusedItem !== void 0 && (h.data.focusedItem = void 0), this.applyState(h);
95
- } else if (o === m.up || o === m.down) {
96
- if (n !== "" && i)
90
+ else if (f && (n === m.enter || n === m.esc))
91
+ g(), o === !1 && p && p.disabled ? (f && this.togglePopup(h), this.applyState(h)) : this.applyInputValue(e.currentTarget.value, h, e.keyCode);
92
+ else if (!f && n === m.esc) {
93
+ const l = "";
94
+ this._suggested = "", this.triggerOnChange(l, h), this.state.focusedItem !== void 0 && (h.data.focusedItem = void 0), this.applyState(h);
95
+ } else if (n === m.up || n === m.down) {
96
+ if (s !== "" && t)
97
97
  if (!this.props.skipDisabledItems && f)
98
- this.onNavigate(h, o);
98
+ this.onNavigate(h, n);
99
99
  else {
100
- let p = 0;
101
- if (o === m.down || o === m.right) {
102
- const u = e.slice(r + 1).find((v) => !v.disabled && v[i]);
103
- p = u && e.findIndex((v) => v[i] === u[i]);
104
- } else if (o === m.up || o === m.left) {
100
+ let l = 0;
101
+ if (n === m.down || n === m.right) {
102
+ const u = i.slice(d + 1).find((v) => !v.disabled && v[t]);
103
+ l = u && i.findIndex((v) => v[t] === u[t]);
104
+ } else if (n === m.up || n === m.left) {
105
105
  let u;
106
- if (r === -1)
107
- u = e, p = e.findIndex((v) => !v.disabled && v[i]);
106
+ if (d === -1)
107
+ u = i, l = i.findIndex((v) => !v.disabled && v[t]);
108
108
  else {
109
- u = e.slice(0, r);
109
+ u = i.slice(0, d);
110
110
  let v = u.pop();
111
111
  for (; v && v.disabled; )
112
112
  v = u.pop();
113
- p = v && e.findIndex((x) => x[i] === v[i]);
113
+ l = v && i.findIndex((S) => S[t] === v[t]);
114
114
  }
115
115
  }
116
- if (p !== void 0) {
117
- const u = p - r;
118
- this.onNavigate(h, o, u);
116
+ if (l !== void 0) {
117
+ const u = l - d;
118
+ this.onNavigate(h, n, u);
119
119
  } else
120
- p === void 0 && e.findIndex((u) => u[i]) === e.length - 1 && this.onNavigate(h, o);
120
+ l === void 0 && i.findIndex((u) => u[t]) === i.length - 1 && this.onNavigate(h, n);
121
121
  }
122
122
  else if (!this.props.skipDisabledItems && f)
123
- this.onNavigate(h, o);
123
+ this.onNavigate(h, n);
124
124
  else {
125
- let p = null;
126
- if (o === m.down || o === m.right)
127
- p = e.slice(r + 1).find((u) => !u.disabled);
128
- else if (o === m.up || o === m.left) {
129
- const u = e.slice(0, r);
130
- for (p = u.pop(); p && p.disabled; )
131
- p = u.pop();
125
+ let l = null;
126
+ if (n === m.down || n === m.right)
127
+ l = i.slice(d + 1).find((u) => !u.disabled);
128
+ else if (n === m.up || n === m.left) {
129
+ const u = i.slice(0, d);
130
+ for (l = u.pop(); l && l.disabled; )
131
+ l = u.pop();
132
132
  }
133
- if (p) {
134
- const u = p.id - r - 1;
135
- this.onNavigate(h, o, u);
133
+ if (l) {
134
+ const u = l.id - d - 1;
135
+ this.onNavigate(h, n, u);
136
136
  } else
137
- this.onNavigate(h, o);
137
+ this.onNavigate(h, n);
138
138
  }
139
139
  this.applyState(h), g();
140
140
  }
141
- }, this.handleBlur = (t) => {
141
+ }, this.handleBlur = (e) => {
142
142
  if (this.state.focused) {
143
- const e = this.base.initState();
144
- e.data.focused = !1, e.events.push({ type: "onBlur" }), e.syntheticEvent = t, this.applyInputValue(t.currentTarget.value, e);
143
+ const o = this.base.initState();
144
+ o.data.focused = !1, o.events.push({ type: "onBlur" }), o.syntheticEvent = e, this.applyInputValue(e.currentTarget.value, o);
145
145
  }
146
- }, R(U);
146
+ }, q(j);
147
147
  }
148
148
  get _inputId() {
149
149
  return this.props.id + "-accessibility-id";
@@ -170,10 +170,10 @@ const J = "Please enter a valid value!", { sizeMap: P, roundedMap: Q } = $, y =
170
170
  * Represents the validity state into which the AutoComplete is set.
171
171
  */
172
172
  get validity() {
173
- const a = this.props.validationMessage !== void 0, t = !this.required || this.value !== "", e = this.props.valid !== void 0 ? this.props.valid : t;
173
+ const a = this.props.validationMessage !== void 0, e = !this.required || this.value !== "", o = this.props.valid !== void 0 ? this.props.valid : e;
174
174
  return {
175
175
  customError: a,
176
- valid: e,
176
+ valid: o,
177
177
  valueMissing: this.value === null
178
178
  };
179
179
  }
@@ -181,25 +181,25 @@ const J = "Please enter a valid value!", { sizeMap: P, roundedMap: Q } = $, y =
181
181
  * @hidden
182
182
  */
183
183
  get validityStyles() {
184
- return this.props.validityStyles !== void 0 ? this.props.validityStyles : y.defaultProps.validityStyles;
184
+ return this.props.validityStyles !== void 0 ? this.props.validityStyles : b.defaultProps.validityStyles;
185
185
  }
186
186
  /**
187
187
  * @hidden
188
188
  */
189
189
  get required() {
190
- return this.props.required !== void 0 ? this.props.required : y.defaultProps.required;
190
+ return this.props.required !== void 0 ? this.props.required : b.defaultProps.required;
191
191
  }
192
192
  /**
193
193
  * @hidden
194
194
  */
195
- componentDidUpdate(a, t) {
195
+ componentDidUpdate(a, e) {
196
196
  var g;
197
- const { groupField: e = "", data: s = [] } = this.props, { data: n = [] } = a, i = this.focusedIndex(), r = s[i], l = n !== s, o = r !== void 0 && t.focusedItem !== r, d = this.props.opened !== void 0 ? this.props.opened : this.state.opened, f = a.opened !== void 0 ? a.opened : t.opened, h = !f && d;
198
- if (e === "")
199
- (d && (o || l) || h) && this.base.scrollToItem(i);
197
+ const { groupField: o = "" } = this.props, s = y(this.props), { data: t = [] } = a, i = this.focusedIndex(), d = s[i], p = t !== s, n = d !== void 0 && e.focusedItem !== d, r = this.props.opened !== void 0 ? this.props.opened : this.state.opened, f = a.opened !== void 0 ? a.opened : e.opened, h = !f && r;
198
+ if (o === "")
199
+ (r && (n || p) || h) && this.base.scrollToItem(i);
200
200
  else if (!this._isScrolling) {
201
- const p = (g = this.base.getGroupedDataModernMode(s, e)) == null ? void 0 : g.indexOf(r);
202
- h && (s && s.length !== 0 && this.base.resetGroupStickyHeader(s[0][e], this), this.base.scrollToItem(p)), d && f && o && this.base.scrollToItem(p);
201
+ const l = (g = this.base.getGroupedDataModernMode(s, o)) == null ? void 0 : g.indexOf(d);
202
+ h && (s && s.length !== 0 && this.base.resetGroupStickyHeader(s[0][o], this), this.base.scrollToItem(l)), r && f && n && this.base.scrollToItem(l);
203
203
  }
204
204
  this.setValidity();
205
205
  }
@@ -213,98 +213,98 @@ const J = "Please enter a valid value!", { sizeMap: P, roundedMap: Q } = $, y =
213
213
  * @hidden
214
214
  */
215
215
  render() {
216
- const { dir: a, disabled: t, label: e, className: s, style: n, loading: i, suggest: r, size: l, rounded: o, fillMode: d } = this.props, f = !this.validityStyles || this.validity.valid, h = this.base, g = this.value, p = this.props.clearButton !== !1 && !i && !!g, u = this.props.id || this._inputId, v = this.state.focused;
217
- typeof r == "string" && (this._suggested = r);
218
- const [x, B] = O(this.props.prefix || I.Fragment), [V, E] = O(this.props.suffix || I.Fragment), D = /* @__PURE__ */ I.createElement(
216
+ const { dir: a, disabled: e, label: o, className: s, style: t, loading: i, suggest: d, size: p, rounded: n, fillMode: r } = this.props, f = !this.validityStyles || this.validity.valid, h = this.base, g = this.value, l = this.props.clearButton !== !1 && !i && !!g, u = this.props.id || this._inputId, v = this.state.focused;
217
+ typeof d == "string" && (this._suggested = d);
218
+ const [S, V] = P(this.props.prefix || I.Fragment), [E, M] = P(this.props.suffix || I.Fragment), _ = /* @__PURE__ */ I.createElement(
219
219
  "span",
220
220
  {
221
- className: k(
221
+ className: w(
222
222
  "k-autocomplete k-input",
223
223
  s,
224
224
  {
225
- [`k-input-${P[l] || l}`]: l,
226
- [`k-rounded-${Q[o] || o}`]: o,
227
- [`k-input-${d}`]: d,
225
+ [`k-input-${B[p] || p}`]: p,
226
+ [`k-rounded-${W[n] || n}`]: n,
227
+ [`k-input-${r}`]: r,
228
228
  "k-invalid": !f,
229
- "k-focus": v && !t,
229
+ "k-focus": v && !e,
230
230
  "k-loading": i,
231
231
  "k-required": this.required,
232
- "k-disabled": t
232
+ "k-disabled": e
233
233
  }
234
234
  ),
235
- ref: (_) => {
236
- this._element = _, h.wrapper = _;
235
+ ref: (F) => {
236
+ this._element = F, h.wrapper = F;
237
237
  },
238
- style: e ? { ...n, width: void 0 } : n,
238
+ style: o ? { ...t, width: void 0 } : t,
239
239
  dir: a
240
240
  },
241
- this.props.prefix && /* @__PURE__ */ I.createElement(x, { ...B }),
241
+ this.props.prefix && /* @__PURE__ */ I.createElement(S, { ...V }),
242
242
  this.renderSearchBar(g || "", u),
243
- i && /* @__PURE__ */ I.createElement(q, { className: "k-input-loading-icon", name: "loading" }),
244
- p && !i && /* @__PURE__ */ I.createElement(j, { onClick: this.clearButtonClick, key: "clearbutton" }),
245
- this.props.suffix && /* @__PURE__ */ I.createElement(V, { ...E }),
243
+ i && /* @__PURE__ */ I.createElement(K, { className: "k-input-loading-icon", name: "loading" }),
244
+ l && !i && /* @__PURE__ */ I.createElement(J, { onClick: this.clearButtonClick, key: "clearbutton" }),
245
+ this.props.suffix && /* @__PURE__ */ I.createElement(E, { ...M }),
246
246
  this.renderListContainer()
247
247
  );
248
- return e ? /* @__PURE__ */ I.createElement(
249
- A,
248
+ return o ? /* @__PURE__ */ I.createElement(
249
+ U,
250
250
  {
251
- label: e,
251
+ label: o,
252
252
  editorId: u,
253
253
  editorValue: g,
254
254
  editorValid: f,
255
- editorDisabled: t,
256
- style: { width: n ? n.width : void 0 },
257
- children: D
255
+ editorDisabled: e,
256
+ style: { width: t ? t.width : void 0 },
257
+ children: _
258
258
  }
259
- ) : D;
259
+ ) : _;
260
260
  }
261
261
  /**
262
262
  * @hidden
263
263
  */
264
- onNavigate(a, t, e) {
265
- const s = this.value, { data: n = [], textField: i, focusedItemIndex: r } = this.props, l = this.state.focusedItem !== void 0 ? n.findIndex((d) => C(d, this.state.focusedItem, i)) : r ? r(n, s, i) : n.indexOf(F(n, s, i)), o = this.base.navigation.navigate({
266
- keyCode: t,
267
- current: l,
268
- max: n.length - 1,
264
+ onNavigate(a, e, o) {
265
+ const s = this.value, { textField: t, focusedItemIndex: i } = this.props, d = y(this.props), p = this.state.focusedItem !== void 0 ? d.findIndex((r) => k(r, this.state.focusedItem, t)) : i ? i(d, s, t) : d.indexOf(O(d, s, t)), n = this.base.navigation.navigate({
266
+ keyCode: e,
267
+ current: p,
268
+ max: d.length - 1,
269
269
  min: 0,
270
- skipItems: e || void 0
270
+ skipItems: o || void 0
271
271
  });
272
- o !== void 0 && this.itemFocus(o, a), this.applyState(a);
272
+ n !== void 0 && this.itemFocus(n, a), this.applyState(a);
273
273
  }
274
274
  /**
275
275
  * @hidden
276
276
  */
277
- applyInputValue(a, t, e) {
278
- const s = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { data: n = [], textField: i } = this.props, r = this.focusedIndex(), l = n[r];
279
- if (this._suggested = "", s && e === m.enter && l && !l.disabled) {
280
- const o = b(n[this.focusedIndex(a)], i);
281
- this.triggerOnChange(o, t);
277
+ applyInputValue(a, e, o) {
278
+ const s = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { textField: t } = this.props, i = y(this.props), d = this.focusedIndex(), p = i[d];
279
+ if (this._suggested = "", s && o === m.enter && p && !p.disabled) {
280
+ const n = x(i[this.focusedIndex(a)], t);
281
+ this.triggerOnChange(n, e);
282
282
  }
283
- s && this.togglePopup(t), this.applyState(t);
283
+ s && this.togglePopup(e), this.applyState(e);
284
284
  }
285
- renderSearchBar(a, t) {
286
- const e = this.base, { placeholder: s, tabIndex: n, disabled: i, readonly: r } = this.props, { focused: l } = this.state, o = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
285
+ renderSearchBar(a, e) {
286
+ const o = this.base, { placeholder: s, tabIndex: t, disabled: i, readonly: d } = this.props, { focused: p } = this.state, n = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
287
287
  return /* @__PURE__ */ I.createElement(
288
- M,
288
+ T,
289
289
  {
290
- id: t,
290
+ id: e,
291
291
  placeholder: s,
292
- tabIndex: n,
292
+ tabIndex: t,
293
293
  accessKey: this.props.accessKey,
294
294
  value: a,
295
295
  suggestedText: this._suggested,
296
- focused: l,
296
+ focused: p,
297
297
  name: this.props.name,
298
- ref: (d) => this._input = d && d.input,
298
+ ref: (r) => this._input = r && r.input,
299
299
  onKeyDown: this.onInputKeyDown,
300
300
  onChange: this.onChangeHandler,
301
- onFocus: e.handleFocus,
301
+ onFocus: o.handleFocus,
302
302
  onBlur: this.handleBlur,
303
303
  disabled: i,
304
- readOnly: r,
305
- expanded: o,
306
- owns: e.listBoxId,
307
- activedescendant: "option-" + e.guid + "-" + this.focusedIndex(),
304
+ readOnly: d,
305
+ expanded: n,
306
+ owns: o.listBoxId,
307
+ activedescendant: "option-" + o.guid + "-" + this.focusedIndex(),
308
308
  role: "combobox",
309
309
  ariaLabelledBy: this.props.ariaLabelledBy,
310
310
  ariaDescribedBy: this.props.ariaDescribedBy,
@@ -315,113 +315,111 @@ const J = "Please enter a valid value!", { sizeMap: P, roundedMap: Q } = $, y =
315
315
  }
316
316
  renderListContainer() {
317
317
  const a = this.base, {
318
- dir: t,
319
- header: e,
318
+ dir: e,
319
+ header: o,
320
320
  footer: s,
321
- data: n = [],
322
- size: i,
323
- groupField: r,
324
- list: l,
325
- groupStickyHeaderItemRender: o
326
- } = this.props, d = a.getPopupSettings(), f = this.props.opened !== void 0 ? this.props.opened : this.state.opened, h = d.width !== void 0 ? d.width : a.popupWidth;
321
+ size: t,
322
+ groupField: i,
323
+ list: d,
324
+ groupStickyHeaderItemRender: p
325
+ } = this.props, n = y(this.props), r = a.getPopupSettings(), f = this.props.opened !== void 0 ? this.props.opened : this.state.opened, h = r.width !== void 0 ? r.width : a.popupWidth;
327
326
  let { group: g } = this.state;
328
- return g === void 0 && r !== void 0 && (g = b(n[0], r)), /* @__PURE__ */ I.createElement(
329
- T,
327
+ return g === void 0 && i !== void 0 && (g = x(n[0], i)), /* @__PURE__ */ I.createElement(
328
+ N,
330
329
  {
331
330
  width: h,
332
331
  popupSettings: {
333
- ...d,
334
- anchor: d.anchor || this.element,
332
+ ...r,
333
+ anchor: r.anchor || this.element,
335
334
  show: f,
336
- popupClass: k(
337
- d.popupClass,
335
+ popupClass: w(
336
+ r.popupClass,
338
337
  "k-list-container",
339
338
  "k-autocomplete-popup"
340
339
  )
341
340
  },
342
- dir: t !== void 0 ? t : this.base.dirCalculated,
341
+ dir: e !== void 0 ? e : this.base.dirCalculated,
343
342
  itemsCount: [n.length]
344
343
  },
345
- e && /* @__PURE__ */ I.createElement("div", { className: "k-list-header" }, e),
344
+ o && /* @__PURE__ */ I.createElement("div", { className: "k-list-header" }, o),
346
345
  /* @__PURE__ */ I.createElement(
347
346
  "div",
348
347
  {
349
- className: k(
348
+ className: w(
350
349
  "k-list",
351
350
  {
352
- [`k-list-${P[i] || i}`]: i
351
+ [`k-list-${B[t] || t}`]: t
353
352
  }
354
353
  )
355
354
  },
356
- !l && g && n.length !== 0 && /* @__PURE__ */ I.createElement(L, { group: g, groupMode: "modern", render: o }),
355
+ !d && g && n.length !== 0 && /* @__PURE__ */ I.createElement(H, { group: g, groupMode: "modern", render: p }),
357
356
  this.renderList()
358
357
  ),
359
358
  s && /* @__PURE__ */ I.createElement("div", { className: "k-list-footer" }, s)
360
359
  );
361
360
  }
362
361
  renderList() {
363
- const a = this.base, t = a.getPopupSettings(), {
364
- textField: e,
365
- data: s = [],
366
- listNoDataRender: n,
367
- itemRender: i,
368
- groupHeaderItemRender: r
369
- } = this.props, l = this.value, o = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
362
+ const a = this.base, e = a.getPopupSettings(), {
363
+ textField: o,
364
+ listNoDataRender: s,
365
+ itemRender: t,
366
+ groupHeaderItemRender: i
367
+ } = this.props, d = y(this.props), p = this.value, n = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
370
368
  return /* @__PURE__ */ I.createElement(
371
- N,
369
+ L,
372
370
  {
373
371
  id: a.listBoxId,
374
- show: o,
375
- data: s.slice(),
372
+ show: n,
373
+ data: d.slice(),
376
374
  focusedIndex: this.focusedIndex(),
377
- value: l,
378
- textField: e,
379
- valueField: e,
375
+ value: p,
376
+ textField: o,
377
+ valueField: o,
380
378
  highlightSelected: !1,
381
379
  optionsGuid: a.guid,
382
380
  groupField: this.props.groupField,
383
381
  groupMode: "modern",
384
- listRef: (d) => a.list = d,
385
- wrapperStyle: { maxHeight: t.height },
382
+ listRef: (r) => a.list = r,
383
+ wrapperStyle: { maxHeight: e.height },
386
384
  wrapperCssClass: "k-list-content",
387
385
  onClick: this.handleItemClick,
388
- itemRender: i,
389
- groupHeaderItemRender: r,
390
- noDataRender: n,
391
- onMouseDown: (d) => d.preventDefault(),
386
+ itemRender: t,
387
+ groupHeaderItemRender: i,
388
+ noDataRender: s,
389
+ onMouseDown: (r) => r.preventDefault(),
392
390
  onScroll: this.onScroll
393
391
  }
394
392
  );
395
393
  }
396
- triggerOnChange(a, t, e) {
397
- this.value === a && !e || (t.data.value = a, this._valueDuringOnChange = a, t.events.push({ type: "onChange", ...e || {} }));
394
+ triggerOnChange(a, e, o) {
395
+ this.value === a && !o || (e.data.value = a, this._valueDuringOnChange = a, e.events.push({ type: "onChange", ...o || {} }));
398
396
  }
399
397
  applyState(a) {
400
398
  this.base.applyState(a), this._valueDuringOnChange = void 0;
401
399
  }
402
400
  suggestValue(a) {
403
401
  if (this._suggested = "", a) {
404
- const { data: t = [], textField: e } = this.props, s = t[H(t, a, e)];
402
+ const { textField: e } = this.props, o = y(this.props), s = o[R(o, a, e)];
405
403
  if (s) {
406
- const n = b(s, e);
407
- a.toLowerCase() !== n.toLowerCase() && (this._suggested = n.substring(a.length));
404
+ const t = x(s, e);
405
+ a.toLowerCase() !== t.toLowerCase() && (this._suggested = t.substring(a.length));
408
406
  }
409
407
  }
410
408
  }
411
409
  focusedIndex(a) {
412
- const { data: t = [], textField: e, focusedItemIndex: s, skipDisabledItems: n } = this.props, i = a !== void 0 ? a : this.value;
410
+ const { textField: e, focusedItemIndex: o, skipDisabledItems: s } = this.props, t = y(this.props), i = a !== void 0 ? a : this.value;
413
411
  if (this.state.focusedItem !== void 0)
414
- return t.findIndex((r) => C(r, this.state.focusedItem, e));
415
- if (s)
416
- return s(t, i, e);
412
+ return t.findIndex((d) => k(d, this.state.focusedItem, e));
413
+ if (o)
414
+ return o(t, i, e);
417
415
  {
418
- const r = t.indexOf(F(t, i, e));
419
- return n && e && r === -1 ? t.findIndex((l) => !l.disabled && l[e]) : Math.max(0, r);
416
+ const d = t.indexOf(O(t, i, e));
417
+ return s && e && d === -1 ? t.findIndex((p) => !p.disabled && p[e]) : Math.max(0, d);
420
418
  }
421
419
  }
422
420
  };
423
- y.displayName = "AutoComplete", y.propTypes = {
424
- ...S.basicPropTypes,
421
+ b.displayName = "AutoComplete", b.propTypes = {
422
+ ...C.basicPropTypes,
425
423
  size: c.oneOf([null, "small", "medium", "large"]),
426
424
  rounded: c.oneOf([null, "small", "medium", "large", "full"]),
427
425
  fillMode: c.oneOf([null, "solid", "flat", "outline"]),
@@ -440,8 +438,8 @@ y.displayName = "AutoComplete", y.propTypes = {
440
438
  ariaDescribedBy: c.string,
441
439
  list: c.any,
442
440
  skipDisabledItems: c.bool
443
- }, y.defaultProps = {
444
- ...S.defaultProps,
441
+ }, b.defaultProps = {
442
+ ...C.defaultProps,
445
443
  size: "medium",
446
444
  rounded: "medium",
447
445
  fillMode: "solid",
@@ -449,11 +447,11 @@ y.displayName = "AutoComplete", y.propTypes = {
449
447
  prefix: void 0,
450
448
  suffix: void 0
451
449
  };
452
- let w = y;
453
- const W = K(), X = z(G(W, w));
454
- X.displayName = "KendoReactAutoComplete";
450
+ let D = b;
451
+ const X = z(), Y = G($(X, D));
452
+ Y.displayName = "KendoReactAutoComplete";
455
453
  export {
456
- X as AutoComplete,
457
- W as AutoCompletePropsContext,
458
- w as AutoCompleteWithoutContext
454
+ Y as AutoComplete,
455
+ X as AutoCompletePropsContext,
456
+ D as AutoCompleteWithoutContext
459
457
  };