@progress/kendo-react-dropdowns 15.0.0 → 15.0.1-develop.10

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.
@@ -6,11 +6,11 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as c from "react";
9
- import m from "prop-types";
9
+ import f from "prop-types";
10
10
  import P from "../common/DropDownBase.mjs";
11
11
  import { createPropsContext as it, classNames as S, uComboBox as F, Keys as x, validatePackage as ot, getLicenseMessage as at, svgIconPropType as nt, canUseDOM as H, subscribeToKendoPaste as lt, IconWrap as rt, WatermarkOverlay as pt, withIdHOC as dt, withPropsContext as ht, withUnstyledHOC as ct, withAdaptiveModeContext as ut } from "@progress/kendo-react-common";
12
12
  import { FloatingLabel as gt } from "@progress/kendo-react-labels";
13
- import { getPlainDataDuplicates as mt, getItemIndexByText as L, getFilteredData as I, areSame as w, getItemValue as D, isPresent as k, itemIndexStartsWith as N, suggestValue as ft } from "../common/utils.mjs";
13
+ import { getPlainDataDuplicates as mt, getItemIndexByText as L, getFilteredData as I, areSame as w, getItemValue as k, isPresent as D, itemIndexStartsWith as N, suggestValue as ft } from "../common/utils.mjs";
14
14
  import vt from "../common/SearchBar.mjs";
15
15
  import bt from "../common/ListContainer.mjs";
16
16
  import xt from "../common/List.mjs";
@@ -32,26 +32,26 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
32
32
  }, this.checkForDuplicatePlainTextRecords = () => {
33
33
  const t = this.props.textField !== void 0, e = this.props.dataItemKey !== void 0;
34
34
  if (this.props.data && this.props.data.length > 0 && !t && !e) {
35
- const a = this.props.data;
36
- this.duplicates = mt(a), this.hasDuplicates = this.duplicates.length > 0;
35
+ const n = this.props.data;
36
+ this.duplicates = mt(n), this.hasDuplicates = this.duplicates.length > 0;
37
37
  }
38
38
  }, this.handleKendoPasteValue = (t) => {
39
- const { data: e, textField: a, allowCustom: r } = this.props;
39
+ const { data: e, textField: n, allowCustom: r } = this.props;
40
40
  if (!e)
41
41
  return;
42
- const l = t != null ? String(t) : "", o = L(e, l, a, !1, !0), p = o !== -1;
43
- let n = null;
44
- if (p ? n = e[o] : r && (n = a ? { [a]: l } : l), n === null)
42
+ const l = t != null ? String(t) : "", o = L(e, l, n, !1, !0), p = o !== -1;
43
+ let a = null;
44
+ if (p ? a = e[o] : r && (a = n ? { [n]: l } : l), a === null)
45
45
  return;
46
46
  const i = this.base.initState();
47
47
  i.syntheticEvent = {
48
48
  target: this._element,
49
49
  currentTarget: this._element,
50
50
  nativeEvent: new Event("change", { bubbles: !0 })
51
- }, this.state.text !== void 0 && (i.data.text = void 0), this.triggerOnChange(n, i), this.applyState(i);
51
+ }, this.state.text !== void 0 && (i.data.text = void 0), this.triggerOnChange(a, i), this.applyState(i);
52
52
  }, this.handleItemSelect = (t, e) => {
53
- const { virtual: a, dataItemKey: r } = this.props, l = I(this.props), o = a ? a.skip : 0, p = l[t - o], n = this.hasDuplicates || !w(p, this.value, r);
54
- this.triggerOnChange(p, e), this.state.text !== void 0 && (e.data.text = void 0), n && this.base.triggerPageChangeCornerItems(p, e);
53
+ const { virtual: n, dataItemKey: r } = this.props, l = I(this.props), o = n ? n.skip : 0, p = l[t - o], a = this.hasDuplicates || !w(p, this.value, r);
54
+ this.triggerOnChange(p, e), this.state.text !== void 0 && (e.data.text = void 0), a && this.base.triggerPageChangeCornerItems(p, e);
55
55
  }, this.onPopupOpened = () => {
56
56
  setTimeout(() => {
57
57
  this.mobileMode && this._adaptiveFilterInput && (this._skipBlur = !0, this._adaptiveFilterInput.focus(), this._skipBlur = !1);
@@ -60,22 +60,22 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
60
60
  this._element = t, this.base.wrapper = t;
61
61
  }, this.toggleBtnClick = (t) => {
62
62
  this._skipFocus = !0;
63
- const { skipDisabledItems: e, textField: a } = this.props, r = I(this.props), l = this.getFocusedIndex(), o = this.getCurrentValueDisabledStatus(a, r, l), p = this.props.opened !== void 0 ? this.props.opened : this.state.opened, n = this.base.initState();
64
- if (n.syntheticEvent = t, !e && a && o && this.clearValueOnToggleBtnClick(t), this.base.togglePopup(n), !p && this.mobileMode) {
63
+ const { skipDisabledItems: e, textField: n } = this.props, r = I(this.props), l = this.getFocusedIndex(), o = this.getCurrentValueDisabledStatus(n, r, l), p = this.props.opened !== void 0 ? this.props.opened : this.state.opened, a = this.base.initState();
64
+ if (a.syntheticEvent = t, !e && n && o && this.clearValueOnToggleBtnClick(t), this.base.togglePopup(a), !p && this.mobileMode) {
65
65
  const i = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text || null;
66
- this.base.filterChanged(i, n);
66
+ this.base.filterChanged(i, a);
67
67
  }
68
- this.applyState(n), setTimeout(() => {
68
+ this.applyState(a), setTimeout(() => {
69
69
  this._skipFocus = !1;
70
70
  }, 300);
71
71
  }, this.closeOpenedApplyStateNonMobileMode = (t, e) => {
72
72
  e && !this.mobileMode && this.base.togglePopup(t);
73
73
  }, this.renderMobileListFilter = () => {
74
- const t = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text, e = D(this.value, this.props.textField), a = k(t) ? t : e;
74
+ const t = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text, e = k(this.value, this.props.textField), n = D(t) ? t : e;
75
75
  return /* @__PURE__ */ c.createElement(
76
76
  It,
77
77
  {
78
- value: a,
78
+ value: n,
79
79
  ref: (r) => {
80
80
  this._adaptiveFilterInput = r && r.element;
81
81
  },
@@ -88,9 +88,9 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
88
88
  }
89
89
  );
90
90
  }, this.listContainerContent = () => {
91
- const { header: t, footer: e, size: a, groupStickyHeaderItemRender: r, groupField: l, list: o, unstyled: p, virtual: n } = this.props, i = I(this.props), d = p && p.uComboBox;
91
+ const { header: t, footer: e, size: n, groupStickyHeaderItemRender: r, groupField: l, list: o, unstyled: p, virtual: a } = this.props, i = I(this.props), d = p && p.uComboBox;
92
92
  let { group: h } = this.state;
93
- return h === void 0 && l !== void 0 && (h = D(i[0], l)), /* @__PURE__ */ c.createElement(
93
+ return h === void 0 && l !== void 0 && (h = k(i[0], l)), /* @__PURE__ */ c.createElement(
94
94
  "div",
95
95
  {
96
96
  className: S(
@@ -98,8 +98,8 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
98
98
  c: d,
99
99
  list: o,
100
100
  size: "large",
101
- tableSize: a,
102
- virtual: n
101
+ tableSize: n,
102
+ virtual: a
103
103
  })
104
104
  )
105
105
  },
@@ -118,17 +118,17 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
118
118
  const e = this.base.initState();
119
119
  e.syntheticEvent = t.syntheticEvent, e.data.text = t.target.value, this.base.filterChanged(t.target.value, e), this.applyState(e);
120
120
  }, this.onScroll = (t) => {
121
- const { vs: e, list: a } = this.base;
121
+ const { vs: e, list: n } = this.base;
122
122
  e.scrollHandler(t);
123
123
  const { groupField: r } = this.props;
124
124
  this.props.onListScroll && this.props.onListScroll(t);
125
125
  let l = I(this.props);
126
126
  if (!r || !l.length)
127
127
  return;
128
- const o = this.itemHeight = this.itemHeight || (e.enabled ? e.itemHeight : a ? a.children[0].offsetHeight : 0), n = t.target.scrollTop - e.skip * o;
128
+ const o = this.itemHeight = this.itemHeight || (e.enabled ? e.itemHeight : n ? n.children[0].offsetHeight : 0), a = t.target.scrollTop - e.skip * o;
129
129
  l = this.base.getGroupedDataModernMode(l, r);
130
130
  let i = l[0][r];
131
- for (let d = 1; d < l.length && !(o * d > n); d++)
131
+ for (let d = 1; d < l.length && !(o * d > a); d++)
132
132
  l[d] && l[d][r] && (i = l[d][r]);
133
133
  i !== this.state.group && (this.setState({
134
134
  group: i
@@ -137,35 +137,35 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
137
137
  this.navigationIndex = t, this.base.handleItemClick(t, e), this._valueDuringOnChange = void 0;
138
138
  }, this.handleBlur = (t) => {
139
139
  if (this.state.focused && !this._skipBlur) {
140
- const e = this.base.initState(), { textField: a } = this.props, r = I(this.props), l = this.getFocusedIndex(), p = !(l === -1) && this.getCurrentValueDisabledStatus(a, r, l);
141
- e.data.focused = !1, e.events.push({ type: "onBlur" }), e.syntheticEvent = t, a && p && this.clearValueOnBlur(t), this.applyValueOnRejectSuggestions(t.currentTarget.value, e);
140
+ const e = this.base.initState(), { textField: n } = this.props, r = I(this.props), l = this.getFocusedIndex(), p = !(l === -1) && this.getCurrentValueDisabledStatus(n, r, l);
141
+ e.data.focused = !1, e.events.push({ type: "onBlur" }), e.syntheticEvent = t, n && p && this.clearValueOnBlur(t), this.applyValueOnRejectSuggestions(t.currentTarget.value, e);
142
142
  }
143
143
  }, this.onInputClick = (t) => {
144
- const e = this.props.opened !== void 0 ? this.props.opened : this.state.opened, a = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text || null;
144
+ const e = this.props.opened !== void 0 ? this.props.opened : this.state.opened, n = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text || null;
145
145
  if (!e && this.mobileMode) {
146
146
  const r = this.base.initState();
147
- r.syntheticEvent = t, this.base.togglePopup(r), this.base.filterChanged(a, r), this.applyState(r);
147
+ r.syntheticEvent = t, this.base.togglePopup(r), this.base.filterChanged(n, r), this.applyState(r);
148
148
  }
149
149
  }, this.onInputKeyDown = (t) => {
150
- const { skipDisabledItems: e, textField: a, dataItemKey: r, groupField: l } = this.props, o = I(this.props), p = this.value, n = Math.max(
150
+ const { skipDisabledItems: e, textField: n, dataItemKey: r, groupField: l } = this.props, o = I(this.props), p = this.value, a = Math.max(
151
151
  0,
152
152
  o.findIndex((g) => w(g, p, r))
153
153
  ), i = t.keyCode, d = this.props.opened !== void 0 ? this.props.opened : this.state.opened, h = this.base.initState();
154
154
  if (h.syntheticEvent = t, !t.altKey && (i === x.up || i === x.down)) {
155
- if (t.preventDefault(), l !== "" && a)
155
+ if (t.preventDefault(), l !== "" && n)
156
156
  if (!this.props.skipDisabledItems && d)
157
157
  this.onNavigate(h, i);
158
158
  else {
159
159
  let g = 0;
160
160
  if (i === x.down || i === x.right) {
161
- const u = o.slice(n + 1 < o.length ? n + 1 : n).find((C) => !C.disabled);
161
+ const u = o.slice(a + 1 < o.length ? a + 1 : a).find((C) => !C.disabled);
162
162
  g = u && o.indexOf(u);
163
163
  } else if (i === x.up || i === x.left) {
164
164
  let u;
165
- if (n === 0)
165
+ if (a === 0)
166
166
  u = o, g = o.findIndex((C) => !C.disabled);
167
167
  else {
168
- u = o.slice(0, n);
168
+ u = o.slice(0, a);
169
169
  let C = u.pop();
170
170
  for (; C && C.disabled; )
171
171
  C = u.pop();
@@ -173,48 +173,50 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
173
173
  }
174
174
  }
175
175
  if (g !== void 0) {
176
- const u = g - n;
176
+ const u = g - a;
177
177
  this.onNavigate(h, i, u);
178
- } else g === void 0 && n === o.length - 1 && this.onNavigate(h, i);
178
+ } else g === void 0 && a === o.length - 1 && this.onNavigate(h, i);
179
179
  }
180
180
  else if (!this.props.skipDisabledItems && d)
181
181
  this.onNavigate(h, i);
182
182
  else {
183
183
  let g = null;
184
184
  if (i === x.down || i === x.right)
185
- g = o.slice(n + 1).find((u) => !u.disabled);
185
+ g = o.slice(a + 1).find((u) => !u.disabled);
186
186
  else if (i === x.up || i === x.left) {
187
- const u = o.slice(0, n);
187
+ const u = o.slice(0, a);
188
188
  for (g = u.pop(); g && g.disabled; )
189
189
  g = u.pop();
190
190
  }
191
191
  if (g) {
192
- const u = g.id - n - 1;
192
+ const u = g.id - a - 1;
193
193
  this.onNavigate(h, i, u);
194
194
  } else
195
195
  this.onNavigate(h, i);
196
196
  }
197
197
  this.applyState(h);
198
198
  }
199
- const f = () => {
199
+ const m = () => {
200
200
  t.preventDefault(), this.base.togglePopup(h), this.applyState(h);
201
- }, b = this.getFocusedIndex(), y = b === -1, v = !y && this.getCurrentValueDisabledStatus(a, o, b);
202
- d ? i === x.pageUp ? (t.preventDefault(), this.base.scrollPopupByPageSize(-1)) : i === x.pageDown ? (t.preventDefault(), this.base.scrollPopupByPageSize(1)) : t.altKey && i === x.up ? f() : i === x.enter ? (t.preventDefault(), (a && !y && t.currentTarget.value ? o[b][a] : void 0) ? !e && a && v ? this.clearValueOnEnterOrEsc(t) : v || this.applyValueOnEnter(t.currentTarget.value, h) : this.applyValueOnEnter(t.currentTarget.value, h)) : i === x.esc && (!e && a && v && this.clearValueOnEnterOrEsc(t), this.applyValueOnRejectSuggestions(t.currentTarget.value, h)) : !d && i === x.esc ? this.clearValueOnEnterOrEsc(t) : t.altKey && i === x.down && f();
201
+ }, b = this.getFocusedIndex(), y = b === -1, v = !y && this.getCurrentValueDisabledStatus(n, o, b);
202
+ d ? i === x.pageUp ? (t.preventDefault(), this.base.scrollPopupByPageSize(-1)) : i === x.pageDown ? (t.preventDefault(), this.base.scrollPopupByPageSize(1)) : t.altKey && i === x.up ? m() : i === x.enter ? (t.preventDefault(), (n && !y && t.currentTarget.value ? o[b][n] : void 0) ? !e && n && v ? this.clearValueOnEnterOrEsc(t) : v || this.applyValueOnEnter(t.currentTarget.value, h) : this.applyValueOnEnter(t.currentTarget.value, h)) : i === x.esc && (!e && n && v && this.clearValueOnEnterOrEsc(t), this.applyValueOnRejectSuggestions(t.currentTarget.value, h)) : !d && i === x.esc ? this.clearValueOnEnterOrEsc(t) : t.altKey && i === x.down && m();
203
203
  }, this.inputOnChange = (t) => {
204
204
  const e = this.base.initState();
205
205
  e.syntheticEvent = t;
206
- const a = this.props.opened !== void 0 ? this.props.opened : this.state.opened, r = t.currentTarget, l = r.value;
206
+ const n = this.props.opened !== void 0 ? this.props.opened : this.state.opened, r = t.currentTarget, l = r.value;
207
207
  if (this.props.suggest) {
208
208
  const o = r.selectionEnd === l.length;
209
209
  let p = this.props.filter !== void 0 ? this.props.filter : this.state.text;
210
- k(p) || (p = D(this.value, this.props.textField) || "");
211
- const n = p && p === l, i = p && p.length > l.length;
212
- n || i || !o ? this._suggested = "" : this.suggestValue(l);
210
+ D(p) || (p = k(this.value, this.props.textField) || "");
211
+ const a = p && p === l, i = p && p.length > l.length;
212
+ a || i || !o ? this._suggested = "" : this.suggestValue(l);
213
213
  }
214
- this.props.filter === void 0 && (e.data.text = l), this.state.focusedItem !== void 0 && (e.data.focusedItem = void 0), a ? this.scrollToFocused = !0 : this.base.togglePopup(e), this.base.filterChanged(l, e), this.applyState(e), this.setState({ group: void 0 });
214
+ this.props.filter === void 0 && (e.data.text = l), this.state.focusedItem !== void 0 && (e.data.focusedItem = void 0), n ? this.scrollToFocused = !0 : this.base.togglePopup(e), this.base.filterChanged(l, e), this.applyState(e), this.setState({ group: void 0 });
215
215
  }, this.clearButtonClick = (t) => {
216
216
  const e = this.base.initState();
217
- e.syntheticEvent = t, t.stopPropagation(), this.clearValue();
217
+ e.syntheticEvent = t, t.stopPropagation(), this.clearValue(), this._skipFocus = !0, this.focus(), setTimeout(() => {
218
+ this._skipFocus = !1;
219
+ }, 300);
218
220
  }, this.clearValueOnEnterOrEsc = (t) => {
219
221
  const e = this.base.initState();
220
222
  e.syntheticEvent = t, t.stopPropagation(), this.clearValue();
@@ -273,7 +275,7 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
273
275
  */
274
276
  get index() {
275
277
  const { dataItemKey: s } = this.props, t = I(this.props), e = this.value;
276
- return t.findIndex((a) => w(a, e, s));
278
+ return t.findIndex((n) => w(n, e, s));
277
279
  }
278
280
  /**
279
281
  * Gets the `name` property of the ComboBox.
@@ -301,22 +303,22 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
301
303
  }
302
304
  /** @hidden */
303
305
  componentDidUpdate(s, t) {
304
- var f, b;
305
- const { dataItemKey: e, virtual: a, groupField: r = "", textField: l } = this.props, o = I(this.props), p = s.virtual ? s.virtual.total : 0, n = this.props.opened !== void 0 ? this.props.opened : this.state.opened, i = s.opened !== void 0 ? s.opened : t.opened;
306
+ var m, b;
307
+ const { dataItemKey: e, virtual: n, groupField: r = "", textField: l } = this.props, o = I(this.props), p = s.virtual ? s.virtual.total : 0, a = this.props.opened !== void 0 ? this.props.opened : this.state.opened, i = s.opened !== void 0 ? s.opened : t.opened;
306
308
  s.data !== o && this.checkForDuplicatePlainTextRecords();
307
- const d = !i && n, h = this.value;
308
- if (this._valueOnDidUpdate = h, this.base.didUpdate(), a && a.total !== p)
309
+ const d = !i && a, h = this.value;
310
+ if (this._valueOnDidUpdate = h, this.base.didUpdate(), n && n.total !== p)
309
311
  this.base.vs.calcScrollElementHeight(), this.base.vs.reset();
310
312
  else {
311
313
  const y = s.value !== void 0 ? s.value : t.value;
312
314
  let v = this.hasDuplicates ? this.navigationIndex || 0 : o.findIndex((u) => w(u, h, e));
313
- l && h && (v = (f = this.base.getGroupedDataModernMode(o, r)) == null ? void 0 : f.map((u) => u[l]).indexOf(h[l]));
315
+ l && h && (v = (m = this.base.getGroupedDataModernMode(o, r)) == null ? void 0 : m.map((u) => u[l]).indexOf(h[l]));
314
316
  const g = !w(y, h, e);
315
- if (d && a ? this.base.scrollToVirtualItem(a, v) : d && !a ? (this.onPopupOpened(), o && o.length !== 0 && this.base.resetGroupStickyHeader(o[0][r], this), this.base.scrollToItem(v)) : (this.hasDuplicates || n && i && h && g) && this.base.scrollToItem(v), n && i && this.scrollToFocused) {
317
+ if (d && n ? this.base.scrollToVirtualItem(n, v) : d && !n ? (this.onPopupOpened(), o && o.length !== 0 && this.base.resetGroupStickyHeader(o[0][r], this), this.base.scrollToItem(v)) : (this.hasDuplicates || a && i && h && g) && this.base.scrollToItem(v), a && i && this.scrollToFocused) {
316
318
  const u = (b = this.props.filter ? this.props.filter : this.state.text) != null ? b : "";
317
319
  if (u) {
318
- const { focusedItemIndex: C = N } = this.props, M = C(o, u, l);
319
- this.base.scrollToItem(M);
320
+ const { focusedItemIndex: C = N } = this.props, T = C(o, u, l);
321
+ this.base.scrollToItem(T);
320
322
  } else
321
323
  this.base.scrollToItem(0);
322
324
  }
@@ -349,25 +351,25 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
349
351
  U,
350
352
  R[U]
351
353
  ), {
352
- dir: a,
354
+ dir: n,
353
355
  disabled: r,
354
356
  clearButton: l = E.defaultProps.clearButton,
355
357
  label: o,
356
358
  textField: p,
357
- className: n,
359
+ className: a,
358
360
  style: i,
359
361
  loading: d,
360
362
  iconClassName: h,
361
- virtual: f,
363
+ virtual: m,
362
364
  size: b,
363
365
  rounded: y,
364
366
  fillMode: v,
365
367
  opened: g = this.state.opened,
366
368
  placeholder: u,
367
369
  svgIcon: C,
368
- unstyled: M
369
- } = this.props, T = !this.validityStyles || this.validity.valid, O = this.props.filter !== void 0 ? this.props.filter : this.state.text, J = D(this.value, p), B = k(O) ? O : J, Q = l && (!!B || k(this.value)), V = this.base.vs, z = this.props.id || this._inputId, _ = M && M.uComboBox;
370
- V.enabled = f !== void 0, f !== void 0 && (V.skip = f.skip, V.total = f.total, V.pageSize = f.pageSize);
370
+ unstyled: T
371
+ } = this.props, O = !this.validityStyles || this.validity.valid, M = this.props.filter !== void 0 ? this.props.filter : this.state.text, J = k(this.value, p), B = D(M) ? M : J, Q = l && (!!B || D(this.value)), V = this.base.vs, z = this.props.id || this._inputId, _ = T && T.uComboBox;
372
+ V.enabled = m !== void 0, m !== void 0 && (V.skip = m.skip, V.total = m.total, V.pageSize = m.pageSize);
371
373
  const [X, Z] = Y(this.props.prefix || c.Fragment), [tt, et] = Y(this.props.suffix || c.Fragment), A = /* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.createElement(
372
374
  "span",
373
375
  {
@@ -378,15 +380,15 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
378
380
  rounded: y,
379
381
  fillMode: v,
380
382
  disabled: r,
381
- invalid: !T,
383
+ invalid: !O,
382
384
  loading: d,
383
385
  required: this.required
384
386
  }),
385
- n
387
+ a
386
388
  ),
387
389
  ref: this.componentRef,
388
390
  style: o ? { ...i, width: void 0 } : i,
389
- dir: a,
391
+ dir: n,
390
392
  onFocus: this.handleFocus
391
393
  },
392
394
  this.props.prefix && /* @__PURE__ */ c.createElement(X, { ...Z }),
@@ -424,90 +426,90 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
424
426
  label: o,
425
427
  editorId: z,
426
428
  editorValue: B,
427
- editorValid: T,
429
+ editorValid: O,
428
430
  editorDisabled: r,
429
431
  style: { width: i ? i.width : void 0 },
430
432
  children: A,
431
- unstyled: M
433
+ unstyled: T
432
434
  }
433
435
  ) : A;
434
436
  }
435
437
  /** @hidden */
436
438
  onNavigate(s, t, e) {
437
- const { virtual: a = { skip: 0 } } = this.props, r = I(this.props), l = this.props.filter ? this.props.filter : this.state.text;
438
- let o = -1, p;
439
- const n = this.base.vs, i = this.value;
439
+ const { virtual: n = { skip: 0 }, textField: r } = this.props, l = I(this.props), o = this.props.filter ? this.props.filter : this.state.text;
440
+ let p = -1, a;
441
+ const i = this.base.vs, d = this.value;
440
442
  this._suggested = "";
441
- const d = this.hasDuplicates && this.duplicates.indexOf(i) !== -1;
442
- if (o = this.getFocusedIndex(d), o !== -1 && !k(i))
443
- this.handleItemSelect(o, s);
444
- else if (l === "")
443
+ const h = this.hasDuplicates && this.duplicates.indexOf(d) !== -1;
444
+ if (p = this.getFocusedIndex(h), p !== -1 && (!D(d) || o && o !== k(d, r)))
445
+ this.handleItemSelect(p, s);
446
+ else if (o === "")
445
447
  this.handleItemSelect(0, s);
446
448
  else {
447
- const h = a.skip + o;
448
- p = this.base.navigation.navigate({
449
+ const m = n.skip + p;
450
+ a = this.base.navigation.navigate({
449
451
  keyCode: t,
450
- current: h,
451
- max: (n.enabled ? n.total : r.length) - 1,
452
+ current: m,
453
+ max: (i.enabled ? i.total : l.length) - 1,
452
454
  min: 0,
453
455
  skipItems: e || void 0
454
- }), p !== void 0 && this.handleItemSelect(p, s);
456
+ }), a !== void 0 && this.handleItemSelect(a, s);
455
457
  }
456
- this.navigationIndex = p;
458
+ this.navigationIndex = a;
457
459
  }
458
460
  getCurrentValueDisabledStatus(s, t, e) {
459
461
  return s && t && t[e] && t[e].disabled;
460
462
  }
461
463
  applyValueOnEnter(s, t) {
462
- const { textField: e, allowCustom: a, ignoreCase: r } = this.props, l = I(this.props), o = this.props.opened !== void 0 ? this.props.opened : this.state.opened, n = D(this.value, e) === s ? this.index : L(l, s, e, !1, r), i = n !== -1;
464
+ const { textField: e, allowCustom: n, ignoreCase: r } = this.props, l = I(this.props), o = this.props.opened !== void 0 ? this.props.opened : this.state.opened, a = k(this.value, e) === s ? this.index : L(l, s, e, !1, r), i = a !== -1;
463
465
  let d;
464
466
  if (this._suggested = "", i)
465
- d = l[n];
466
- else if (a)
467
+ d = l[a];
468
+ else if (n)
467
469
  d = e !== void 0 ? { [e]: s } : s;
468
470
  else
469
471
  return this.selectFocusedItem(s, t);
470
472
  this.triggerOnChange(d, t), o && this.base.togglePopup(t), this.props.filter === void 0 && this.state.text !== void 0 && (t.data.text = void 0), this.applyState(t);
471
473
  }
472
474
  applyValueOnRejectSuggestions(s, t) {
473
- const { textField: e, allowCustom: a, ignoreCase: r } = this.props, l = I(this.props), o = this.props.opened !== void 0 ? this.props.opened : this.state.opened, p = D(this.value, e);
474
- if (this._suggested = "", s === p || s === "" && !k(p))
475
+ const { textField: e, allowCustom: n, ignoreCase: r } = this.props, l = I(this.props), o = this.props.opened !== void 0 ? this.props.opened : this.state.opened, p = k(this.value, e);
476
+ if (this._suggested = "", s === p || s === "" && !D(p))
475
477
  return this.closeOpenedApplyStateNonMobileMode(t, o), this.applyState(t);
476
- const n = L(l, s, e, !0, r), i = n !== -1;
478
+ const a = L(l, s, e, !0, r), i = a !== -1;
477
479
  let d = null;
478
- i ? d = l[n] : a && (d = s ? e ? { [e]: s } : s : null), this.triggerOnChange(d, t), this.state.text !== void 0 && (t.data.text = void 0, this.base.filterChanged("", t)), this.closeOpenedApplyStateNonMobileMode(t, o), this.applyState(t);
480
+ i ? d = l[a] : n && (d = s ? e ? { [e]: s } : s : null), this.triggerOnChange(d, t), this.state.text !== void 0 && (t.data.text = void 0, this.base.filterChanged("", t)), this.closeOpenedApplyStateNonMobileMode(t, o), this.applyState(t);
479
481
  }
480
482
  selectFocusedItem(s, t) {
481
- const e = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { textField: a, virtual: r = { skip: 0 }, focusedItemIndex: l = N } = this.props, o = I(this.props), p = r.skip, n = s === "" && p === 0 ? 0 : l(o, s, a);
482
- return n !== -1 ? this.handleItemSelect(n + p, t) : (this.triggerOnChange(null, t), this.state.text !== void 0 && (t.data.text = void 0)), e && this.base.togglePopup(t), this.applyState(t);
483
+ const e = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { textField: n, virtual: r = { skip: 0 }, focusedItemIndex: l = N } = this.props, o = I(this.props), p = r.skip, a = s === "" && p === 0 ? 0 : l(o, s, n);
484
+ return a !== -1 ? this.handleItemSelect(a + p, t) : (this.triggerOnChange(null, t), this.state.text !== void 0 && (t.data.text = void 0)), e && this.base.togglePopup(t), this.applyState(t);
483
485
  }
484
486
  renderAdaptiveListContainer() {
485
- const { windowWidth: s = 0 } = this.state, { groupField: t, adaptiveTitle: e = this.props.label, adaptiveSubtitle: a } = this.props, r = I(this.props), l = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
487
+ const { windowWidth: s = 0 } = this.state, { groupField: t, adaptiveTitle: e = this.props.label, adaptiveSubtitle: n } = this.props, r = I(this.props), l = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
486
488
  let { group: o } = this.state;
487
- o === void 0 && t !== void 0 && (o = D(r[0], t));
489
+ o === void 0 && t !== void 0 && (o = k(r[0], t));
488
490
  const p = {
489
491
  title: e || this.props.label,
490
- subTitle: a,
492
+ subTitle: n,
491
493
  expand: l,
492
- onClose: (n) => this.toggleBtnClick(n),
494
+ onClose: (a) => this.toggleBtnClick(a),
493
495
  windowWidth: s,
494
496
  mobileFilter: this.renderMobileListFilter()
495
497
  };
496
498
  return /* @__PURE__ */ c.createElement(kt, { ...p }, /* @__PURE__ */ c.createElement(Ft, null, /* @__PURE__ */ c.createElement("div", { className: "k-list-container" }, this.listContainerContent())));
497
499
  }
498
500
  renderListContainer() {
499
- const s = this.base, { dir: t, header: e, footer: a, groupField: r, size: l, list: o, virtual: p, groupStickyHeaderItemRender: n, unstyled: i } = this.props, d = I(this.props), h = this.props.opened !== void 0 ? this.props.opened : this.state.opened, f = s.getPopupSettings(), b = f.width !== void 0 ? f.width : s.popupWidth, y = i && i.uComboBox;
501
+ const s = this.base, { dir: t, header: e, footer: n, groupField: r, size: l, list: o, virtual: p, groupStickyHeaderItemRender: a, unstyled: i } = this.props, d = I(this.props), h = this.props.opened !== void 0 ? this.props.opened : this.state.opened, m = s.getPopupSettings(), b = m.width !== void 0 ? m.width : s.popupWidth, y = i && i.uComboBox;
500
502
  let { group: v } = this.state;
501
- return v === void 0 && r !== void 0 && (v = D(d[0], r)), /* @__PURE__ */ c.createElement(
503
+ return v === void 0 && r !== void 0 && (v = k(d[0], r)), /* @__PURE__ */ c.createElement(
502
504
  bt,
503
505
  {
504
506
  width: b,
505
507
  popupSettings: {
506
- ...f,
507
- anchor: f.anchor || this.element,
508
+ ...m,
509
+ anchor: m.anchor || this.element,
508
510
  show: h,
509
511
  popupClass: S(
510
- f.popupClass,
512
+ m.popupClass,
511
513
  F.listContainer({
512
514
  c: y,
513
515
  popup: !0
@@ -531,9 +533,9 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
531
533
  )
532
534
  },
533
535
  e && /* @__PURE__ */ c.createElement("div", { className: S(F.listHeader({ c: y })) }, e),
534
- !o && v && d.length !== 0 && /* @__PURE__ */ c.createElement(q, { group: v, render: n }),
536
+ !o && v && d.length !== 0 && /* @__PURE__ */ c.createElement(q, { group: v, render: a }),
535
537
  this.renderList(),
536
- a && /* @__PURE__ */ c.createElement(
538
+ n && /* @__PURE__ */ c.createElement(
537
539
  "div",
538
540
  {
539
541
  className: S(
@@ -541,7 +543,7 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
541
543
  this.props.footerClassName
542
544
  )
543
545
  },
544
- a
546
+ n
545
547
  )
546
548
  ),
547
549
  this.showLicenseWatermark && /* @__PURE__ */ c.createElement(pt, { message: this.licenseMessage })
@@ -550,15 +552,15 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
550
552
  renderList() {
551
553
  const s = this.base, t = $(this), {
552
554
  textField: e,
553
- dataItemKey: a,
555
+ dataItemKey: n,
554
556
  listNoDataRender: r,
555
557
  itemRender: l,
556
558
  groupHeaderItemRender: o,
557
559
  virtual: p = { skip: 0, total: void 0 },
558
- unstyled: n
559
- } = this.props, i = I(this.props), d = s.getPopupSettings(), h = s.vs, f = p.skip, b = this.props.opened !== void 0 ? this.props.opened : this.state.opened, y = `translateY(${h.translate}px)`, v = b ? this.getFocusedIndex(this.hasDuplicates) : void 0, g = this.props.filter !== void 0 ? this.props.filter : this.state.text, u = D(this.value, e), C = k(g) && g !== u ? null : this.value, M = this.props.list || xt, T = n && n.uComboBox;
560
+ unstyled: a
561
+ } = this.props, i = I(this.props), d = s.getPopupSettings(), h = s.vs, m = p.skip, b = this.props.opened !== void 0 ? this.props.opened : this.state.opened, y = `translateY(${h.translate}px)`, v = b ? this.getFocusedIndex(this.hasDuplicates) : void 0, g = this.props.filter !== void 0 ? this.props.filter : this.state.text, u = k(this.value, e), C = D(g) && g !== u ? null : this.value, T = this.props.list || xt, O = a && a.uComboBox;
560
562
  return /* @__PURE__ */ c.createElement(
561
- M,
563
+ T,
562
564
  {
563
565
  id: s.listBoxId,
564
566
  virtual: !!p,
@@ -567,30 +569,30 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
567
569
  focusedIndex: v,
568
570
  value: C,
569
571
  textField: e,
570
- valueField: a,
572
+ valueField: n,
571
573
  groupField: this.props.groupField,
572
574
  isMultiColumn: this.props.isMultiColumn,
573
575
  optionsGuid: s.guid,
574
576
  hasDuplicates: this.hasDuplicates,
575
577
  ariaLabel: t.toLanguageString(j, R[j]),
576
- listRef: (O) => {
577
- h.list = this.base.list = O, this.itemHeight = 0;
578
+ listRef: (M) => {
579
+ h.list = this.base.list = M, this.itemHeight = 0;
578
580
  },
579
581
  wrapperStyle: this.mobileMode ? {} : { maxHeight: d.height },
580
582
  wrapperCssClass: S(
581
583
  F.listContent({
582
- c: T,
584
+ c: O,
583
585
  virtual: p
584
586
  })
585
587
  ),
586
588
  listStyle: h.enabled ? { transform: y } : void 0,
587
589
  key: "listkey",
588
- skip: f,
590
+ skip: m,
589
591
  onClick: this.handleItemClick,
590
592
  itemRender: l,
591
593
  groupHeaderItemRender: o,
592
594
  noDataRender: r,
593
- onMouseDown: (O) => O.preventDefault(),
595
+ onMouseDown: (M) => M.preventDefault(),
594
596
  onScroll: this.onScroll,
595
597
  wrapperRef: h.scrollerRef,
596
598
  scroller: this.base.renderScrollElement(),
@@ -600,16 +602,16 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
600
602
  }
601
603
  renderSearchBar(s, t, e) {
602
604
  const {
603
- tabIndex: a,
605
+ tabIndex: n,
604
606
  accessKey: r,
605
607
  disabled: l,
606
608
  title: o,
607
609
  ariaLabelledBy: p,
608
- ariaDescribedBy: n,
610
+ ariaDescribedBy: a,
609
611
  dataItemKey: i,
610
612
  virtual: d = { skip: 0 },
611
613
  unstyled: h,
612
- inputAttributes: f
614
+ inputAttributes: m
613
615
  } = this.props;
614
616
  I(this.props);
615
617
  const b = this.props.opened !== void 0 ? this.props.opened : this.state.opened, y = b ? this.getFocusedIndex(this.hasDuplicates) : -1;
@@ -619,7 +621,7 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
619
621
  id: t,
620
622
  readOnly: b && this.mobileMode,
621
623
  placeholder: e,
622
- tabIndex: a,
624
+ tabIndex: n,
623
625
  accessKey: r,
624
626
  title: o,
625
627
  value: s + this._suggested,
@@ -639,12 +641,12 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
639
641
  role: "combobox",
640
642
  ariaLabelledBy: p,
641
643
  ariaLabel: this.props.ariaLabel,
642
- ariaDescribedBy: n,
644
+ ariaDescribedBy: a,
643
645
  ariaRequired: this.required,
644
646
  render: this.props.valueRender,
645
647
  ariaControls: b ? this.base.listBoxId : void 0,
646
648
  unstyled: h,
647
- inputAttributes: f
649
+ inputAttributes: m
648
650
  }
649
651
  );
650
652
  }
@@ -656,17 +658,17 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
656
658
  }
657
659
  triggerOnChange(s, t) {
658
660
  const e = this.value;
659
- !this.hasDuplicates && (!k(e) && !k(s) || w(e, s, this.props.dataItemKey)) || (this.props.value === void 0 && (t.data.value = s), this._valueDuringOnChange = s, t.events.push({ type: "onChange" }));
661
+ !this.hasDuplicates && (!D(e) && !D(s) || w(e, s, this.props.dataItemKey)) || (this.props.value === void 0 && (t.data.value = s), this._valueDuringOnChange = s, t.events.push({ type: "onChange" }));
660
662
  }
661
663
  getFocusedIndex(s) {
662
664
  const t = this.value, {
663
665
  textField: e,
664
- dataItemKey: a,
666
+ dataItemKey: n,
665
667
  virtual: r = { skip: 0 },
666
668
  focusedItemIndex: l = N,
667
669
  skipDisabledItems: o
668
- } = this.props, p = I(this.props), n = this.props.filter ? this.props.filter : this.state.text;
669
- return s && this.navigationIndex !== void 0 ? this.navigationIndex : k(t) && n === void 0 ? p.findIndex((i) => w(i, t, a)) : n ? l(p, n, e) : o && e && !n && r.skip === 0 ? p.findIndex((i) => !i.disabled) : r.skip === 0 ? 0 : -1;
670
+ } = this.props, p = I(this.props), a = this.props.filter ? this.props.filter : this.state.text;
671
+ return s && this.navigationIndex !== void 0 ? this.navigationIndex : D(t) && a === void 0 ? p.findIndex((i) => w(i, t, n)) : a ? l(p, a, e) : o && e && !a && r.skip === 0 ? p.findIndex((i) => !i.disabled) : r.skip === 0 ? 0 : -1;
670
672
  }
671
673
  suggestValue(s) {
672
674
  const { data: t, textField: e } = this.props;
@@ -682,30 +684,30 @@ const Dt = "Please enter a valid value!", E = class E extends c.Component {
682
684
  };
683
685
  E.displayName = "ComboBox", E.propTypes = {
684
686
  ...P.propTypes,
685
- size: m.oneOf(["small", "medium", "large"]),
686
- rounded: m.oneOf(["small", "medium", "large", "full", "none"]),
687
- fillMode: m.oneOf(["solid", "flat", "outline"]),
688
- dataItemKey: m.string,
689
- groupField: m.string,
690
- isMultiColumn: m.bool,
691
- suggest: m.bool,
692
- placeholder: m.string,
693
- title: m.string,
694
- allowCustom: m.bool,
695
- ignoreCase: m.bool,
696
- clearButton: m.bool,
697
- iconClassName: m.string,
687
+ size: f.oneOf(["small", "medium", "large"]),
688
+ rounded: f.oneOf(["small", "medium", "large", "full", "none"]),
689
+ fillMode: f.oneOf(["solid", "flat", "outline"]),
690
+ dataItemKey: f.string,
691
+ groupField: f.string,
692
+ isMultiColumn: f.bool,
693
+ suggest: f.bool,
694
+ placeholder: f.string,
695
+ title: f.string,
696
+ allowCustom: f.bool,
697
+ ignoreCase: f.bool,
698
+ clearButton: f.bool,
699
+ iconClassName: f.string,
698
700
  svgIcon: nt,
699
- validationMessage: m.string,
700
- required: m.bool,
701
- id: m.string,
702
- ariaLabelledBy: m.string,
703
- ariaLabel: m.string,
704
- ariaDescribedBy: m.string,
705
- list: m.any,
706
- valueRender: m.func,
707
- skipDisabledItems: m.bool,
708
- inputAttributes: m.object
701
+ validationMessage: f.string,
702
+ required: f.bool,
703
+ id: f.string,
704
+ ariaLabelledBy: f.string,
705
+ ariaLabel: f.string,
706
+ ariaDescribedBy: f.string,
707
+ list: f.any,
708
+ valueRender: f.func,
709
+ skipDisabledItems: f.bool,
710
+ inputAttributes: f.object
709
711
  }, E.defaultProps = {
710
712
  ...P.defaultProps,
711
713
  size: void 0,