@progress/kendo-react-dropdowns 7.4.0-develop.1 → 7.4.0-develop.11

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,33 +6,39 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as u from "react";
9
+ import * as h from "react";
10
10
  import f from "prop-types";
11
- import B from "../common/DropDownBase.mjs";
12
- import { Keys as x, validatePackage as ie, svgIconPropType as oe, canUseDOM as z, classNames as E, IconWrap as ae, createPropsContext as ne, withIdHOC as le, withPropsContext as re, kendoThemeMaps as de } from "@progress/kendo-react-common";
13
- import { FloatingLabel as pe } from "@progress/kendo-react-labels";
14
- import { areSame as C, getItemValue as S, isPresent as k, getItemIndexByText as A, suggestValue as he, itemIndexStartsWith as K } from "../common/utils.mjs";
15
- import ue from "../common/SearchBar.mjs";
16
- import ce from "../common/ListContainer.mjs";
11
+ import V from "../common/DropDownBase.mjs";
12
+ import { Keys as x, validatePackage as se, svgIconPropType as ie, canUseDOM as L, classNames as E, IconWrap as oe, createPropsContext as ae, withIdHOC as ne, withPropsContext as le, kendoThemeMaps as re } from "@progress/kendo-react-common";
13
+ import { FloatingLabel as de } from "@progress/kendo-react-labels";
14
+ import { getPlainDataDuplicates as pe, areSame as S, getItemValue as C, isPresent as k, getItemIndexByText as R, suggestValue as he, itemIndexStartsWith as A } from "../common/utils.mjs";
15
+ import ce from "../common/SearchBar.mjs";
16
+ import ue from "../common/ListContainer.mjs";
17
17
  import ge from "../common/List.mjs";
18
18
  import me from "../common/ListFilter.mjs";
19
- import H from "../common/GroupStickyHeader.mjs";
19
+ import K from "../common/GroupStickyHeader.mjs";
20
20
  import { packageMetadata as ve } from "../package-metadata.mjs";
21
21
  import fe from "../common/ClearButton.mjs";
22
- import { Button as q } from "@progress/kendo-react-buttons";
22
+ import { Button as z } from "@progress/kendo-react-buttons";
23
23
  import { caretAltDownIcon as be, xIcon as xe } from "@progress/kendo-svg-icons";
24
- import { comboArrowBtnAriaLabelExpand as W, messages as $, comboArrowBtnAriaLabelCollapse as G } from "../messages/index.mjs";
25
- import { provideLocalizationService as U } from "@progress/kendo-react-intl";
24
+ import { comboArrowBtnAriaLabelExpand as H, messages as q, comboArrowBtnAriaLabelCollapse as $ } from "../messages/index.mjs";
25
+ import { provideLocalizationService as G } from "@progress/kendo-react-intl";
26
26
  import { ActionSheet as Ie, ActionSheetHeader as ye, ActionSheetContent as ke } from "@progress/kendo-react-layout";
27
- import { MOBILE_MEDIUM_DEVISE as D, MOBILE_SMALL_DEVISE as j } from "../common/constants.mjs";
28
- import Y from "../common/withCustomComponent.mjs";
29
- const Ce = "Please enter a valid value!", { sizeMap: V, roundedMap: Se } = de, w = class w extends u.Component {
27
+ import { MOBILE_MEDIUM_DEVISE as W, MOBILE_SMALL_DEVISE as U } from "../common/constants.mjs";
28
+ import j from "../common/withCustomComponent.mjs";
29
+ const Se = "Please enter a valid value!", { sizeMap: F, roundedMap: Ce } = re, D = class D extends h.Component {
30
30
  constructor(s) {
31
- super(s), this.state = {}, this.base = new B(this), this._element = null, this._suggested = "", this._skipBlur = !1, this._input = null, this._adaptiveFilterInput = null, this.itemHeight = 0, this.focus = () => {
31
+ super(s), this.state = {}, this.base = new V(this), this._element = null, this._suggested = "", this._skipBlur = !1, this._input = null, this._adaptiveFilterInput = null, this.itemHeight = 0, this.duplicates = [], this.hasDuplicates = !1, this.focus = () => {
32
32
  this._input && this._input.focus();
33
+ }, this.checkForDuplicatePlainTextRecords = () => {
34
+ const e = this.props.textField !== void 0, t = this.props.dataItemKey !== void 0;
35
+ if (this.props.data && this.props.data.length > 0 && !e && !t) {
36
+ const a = this.props.data;
37
+ this.duplicates = pe(a), this.hasDuplicates = this.duplicates.length > 0;
38
+ }
33
39
  }, this.handleItemSelect = (e, t) => {
34
- const { data: n = [], virtual: i, dataItemKey: l } = this.props, d = i ? i.skip : 0, a = n[e - d], r = !C(a, this.value, l);
35
- this.triggerOnChange(a, t), this.state.text !== void 0 && (t.data.text = void 0), r && this.base.triggerPageChangeCornerItems(a, t);
40
+ const { data: a = [], virtual: o, dataItemKey: n } = this.props, d = o ? o.skip : 0, l = a[e - d], r = this.hasDuplicates || !S(l, this.value, n);
41
+ this.triggerOnChange(l, t), this.state.text !== void 0 && (t.data.text = void 0), r && this.base.triggerPageChangeCornerItems(l, t);
36
42
  }, this.onPopupOpened = () => {
37
43
  setTimeout(() => {
38
44
  this.mobileMode && this._adaptiveFilterInput && (this._skipBlur = !0, this._adaptiveFilterInput.focus(), this._skipBlur = !1);
@@ -40,19 +46,21 @@ const Ce = "Please enter a valid value!", { sizeMap: V, roundedMap: Se } = de, w
40
46
  }, this.componentRef = (e) => {
41
47
  this._element = e, this.base.wrapper = e;
42
48
  }, this.toggleBtnClick = (e) => {
43
- const { data: t = [], skipDisabledItems: n, textField: i } = this.props, l = this.getFocusedIndex(), d = this.getCurrentValueDisabledStatus(i, t, l), a = this.props.opened !== void 0 ? this.props.opened : this.state.opened, r = this.base.initState();
44
- if (r.syntheticEvent = e, !n && i && d && this.clearValueOnToggleBtnClick(e), this.base.togglePopup(r), !a && this.mobileMode) {
45
- const o = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text || null;
46
- this.base.filterChanged(o, r);
49
+ const { data: t = [], skipDisabledItems: a, textField: o } = this.props, n = this.getFocusedIndex(), d = this.getCurrentValueDisabledStatus(o, t, n), l = this.props.opened !== void 0 ? this.props.opened : this.state.opened, r = this.base.initState();
50
+ if (r.syntheticEvent = e, !a && o && d && this.clearValueOnToggleBtnClick(e), this.base.togglePopup(r), !l && this.mobileMode) {
51
+ const i = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text || null;
52
+ this.base.filterChanged(i, r);
47
53
  }
48
54
  this.applyState(r);
55
+ }, this.closeOpenedApplyStateNonMobileMode = (e, t) => {
56
+ t && !this.mobileMode && this.base.togglePopup(e);
49
57
  }, this.renderMobileListFilter = () => {
50
- const e = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text, t = S(this.value, this.props.textField), n = k(e) ? e : t;
51
- return /* @__PURE__ */ u.createElement(
58
+ const e = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text, t = C(this.value, this.props.textField), a = k(e) ? e : t;
59
+ return /* @__PURE__ */ h.createElement(
52
60
  me,
53
61
  {
54
- value: n,
55
- ref: (i) => this._adaptiveFilterInput = i && i.element,
62
+ value: a,
63
+ ref: (o) => this._adaptiveFilterInput = o && o.element,
56
64
  onChange: this.handleMobileFilterChange,
57
65
  onKeyDown: this.onInputKeyDown,
58
66
  size: this.props.size,
@@ -64,97 +72,97 @@ const Ce = "Please enter a valid value!", { sizeMap: V, roundedMap: Se } = de, w
64
72
  const t = this.base.initState();
65
73
  t.syntheticEvent = e.syntheticEvent, t.data.text = e.target.value, this.base.filterChanged(e.target.value, t), this.applyState(t);
66
74
  }, this.onScroll = (e) => {
67
- const { vs: t, list: n } = this.base;
75
+ const { vs: t, list: a } = this.base;
68
76
  t.scrollHandler(e);
69
- const { groupField: i } = this.props;
70
- let { data: l = [] } = this.props;
71
- if (!i || !l.length)
77
+ const { groupField: o } = this.props;
78
+ let { data: n = [] } = this.props;
79
+ if (!o || !n.length)
72
80
  return;
73
- const d = this.itemHeight = this.itemHeight || (t.enabled ? t.itemHeight : n ? n.children[0].offsetHeight : 0), r = e.target.scrollTop - t.skip * d;
74
- this.props.groupMode === "modern" && (l = this.base.getGroupedDataModernMode(l, i));
75
- let o = l[0][i];
76
- for (let h = 1; h < l.length && !(d * h > r); h++)
77
- l[h] && l[h][i] && (o = l[h][i]);
78
- o !== this.state.group && (this.setState({
79
- group: o
80
- }), this.props.onGroupScroll && this.props.onGroupScroll.call(void 0, { group: o }));
81
+ const d = this.itemHeight = this.itemHeight || (t.enabled ? t.itemHeight : a ? a.children[0].offsetHeight : 0), r = e.target.scrollTop - t.skip * d;
82
+ this.props.groupMode === "modern" && (n = this.base.getGroupedDataModernMode(n, o));
83
+ let i = n[0][o];
84
+ for (let c = 1; c < n.length && !(d * c > r); c++)
85
+ n[c] && n[c][o] && (i = n[c][o]);
86
+ i !== this.state.group && (this.setState({
87
+ group: i
88
+ }), this.props.onGroupScroll && this.props.onGroupScroll.call(void 0, { group: i }));
81
89
  }, this.handleItemClick = (e, t) => {
82
- this.base.handleItemClick(e, t), this._valueDuringOnChange = void 0;
90
+ this.navigationIndex = e, this.base.handleItemClick(e, t), this._valueDuringOnChange = void 0;
83
91
  }, this.handleBlur = (e) => {
84
92
  if (this.state.focused && !this._skipBlur) {
85
- const t = this.base.initState(), { textField: n, data: i = [] } = this.props, l = this.getFocusedIndex(), a = !(l === -1) && this.getCurrentValueDisabledStatus(n, i, l);
86
- t.data.focused = !1, t.events.push({ type: "onBlur" }), t.syntheticEvent = e, n && a && this.clearValueOnBlur(e), this.applyValueOnRejectSuggestions(e.currentTarget.value, t);
93
+ const t = this.base.initState(), { textField: a, data: o = [] } = this.props, n = this.getFocusedIndex(), l = !(n === -1) && this.getCurrentValueDisabledStatus(a, o, n);
94
+ t.data.focused = !1, t.events.push({ type: "onBlur" }), t.syntheticEvent = e, a && l && this.clearValueOnBlur(e), this.applyValueOnRejectSuggestions(e.currentTarget.value, t);
87
95
  }
88
96
  }, this.onInputClick = (e) => {
89
- const t = this.props.opened !== void 0 ? this.props.opened : this.state.opened, n = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text || null;
97
+ const t = this.props.opened !== void 0 ? this.props.opened : this.state.opened, a = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text || null;
90
98
  if (!t && this.mobileMode) {
91
- const i = this.base.initState();
92
- i.syntheticEvent = e, this.base.togglePopup(i), this.base.filterChanged(n, i), this.applyState(i);
99
+ const o = this.base.initState();
100
+ o.syntheticEvent = e, this.base.togglePopup(o), this.base.filterChanged(a, o), this.applyState(o);
93
101
  }
94
102
  }, this.onInputKeyDown = (e) => {
95
- const { data: t = [], skipDisabledItems: n, textField: i, dataItemKey: l, groupField: d } = this.props, a = this.value, r = Math.max(0, t.findIndex((c) => C(c, a, l))), o = e.keyCode, h = this.props.opened !== void 0 ? this.props.opened : this.state.opened, p = this.base.initState();
96
- if (p.syntheticEvent = e, !e.altKey && (o === x.up || o === x.down)) {
97
- if (e.preventDefault(), d !== "" && i)
98
- if (!this.props.skipDisabledItems && h)
99
- this.onNavigate(p, o);
103
+ const { data: t = [], skipDisabledItems: a, textField: o, dataItemKey: n, groupField: d } = this.props, l = this.value, r = Math.max(0, t.findIndex((u) => S(u, l, n))), i = e.keyCode, c = this.props.opened !== void 0 ? this.props.opened : this.state.opened, p = this.base.initState();
104
+ if (p.syntheticEvent = e, !e.altKey && (i === x.up || i === x.down)) {
105
+ if (e.preventDefault(), d !== "" && o)
106
+ if (!this.props.skipDisabledItems && c)
107
+ this.onNavigate(p, i);
100
108
  else {
101
- let c = 0;
102
- if (o === x.down || o === x.right) {
103
- const m = t.slice(r + 1 < t.length ? r + 1 : r).find((b) => !b.disabled && b[i]);
104
- c = m && t.findIndex((b) => b[i] === m[i]);
105
- } else if (o === x.up || o === x.left) {
109
+ let u = 0;
110
+ if (i === x.down || i === x.right) {
111
+ const m = t.slice(r + 1 < t.length ? r + 1 : r).find((b) => !b.disabled && b[o]);
112
+ u = m && t.findIndex((b) => b[o] === m[o]);
113
+ } else if (i === x.up || i === x.left) {
106
114
  let m;
107
115
  if (r === 0)
108
- m = t, c = t.findIndex((b) => !b.disabled && b[i]);
116
+ m = t, u = t.findIndex((b) => !b.disabled && b[o]);
109
117
  else {
110
118
  m = t.slice(0, r);
111
119
  let b = m.pop();
112
120
  for (; b && b.disabled; )
113
121
  b = m.pop();
114
- c = b && t.findIndex((F) => F[i] === b[i]);
122
+ u = b && t.findIndex((w) => w[o] === b[o]);
115
123
  }
116
124
  }
117
- if (c !== void 0) {
118
- const m = c - r;
119
- this.onNavigate(p, o, m);
125
+ if (u !== void 0) {
126
+ const m = u - r;
127
+ this.onNavigate(p, i, m);
120
128
  } else
121
- c === void 0 && t.findIndex((m) => m[i] === a[i]) === t.length - 1 && this.onNavigate(p, o);
129
+ u === void 0 && t.findIndex((m) => m[o] === l[o]) === t.length - 1 && this.onNavigate(p, i);
122
130
  }
123
- else if (!this.props.skipDisabledItems && h)
124
- this.onNavigate(p, o);
131
+ else if (!this.props.skipDisabledItems && c)
132
+ this.onNavigate(p, i);
125
133
  else {
126
- let c = null;
127
- if (o === x.down || o === x.right)
128
- c = t.slice(r + 1).find((m) => !m.disabled);
129
- else if (o === x.up || o === x.left) {
134
+ let u = null;
135
+ if (i === x.down || i === x.right)
136
+ u = t.slice(r + 1).find((m) => !m.disabled);
137
+ else if (i === x.up || i === x.left) {
130
138
  const m = t.slice(0, r);
131
- for (c = m.pop(); c && c.disabled; )
132
- c = m.pop();
139
+ for (u = m.pop(); u && u.disabled; )
140
+ u = m.pop();
133
141
  }
134
- if (c) {
135
- const m = c.id - r - 1;
136
- this.onNavigate(p, o, m);
142
+ if (u) {
143
+ const m = u.id - r - 1;
144
+ this.onNavigate(p, i, m);
137
145
  } else
138
- this.onNavigate(p, o);
146
+ this.onNavigate(p, i);
139
147
  }
140
148
  this.applyState(p);
141
149
  }
142
150
  const g = () => {
143
151
  e.preventDefault(), this.base.togglePopup(p), this.applyState(p);
144
- }, I = this.getFocusedIndex(), v = I === -1, y = !v && this.getCurrentValueDisabledStatus(i, t, I);
145
- h ? o === x.pageUp ? this.base.scrollPopupByPageSize(-1) : o === x.pageDown ? this.base.scrollPopupByPageSize(1) : e.altKey && o === x.up ? g() : o === x.enter ? (e.preventDefault(), (i && !v && e.currentTarget.value ? t[I][i] : void 0) ? !n && i && y ? this.clearValueOnEnterOrEsc(e) : y || this.applyValueOnEnter(e.currentTarget.value, p) : this.applyValueOnEnter(e.currentTarget.value, p)) : o === x.esc && (!n && i && y && this.clearValueOnEnterOrEsc(e), this.applyValueOnRejectSuggestions(e.currentTarget.value, p)) : !h && o === x.esc ? this.clearValueOnEnterOrEsc(e) : e.altKey && o === x.down && g();
152
+ }, I = this.getFocusedIndex(), v = I === -1, y = !v && this.getCurrentValueDisabledStatus(o, t, I);
153
+ c ? i === x.pageUp ? this.base.scrollPopupByPageSize(-1) : i === x.pageDown ? this.base.scrollPopupByPageSize(1) : e.altKey && i === x.up ? g() : i === x.enter ? (e.preventDefault(), (o && !v && e.currentTarget.value ? t[I][o] : void 0) ? !a && o && y ? this.clearValueOnEnterOrEsc(e) : y || this.applyValueOnEnter(e.currentTarget.value, p) : this.applyValueOnEnter(e.currentTarget.value, p)) : i === x.esc && (!a && o && y && this.clearValueOnEnterOrEsc(e), this.applyValueOnRejectSuggestions(e.currentTarget.value, p)) : !c && i === x.esc ? this.clearValueOnEnterOrEsc(e) : e.altKey && i === x.down && g();
146
154
  }, this.inputOnChange = (e) => {
147
155
  const t = this.base.initState();
148
156
  t.syntheticEvent = e;
149
- const n = this.props.opened !== void 0 ? this.props.opened : this.state.opened, i = e.currentTarget, l = i.value;
157
+ const a = this.props.opened !== void 0 ? this.props.opened : this.state.opened, o = e.currentTarget, n = o.value;
150
158
  if (this.props.suggest) {
151
- const d = i.selectionEnd === l.length;
152
- let a = this.props.filter !== void 0 ? this.props.filter : this.state.text;
153
- k(a) || (a = S(this.value, this.props.textField) || "");
154
- const r = a && a === l, o = a && a.length > l.length;
155
- r || o || !d ? this._suggested = "" : this.suggestValue(l);
159
+ const d = o.selectionEnd === n.length;
160
+ let l = this.props.filter !== void 0 ? this.props.filter : this.state.text;
161
+ k(l) || (l = C(this.value, this.props.textField) || "");
162
+ const r = l && l === n, i = l && l.length > n.length;
163
+ r || i || !d ? this._suggested = "" : this.suggestValue(n);
156
164
  }
157
- this.props.filter === void 0 && (t.data.text = l), this.state.focusedItem !== void 0 && (t.data.focusedItem = void 0), n || this.base.togglePopup(t), this.base.filterChanged(l, t), this.applyState(t), this.setState({ group: void 0 });
165
+ this.props.filter === void 0 && (t.data.text = n), this.state.focusedItem !== void 0 && (t.data.focusedItem = void 0), a || this.base.togglePopup(t), this.base.filterChanged(n, t), this.applyState(t), this.setState({ group: void 0 });
158
166
  }, this.clearButtonClick = (e) => {
159
167
  const t = this.base.initState();
160
168
  t.syntheticEvent = e, e.stopPropagation(), this.clearValue();
@@ -169,15 +177,15 @@ const Ce = "Please enter a valid value!", { sizeMap: V, roundedMap: Se } = de, w
169
177
  t.syntheticEvent = e, e.stopPropagation(), this.clearValue();
170
178
  }, this.setValidity = () => {
171
179
  this._input && this._input.setCustomValidity && this._input.setCustomValidity(
172
- this.validity.valid ? "" : this.props.validationMessage || Ce
180
+ this.validity.valid ? "" : this.props.validationMessage || Se
173
181
  );
174
- }, ie(ve);
182
+ }, se(ve);
175
183
  }
176
184
  get _inputId() {
177
185
  return this.props.id;
178
186
  }
179
187
  get document() {
180
- if (z)
188
+ if (L)
181
189
  return this.element && this.element.ownerDocument || document;
182
190
  }
183
191
  /** @hidden */
@@ -188,7 +196,7 @@ const Ce = "Please enter a valid value!", { sizeMap: V, roundedMap: Se } = de, w
188
196
  * The mobile mode of the ComboBox.
189
197
  */
190
198
  get mobileMode() {
191
- return !!(this.state.windowWidth && this.state.windowWidth <= D && this.props.adaptive);
199
+ return !!(this.state.windowWidth && this.state.windowWidth <= W && this.props.adaptive);
192
200
  }
193
201
  /**
194
202
  * The value of the ComboBox.
@@ -208,7 +216,7 @@ const Ce = "Please enter a valid value!", { sizeMap: V, roundedMap: Se } = de, w
208
216
  */
209
217
  get index() {
210
218
  const { data: s = [], dataItemKey: e } = this.props, t = this.value;
211
- return s.findIndex((n) => C(n, t, e));
219
+ return s.findIndex((a) => S(a, t, e));
212
220
  }
213
221
  /**
214
222
  * Gets the `name` property of the ComboBox.
@@ -228,31 +236,33 @@ const Ce = "Please enter a valid value!", { sizeMap: V, roundedMap: Se } = de, w
228
236
  };
229
237
  }
230
238
  get validityStyles() {
231
- return this.props.validityStyles !== void 0 ? this.props.validityStyles : w.defaultProps.validityStyles;
239
+ return this.props.validityStyles !== void 0 ? this.props.validityStyles : D.defaultProps.validityStyles;
232
240
  }
233
241
  /** @hidden */
234
242
  get required() {
235
- return this.props.required !== void 0 ? this.props.required : w.defaultProps.required;
243
+ return this.props.required !== void 0 ? this.props.required : D.defaultProps.required;
236
244
  }
237
245
  /** @hidden */
238
246
  componentDidUpdate(s, e) {
239
247
  var g;
240
- const { dataItemKey: t, virtual: n, groupField: i = "", data: l = [], textField: d } = this.props, a = s.virtual ? s.virtual.total : 0, r = this.props.opened !== void 0 ? this.props.opened : this.state.opened, o = s.opened !== void 0 ? s.opened : e.opened, h = !o && r, p = this.value;
241
- if (this._valueOnDidUpdate = p, n && n.total !== a)
248
+ const { dataItemKey: t, virtual: a, groupField: o = "", data: n = [], textField: d } = this.props, l = s.virtual ? s.virtual.total : 0, r = this.props.opened !== void 0 ? this.props.opened : this.state.opened, i = s.opened !== void 0 ? s.opened : e.opened;
249
+ s.data !== n && this.checkForDuplicatePlainTextRecords();
250
+ const c = !i && r, p = this.value;
251
+ if (this._valueOnDidUpdate = p, a && a.total !== l)
242
252
  this.base.vs.calcScrollElementHeight(), this.base.vs.reset();
243
253
  else {
244
254
  const I = s.value !== void 0 ? s.value : e.value;
245
- let v = l.findIndex((c) => C(c, p, t));
246
- this.props.groupMode === "modern" && d && p && (v = (g = this.base.getGroupedDataModernMode(l, i)) == null ? void 0 : g.map((c) => c[d]).indexOf(p[d]));
247
- const y = !C(I, p, t);
248
- h && n ? this.base.scrollToVirtualItem(n, v) : h && !n ? (this.onPopupOpened(), l && l.length !== 0 && this.base.resetGroupStickyHeader(l[0][i], this), this.base.scrollToItem(v)) : r && o && p && y && this.base.scrollToItem(v);
255
+ let v = this.hasDuplicates ? this.navigationIndex || 0 : n.findIndex((u) => S(u, p, t));
256
+ this.props.groupMode === "modern" && d && p && (v = (g = this.base.getGroupedDataModernMode(n, o)) == null ? void 0 : g.map((u) => u[d]).indexOf(p[d]));
257
+ const y = !S(I, p, t);
258
+ c && a ? this.base.scrollToVirtualItem(a, v) : c && !a ? (this.onPopupOpened(), n && n.length !== 0 && this.base.resetGroupStickyHeader(n[0][o], this), this.base.scrollToItem(v)) : (this.hasDuplicates || r && i && p && y) && this.base.scrollToItem(v);
249
259
  }
250
- h && this._input && this._input.focus(), this.setValidity();
260
+ c && this._input && this._input.focus(), this.setValidity();
251
261
  }
252
262
  /** @hidden */
253
263
  componentDidMount() {
254
264
  var s;
255
- this.observerResize = z && 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);
265
+ this.observerResize = L && 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), this.checkForDuplicatePlainTextRecords();
256
266
  }
257
267
  /** @hidden */
258
268
  componentWillUnmount() {
@@ -261,60 +271,60 @@ const Ce = "Please enter a valid value!", { sizeMap: V, roundedMap: Se } = de, w
261
271
  }
262
272
  /** @hidden */
263
273
  render() {
264
- const s = U(this).toLanguageString(W, $[W]), e = U(this).toLanguageString(
265
- G,
266
- $[G]
274
+ const s = G(this).toLanguageString(H, q[H]), e = G(this).toLanguageString(
275
+ $,
276
+ q[$]
267
277
  ), {
268
278
  dir: t,
269
- disabled: n,
270
- clearButton: i = w.defaultProps.clearButton,
271
- label: l,
279
+ disabled: a,
280
+ clearButton: o = D.defaultProps.clearButton,
281
+ label: n,
272
282
  textField: d,
273
- adaptive: a,
283
+ adaptive: l,
274
284
  className: r,
275
- style: o,
276
- loading: h,
285
+ style: i,
286
+ loading: c,
277
287
  iconClassName: p,
278
288
  virtual: g,
279
289
  size: I,
280
290
  rounded: v,
281
291
  fillMode: y,
282
- opened: c = this.state.opened,
292
+ opened: u = this.state.opened,
283
293
  placeholder: m,
284
294
  svgIcon: b
285
- } = this.props, { windowWidth: F = 0 } = this.state, _ = !this.validityStyles || this.validity.valid, P = this.props.filter !== void 0 ? this.props.filter : this.state.text, J = S(this.value, d), O = k(P) ? P : J, Q = i && (!!O || k(this.value)), M = this.base.vs, N = this.props.id || this._inputId, L = F <= D && a;
295
+ } = this.props, w = !this.validityStyles || this.validity.valid, T = this.props.filter !== void 0 ? this.props.filter : this.state.text, Y = C(this.value, d), O = k(T) ? T : Y, J = o && (!!O || k(this.value)), M = this.base.vs, _ = this.props.id || this._inputId, N = this.mobileMode;
286
296
  M.enabled = g !== void 0, g !== void 0 && (M.skip = g.skip, M.total = g.total, M.pageSize = g.pageSize);
287
- const [X, Z] = Y(this.props.prefix || u.Fragment), [ee, te] = Y(this.props.suffix || u.Fragment), R = /* @__PURE__ */ u.createElement(u.Fragment, null, /* @__PURE__ */ u.createElement(
297
+ const [Q, X] = j(this.props.prefix || h.Fragment), [Z, ee] = j(this.props.suffix || h.Fragment), P = /* @__PURE__ */ h.createElement(h.Fragment, null, /* @__PURE__ */ h.createElement(
288
298
  "span",
289
299
  {
290
300
  className: E(
291
301
  "k-combobox k-input",
292
302
  {
293
- [`k-input-${V[I] || I}`]: I,
294
- [`k-rounded-${Se[v] || v}`]: v,
303
+ [`k-input-${F[I] || I}`]: I,
304
+ [`k-rounded-${Ce[v] || v}`]: v,
295
305
  [`k-input-${y}`]: y,
296
- "k-invalid": !_,
297
- "k-loading": h,
306
+ "k-invalid": !w,
307
+ "k-loading": c,
298
308
  "k-required": this.required,
299
- "k-disabled": n
309
+ "k-disabled": a
300
310
  },
301
311
  r
302
312
  ),
303
313
  ref: this.componentRef,
304
- style: l ? { ...o, width: void 0 } : o,
314
+ style: n ? { ...i, width: void 0 } : i,
305
315
  dir: t
306
316
  },
307
- this.props.prefix && /* @__PURE__ */ u.createElement(X, { ...Z }),
308
- this.renderSearchBar(O || "", N, m),
309
- Q && !h && /* @__PURE__ */ u.createElement(fe, { onClick: this.clearButtonClick, key: "clearbutton" }),
310
- h && /* @__PURE__ */ u.createElement(ae, { className: "k-input-loading-icon", name: "loading", key: "loading" }),
311
- this.props.suffix && /* @__PURE__ */ u.createElement(ee, { ...te }),
312
- /* @__PURE__ */ u.createElement(
313
- q,
317
+ this.props.prefix && /* @__PURE__ */ h.createElement(Q, { ...X }),
318
+ this.renderSearchBar(O || "", _, m),
319
+ J && !c && /* @__PURE__ */ h.createElement(fe, { onClick: this.clearButtonClick, key: "clearbutton" }),
320
+ c && /* @__PURE__ */ h.createElement(oe, { className: "k-input-loading-icon", name: "loading", key: "loading" }),
321
+ this.props.suffix && /* @__PURE__ */ h.createElement(Z, { ...ee }),
322
+ /* @__PURE__ */ h.createElement(
323
+ z,
314
324
  {
315
325
  tabIndex: -1,
316
326
  type: "button",
317
- "aria-label": c ? e : s,
327
+ "aria-label": u ? e : s,
318
328
  icon: p ? void 0 : "caret-alt-down",
319
329
  svgIcon: b || be,
320
330
  iconClass: p,
@@ -324,83 +334,88 @@ const Ce = "Please enter a valid value!", { sizeMap: V, roundedMap: Se } = de, w
324
334
  themeColor: "base",
325
335
  className: "k-input-button",
326
336
  onClick: this.toggleBtnClick,
327
- onMouseDown: (se) => se.preventDefault()
337
+ onMouseDown: (te) => te.preventDefault()
328
338
  }
329
339
  ),
330
- !L && this.renderListContainer()
331
- ), L && this.renderAdaptiveListContainer());
332
- return l ? /* @__PURE__ */ u.createElement(
333
- pe,
340
+ !N && this.renderListContainer()
341
+ ), N && this.renderAdaptiveListContainer());
342
+ return n ? /* @__PURE__ */ h.createElement(
343
+ de,
334
344
  {
335
- label: l,
336
- editorId: N,
345
+ label: n,
346
+ editorId: _,
337
347
  editorValue: O,
338
- editorValid: _,
339
- editorDisabled: n,
340
- style: { width: o ? o.width : void 0 },
341
- children: R
348
+ editorValid: w,
349
+ editorDisabled: a,
350
+ style: { width: i ? i.width : void 0 },
351
+ children: P
342
352
  }
343
- ) : R;
353
+ ) : P;
344
354
  }
345
355
  /** @hidden */
346
356
  onNavigate(s, e, t) {
347
- const { data: n = [], virtual: i = { skip: 0 } } = this.props, l = this.props.filter ? this.props.filter : this.state.text, d = this.getFocusedIndex(), a = this.base.vs, r = this.value;
348
- if (this._suggested = "", d !== -1 && !k(r))
357
+ const { data: a = [], virtual: o = { skip: 0 } } = this.props, n = this.props.filter ? this.props.filter : this.state.text;
358
+ let d = -1, l;
359
+ const r = this.base.vs, i = this.value;
360
+ this._suggested = "";
361
+ const c = this.hasDuplicates && this.duplicates.indexOf(i) !== -1;
362
+ if (d = this.getFocusedIndex(c), d !== -1 && !k(i))
349
363
  this.handleItemSelect(d, s);
350
- else if (l === "")
364
+ else if (n === "")
351
365
  this.handleItemSelect(0, s);
352
366
  else {
353
- const o = i.skip + d, h = this.base.navigation.navigate({
367
+ const p = o.skip + d;
368
+ l = this.base.navigation.navigate({
354
369
  keyCode: e,
355
- current: o,
356
- max: (a.enabled ? a.total : n.length) - 1,
370
+ current: p,
371
+ max: (r.enabled ? r.total : a.length) - 1,
357
372
  min: 0,
358
373
  skipItems: t || void 0
359
- });
360
- h !== void 0 && this.handleItemSelect(h, s);
374
+ }), l !== void 0 && this.handleItemSelect(l, s);
361
375
  }
376
+ this.navigationIndex = l;
362
377
  }
363
378
  getCurrentValueDisabledStatus(s, e, t) {
364
379
  return s && e && e[t] && e[t].disabled;
365
380
  }
366
381
  applyValueOnEnter(s, e) {
367
- const { data: t = [], textField: n, allowCustom: i } = this.props, l = this.props.opened !== void 0 ? this.props.opened : this.state.opened, a = S(this.value, n) === s ? this.index : A(t, s, n), r = a !== -1;
368
- let o;
382
+ const { data: t = [], textField: a, allowCustom: o } = this.props, n = this.props.opened !== void 0 ? this.props.opened : this.state.opened, l = C(this.value, a) === s ? this.index : R(t, s, a), r = l !== -1;
383
+ let i;
369
384
  if (this._suggested = "", r)
370
- o = t[a];
371
- else if (i)
372
- o = n !== void 0 ? { [n]: s } : s;
385
+ i = t[l];
386
+ else if (o)
387
+ i = a !== void 0 ? { [a]: s } : s;
373
388
  else
374
389
  return this.selectFocusedItem(s, e);
375
- this.triggerOnChange(o, e), l && this.base.togglePopup(e), this.props.filter === void 0 && this.state.text !== void 0 && (e.data.text = void 0), this.applyState(e);
390
+ this.triggerOnChange(i, e), n && this.base.togglePopup(e), this.props.filter === void 0 && this.state.text !== void 0 && (e.data.text = void 0), this.applyState(e);
376
391
  }
377
392
  applyValueOnRejectSuggestions(s, e) {
378
- const { data: t = [], textField: n, allowCustom: i } = this.props, l = this.props.opened !== void 0 ? this.props.opened : this.state.opened, d = S(this.value, n), a = this.state.windowWidth && this.state.windowWidth <= D;
393
+ const { data: t = [], textField: a, allowCustom: o } = this.props, n = this.props.opened !== void 0 ? this.props.opened : this.state.opened, d = C(this.value, a);
379
394
  if (this._suggested = "", s === d || s === "" && !k(d))
380
- return l && !a && this.base.togglePopup(e), this.applyState(e);
381
- const r = A(t, s, n, !0), o = r !== -1;
382
- let h = null;
383
- o ? h = t[r] : i && (h = s ? n ? { [n]: s } : s : null), this.triggerOnChange(h, e), this.state.text !== void 0 && (e.data.text = void 0, this.base.filterChanged("", e)), l && !a && this.base.togglePopup(e), this.applyState(e);
395
+ return this.closeOpenedApplyStateNonMobileMode(e, n), this.applyState(e);
396
+ const l = R(t, s, a, !0), r = l !== -1;
397
+ let i = null;
398
+ r ? i = t[l] : o && (i = s ? a ? { [a]: s } : s : null), this.triggerOnChange(i, e), this.state.text !== void 0 && (e.data.text = void 0, this.base.filterChanged("", e)), this.closeOpenedApplyStateNonMobileMode(e, n), this.applyState(e);
384
399
  }
385
400
  selectFocusedItem(s, e) {
386
- const t = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { data: n = [], textField: i, virtual: l = { skip: 0 }, focusedItemIndex: d = K } = this.props, a = l.skip, r = s === "" && a === 0 ? 0 : d(n, s, i);
387
- return r !== -1 ? this.handleItemSelect(r + a, e) : (this.triggerOnChange(null, e), this.state.text !== void 0 && (e.data.text = void 0)), t && this.base.togglePopup(e), this.applyState(e);
401
+ const t = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { data: a = [], textField: o, virtual: n = { skip: 0 }, focusedItemIndex: d = A } = this.props, l = n.skip, r = s === "" && l === 0 ? 0 : d(a, s, o);
402
+ return r !== -1 ? this.handleItemSelect(r + l, e) : (this.triggerOnChange(null, e), this.state.text !== void 0 && (e.data.text = void 0)), t && this.base.togglePopup(e), this.applyState(e);
388
403
  }
389
404
  renderAdaptiveListContainer() {
390
- const { windowWidth: s = 0 } = this.state, { header: e, footer: t, size: n, data: i = [], groupField: l, groupMode: d, list: a, virtual: r, adaptiveTitle: o, groupStickyHeaderItemRender: h } = this.props, p = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
405
+ const { windowWidth: s = 0 } = this.state, { header: e, footer: t, size: a, data: o = [], groupField: n, groupMode: d, list: l, virtual: r, adaptiveTitle: i, groupStickyHeaderItemRender: c } = this.props, p = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
391
406
  let { group: g } = this.state;
392
- g === void 0 && l !== void 0 && (g = S(i[0], l));
407
+ g === void 0 && n !== void 0 && (g = C(o[0], n));
393
408
  const I = {
394
409
  navigatable: !1,
395
410
  navigatableElements: [],
396
411
  expand: p,
397
412
  animation: !0,
398
413
  onClose: (v) => this.toggleBtnClick(v),
399
- animationStyles: s <= j ? { top: 0, width: "100%", height: "100%" } : void 0,
400
- className: s <= j ? "k-adaptive-actionsheet k-actionsheet-fullscreen" : "k-adaptive-actionsheet k-actionsheet-bottom"
414
+ animationStyles: s <= U ? { top: 0, width: "100%", height: "100%" } : void 0,
415
+ className: s <= U ? "k-adaptive-actionsheet k-actionsheet-fullscreen" : "k-adaptive-actionsheet k-actionsheet-bottom"
401
416
  };
402
- return /* @__PURE__ */ u.createElement(Ie, { ...I }, /* @__PURE__ */ u.createElement(ye, { className: "k-text-center" }, /* @__PURE__ */ u.createElement("div", { className: "k-actionsheet-titlebar-group k-hbox" }, /* @__PURE__ */ u.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ u.createElement("div", null, o)), /* @__PURE__ */ u.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ u.createElement(
403
- q,
417
+ return /* @__PURE__ */ h.createElement(Ie, { ...I }, /* @__PURE__ */ h.createElement(ye, { className: "k-text-center" }, /* @__PURE__ */ h.createElement("div", { className: "k-actionsheet-titlebar-group k-hbox" }, /* @__PURE__ */ h.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ h.createElement("div", null, i)), /* @__PURE__ */ h.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ h.createElement(
418
+ z,
404
419
  {
405
420
  tabIndex: 0,
406
421
  "aria-label": "Cancel",
@@ -411,21 +426,21 @@ const Ce = "Please enter a valid value!", { sizeMap: V, roundedMap: Se } = de, w
411
426
  icon: "x",
412
427
  svgIcon: xe
413
428
  }
414
- ))), /* @__PURE__ */ u.createElement("div", { className: "k-actionsheet-titlebar-group k-actionsheet-filter" }, this.renderMobileListFilter())), /* @__PURE__ */ u.createElement(ke, { className: "!k-overflow-hidden" }, /* @__PURE__ */ u.createElement("div", { className: "k-list-container" }, /* @__PURE__ */ u.createElement("div", { className: E(
429
+ ))), /* @__PURE__ */ h.createElement("div", { className: "k-actionsheet-titlebar-group k-actionsheet-filter" }, this.renderMobileListFilter())), /* @__PURE__ */ h.createElement(ke, { className: "!k-overflow-hidden" }, /* @__PURE__ */ h.createElement("div", { className: "k-list-container" }, /* @__PURE__ */ h.createElement("div", { className: E(
415
430
  {
416
- "k-list": !a,
431
+ "k-list": !l,
417
432
  "k-list-lg": !0,
418
433
  "k-virtual-list": r,
419
- "k-data-table": a,
420
- [`k-table-${V[n] || n}`]: a && n
434
+ "k-data-table": l,
435
+ [`k-table-${F[a] || a}`]: l && a
421
436
  }
422
- ) }, e && /* @__PURE__ */ u.createElement("div", { className: "k-table-header" }, e), !a && g && i.length !== 0 && /* @__PURE__ */ u.createElement(H, { group: g, groupMode: d, render: h }), this.renderList(), t && /* @__PURE__ */ u.createElement("div", { className: "k-list-footer" }, t)))));
437
+ ) }, e && /* @__PURE__ */ h.createElement("div", { className: "k-table-header" }, e), !l && g && o.length !== 0 && /* @__PURE__ */ h.createElement(K, { group: g, groupMode: d, render: c }), this.renderList(), t && /* @__PURE__ */ h.createElement("div", { className: "k-list-footer" }, t)))));
423
438
  }
424
439
  renderListContainer() {
425
- const s = this.base, { dir: e, header: t, footer: n, data: i = [], groupField: l, groupMode: d, size: a, list: r, virtual: o, groupStickyHeaderItemRender: h } = this.props, p = this.props.opened !== void 0 ? this.props.opened : this.state.opened, g = s.getPopupSettings(), I = g.width !== void 0 ? g.width : s.popupWidth;
440
+ const s = this.base, { dir: e, header: t, footer: a, data: o = [], groupField: n, groupMode: d, size: l, list: r, virtual: i, groupStickyHeaderItemRender: c } = this.props, p = this.props.opened !== void 0 ? this.props.opened : this.state.opened, g = s.getPopupSettings(), I = g.width !== void 0 ? g.width : s.popupWidth;
426
441
  let { group: v } = this.state;
427
- return v === void 0 && l !== void 0 && (v = S(i[0], l)), /* @__PURE__ */ u.createElement(
428
- ce,
442
+ return v === void 0 && n !== void 0 && (v = C(o[0], n)), /* @__PURE__ */ h.createElement(
443
+ ue,
429
444
  {
430
445
  width: I,
431
446
  popupSettings: {
@@ -439,89 +454,90 @@ const Ce = "Please enter a valid value!", { sizeMap: V, roundedMap: Se } = de, w
439
454
  )
440
455
  },
441
456
  dir: e !== void 0 ? e : this.base.dirCalculated,
442
- itemsCount: [i.length]
457
+ itemsCount: [o.length]
443
458
  },
444
- /* @__PURE__ */ u.createElement("div", { className: E(
459
+ /* @__PURE__ */ h.createElement("div", { className: E(
445
460
  {
446
461
  "k-list": !r,
447
- [`k-list-${V[a] || a}`]: !r && a,
448
- "k-virtual-list": o,
462
+ [`k-list-${F[l] || l}`]: !r && l,
463
+ "k-virtual-list": i,
449
464
  "k-data-table": r,
450
- [`k-table-${V[a] || a}`]: r && a
465
+ [`k-table-${F[l] || l}`]: r && l
451
466
  }
452
- ) }, t && /* @__PURE__ */ u.createElement("div", { className: "k-table-header" }, t), !r && v && i.length !== 0 && /* @__PURE__ */ u.createElement(H, { group: v, groupMode: d, render: h }), this.renderList(), n && /* @__PURE__ */ u.createElement("div", { className: E(
467
+ ) }, t && /* @__PURE__ */ h.createElement("div", { className: "k-table-header" }, t), !r && v && o.length !== 0 && /* @__PURE__ */ h.createElement(K, { group: v, groupMode: d, render: c }), this.renderList(), a && /* @__PURE__ */ h.createElement("div", { className: E(
453
468
  {
454
469
  "k-list-footer": !this.props.footerClassName
455
470
  },
456
471
  this.props.footerClassName
457
- ) }, n))
472
+ ) }, a))
458
473
  );
459
474
  }
460
475
  renderList() {
461
476
  const s = this.base, {
462
477
  textField: e,
463
478
  dataItemKey: t,
464
- listNoDataRender: n,
465
- itemRender: i,
466
- groupHeaderItemRender: l,
479
+ listNoDataRender: a,
480
+ itemRender: o,
481
+ groupHeaderItemRender: n,
467
482
  data: d = [],
468
- virtual: a = { skip: 0, total: void 0 }
469
- } = this.props, r = s.getPopupSettings(), o = s.vs, h = a.skip, p = this.props.opened !== void 0 ? this.props.opened : this.state.opened, g = `translateY(${o.translate}px)`, I = p ? this.getFocusedIndex() : void 0, v = this.props.filter !== void 0 ? this.props.filter : this.state.text, y = S(this.value, e), c = k(v) && v !== y ? null : this.value, m = this.props.list || ge;
470
- return /* @__PURE__ */ u.createElement(
483
+ virtual: l = { skip: 0, total: void 0 }
484
+ } = this.props, r = s.getPopupSettings(), i = s.vs, c = l.skip, p = this.props.opened !== void 0 ? this.props.opened : this.state.opened, g = `translateY(${i.translate}px)`, I = p ? this.getFocusedIndex(this.hasDuplicates) : void 0, v = this.props.filter !== void 0 ? this.props.filter : this.state.text, y = C(this.value, e), u = k(v) && v !== y ? null : this.value, m = this.props.list || ge;
485
+ return /* @__PURE__ */ h.createElement(
471
486
  m,
472
487
  {
473
488
  id: s.listBoxId,
474
- virtual: !!a,
489
+ virtual: !!l,
475
490
  show: p,
476
491
  data: d,
477
492
  focusedIndex: I,
478
- value: c,
493
+ value: u,
479
494
  textField: e,
480
495
  valueField: t,
481
496
  groupField: this.props.groupField,
482
497
  groupMode: this.props.groupMode,
483
498
  isMultiColumn: this.props.isMultiColumn,
484
499
  optionsGuid: s.guid,
500
+ hasDuplicates: this.hasDuplicates,
485
501
  listRef: (b) => {
486
- o.list = this.base.list = b, this.itemHeight = 0;
502
+ i.list = this.base.list = b, this.itemHeight = 0;
487
503
  },
488
- wrapperStyle: this.state.windowWidth && this.state.windowWidth > D ? { maxHeight: r.height } : {},
504
+ wrapperStyle: this.state.windowWidth && this.state.windowWidth > W ? { maxHeight: r.height } : {},
489
505
  wrapperCssClass: E(
490
506
  "k-list-content",
491
507
  {
492
- "k-list-scroller": !a
508
+ "k-list-scroller": !l
493
509
  }
494
510
  ),
495
- listStyle: o.enabled ? { transform: g } : void 0,
511
+ listStyle: i.enabled ? { transform: g } : void 0,
496
512
  key: "listkey",
497
- skip: h,
513
+ skip: c,
498
514
  onClick: this.handleItemClick,
499
- itemRender: i,
500
- groupHeaderItemRender: l,
501
- noDataRender: n,
515
+ itemRender: o,
516
+ groupHeaderItemRender: n,
517
+ noDataRender: a,
502
518
  onMouseDown: (b) => b.preventDefault(),
503
519
  onScroll: this.onScroll,
504
- wrapperRef: o.scrollerRef,
520
+ wrapperRef: i.scrollerRef,
505
521
  scroller: this.base.renderScrollElement(),
506
- ariaSetSize: a.total
522
+ ariaSetSize: l.total
507
523
  }
508
524
  );
509
525
  }
510
526
  renderSearchBar(s, e, t) {
511
527
  const {
512
- tabIndex: n,
513
- disabled: i,
514
- data: l = [],
528
+ tabIndex: a,
529
+ disabled: o,
530
+ data: n = [],
515
531
  dataItemKey: d,
516
- virtual: a = { skip: 0 }
517
- } = this.props, r = this.props.opened !== void 0 ? this.props.opened : this.state.opened, o = this.value, h = Math.max(0, l.findIndex((p) => C(p, o, d)));
518
- return this._suggested && !C(this._valueOnDidUpdate, o, d) && (this._suggested = ""), /* @__PURE__ */ u.createElement(
519
- ue,
532
+ virtual: l = { skip: 0 }
533
+ } = this.props, r = this.props.opened !== void 0 ? this.props.opened : this.state.opened, i = this.value, c = Math.max(0, n.findIndex((p) => S(p, i, d)));
534
+ return this._suggested && !S(this._valueOnDidUpdate, i, d) && (this._suggested = ""), /* @__PURE__ */ h.createElement(
535
+ ce,
520
536
  {
521
537
  id: e,
522
538
  readOnly: r && this.mobileMode,
523
539
  placeholder: t,
524
- tabIndex: n,
540
+ tabIndex: a,
525
541
  title: this.props.title,
526
542
  accessKey: this.props.accessKey,
527
543
  value: s + this._suggested,
@@ -532,10 +548,10 @@ const Ce = "Please enter a valid value!", { sizeMap: V, roundedMap: Se } = de, w
532
548
  onChange: this.inputOnChange,
533
549
  onFocus: this.base.handleFocus,
534
550
  onBlur: this.handleBlur,
535
- disabled: i,
551
+ disabled: o,
536
552
  expanded: r,
537
553
  owns: this.base.listBoxId,
538
- activedescendant: `option-${this.base.guid}-${h + a.skip}`,
554
+ activedescendant: `option-${this.base.guid}-${c + l.skip}`,
539
555
  role: "combobox",
540
556
  ariaLabelledBy: this.props.ariaLabelledBy,
541
557
  ariaDescribedBy: this.props.ariaDescribedBy,
@@ -546,17 +562,17 @@ const Ce = "Please enter a valid value!", { sizeMap: V, roundedMap: Se } = de, w
546
562
  }
547
563
  clearValue() {
548
564
  const s = this.base.initState();
549
- this._suggested = "", this.base.filterChanged("", s), this.props.filter === void 0 && this.state.text !== void 0 && (s.data.text = void 0), this.triggerOnChange(null, s);
565
+ this._suggested = "", this.navigationIndex = void 0, this.base.filterChanged("", s), this.props.filter === void 0 && this.state.text !== void 0 && (s.data.text = void 0), this.triggerOnChange(null, s);
550
566
  const e = this.props.opened !== void 0 ? this.props.opened : this.state.opened, t = this.mobileMode;
551
567
  e && !t && this.base.togglePopup(s), this.applyState(s);
552
568
  }
553
569
  triggerOnChange(s, e) {
554
570
  const t = this.value;
555
- !k(t) && !k(s) || C(t, s, this.props.dataItemKey) || (this.props.value === void 0 && (e.data.value = s), this._valueDuringOnChange = s, e.events.push({ type: "onChange" }));
571
+ !this.hasDuplicates && (!k(t) && !k(s) || S(t, s, this.props.dataItemKey)) || (this.props.value === void 0 && (e.data.value = s), this._valueDuringOnChange = s, e.events.push({ type: "onChange" }));
556
572
  }
557
- getFocusedIndex() {
558
- const s = this.value, { data: e = [], textField: t, dataItemKey: n, virtual: i = { skip: 0 }, focusedItemIndex: l = K, skipDisabledItems: d } = this.props, a = this.props.filter ? this.props.filter : this.state.text;
559
- return k(s) && a === void 0 ? e.findIndex((r) => C(r, s, n)) : a ? l(e, a, t) : d && t && !a && i.skip === 0 ? e.findIndex((r) => !r.disabled && r[t]) : i.skip === 0 ? 0 : -1;
573
+ getFocusedIndex(s) {
574
+ const e = this.value, { data: t = [], textField: a, dataItemKey: o, virtual: n = { skip: 0 }, focusedItemIndex: d = A, skipDisabledItems: l } = this.props, r = this.props.filter ? this.props.filter : this.state.text;
575
+ return s && this.navigationIndex !== void 0 ? this.navigationIndex : k(e) && r === void 0 ? t.findIndex((i) => S(i, e, o)) : r ? d(t, r, a) : l && a && !r && n.skip === 0 ? t.findIndex((i) => !i.disabled && i[a]) : n.skip === 0 ? 0 : -1;
560
576
  }
561
577
  suggestValue(s) {
562
578
  const { data: e, textField: t } = this.props;
@@ -570,8 +586,8 @@ const Ce = "Please enter a valid value!", { sizeMap: V, roundedMap: Se } = de, w
570
586
  this.setState({ windowWidth: e.target.clientWidth });
571
587
  }
572
588
  };
573
- w.displayName = "ComboBox", w.propTypes = {
574
- ...B.propTypes,
589
+ D.displayName = "ComboBox", D.propTypes = {
590
+ ...V.propTypes,
575
591
  size: f.oneOf([null, "small", "medium", "large"]),
576
592
  rounded: f.oneOf([null, "small", "medium", "large", "full"]),
577
593
  fillMode: f.oneOf([null, "solid", "flat", "outline"]),
@@ -585,7 +601,7 @@ w.displayName = "ComboBox", w.propTypes = {
585
601
  allowCustom: f.bool,
586
602
  clearButton: f.bool,
587
603
  iconClassName: f.string,
588
- svgIcon: oe,
604
+ svgIcon: ie,
589
605
  validationMessage: f.string,
590
606
  required: f.bool,
591
607
  id: f.string,
@@ -594,8 +610,8 @@ w.displayName = "ComboBox", w.propTypes = {
594
610
  list: f.any,
595
611
  valueRender: f.func,
596
612
  skipDisabledItems: f.bool
597
- }, w.defaultProps = {
598
- ...B.defaultProps,
613
+ }, D.defaultProps = {
614
+ ...V.defaultProps,
599
615
  size: "medium",
600
616
  rounded: "medium",
601
617
  fillMode: "solid",
@@ -608,11 +624,11 @@ w.displayName = "ComboBox", w.propTypes = {
608
624
  prefix: void 0,
609
625
  suffix: void 0
610
626
  };
611
- let T = w;
612
- const we = ne(), Ee = le(re(we, T));
627
+ let B = D;
628
+ const De = ae(), Ee = ne(le(De, B));
613
629
  Ee.displayName = "KendoReactComboBox";
614
630
  export {
615
631
  Ee as ComboBox,
616
- we as ComboBoxPropsContext,
617
- T as ComboBoxWithoutContext
632
+ De as ComboBoxPropsContext,
633
+ B as ComboBoxWithoutContext
618
634
  };