@progress/kendo-react-dropdowns 8.3.0-develop.8 → 8.3.0

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