@progress/kendo-react-dropdowns 14.4.1-develop.12 → 14.4.1-develop.14

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