@progress/kendo-react-dropdowns 16.2.0-develop.1 → 16.2.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.
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import * as i from "react";
9
9
  import C from "prop-types";
10
- import { getLicenseMessage as Xt, usePropsContext as Zt, validatePackage as en, useUnstyled as tn, useId as nn, useWebMcpRegister as rn, useKendoPaste as on, canUseDOM as et, useAdaptiveModeContext as sn, classNames as E, uDropDownList as P, getTabIndex as an, IconWrap as ln, createPropsContext as dn, Keys as y, WatermarkOverlay as cn, sizeMap as un, svgIconPropType as pn } from "@progress/kendo-react-common";
10
+ import { getLicenseMessage as Xt, usePropsContext as Zt, validatePackage as en, useUnstyled as tn, useId as nn, useWebMcpRegister as rn, useKendoPaste as on, canUseDOM as et, useAdaptiveModeContext as sn, classNames as E, uDropDownList as F, getTabIndex as an, IconWrap as ln, createPropsContext as dn, Keys as y, WatermarkOverlay as cn, sizeMap as un, svgIconPropType as pn } from "@progress/kendo-react-common";
11
11
  import { FloatingLabel as fn } from "@progress/kendo-react-labels";
12
12
  import { chevronDownIcon as mn } from "@progress/kendo-svg-icons";
13
13
  import vn from "../common/ListContainer.mjs";
@@ -16,7 +16,7 @@ import tt from "../common/GroupStickyHeader.mjs";
16
16
  import hn from "../common/ListDefaultItem.mjs";
17
17
  import In from "../common/List.mjs";
18
18
  import lt from "../common/DropDownBase.mjs";
19
- import { getFilteredData as k, getItemIndexByText as yn, areSame as F, getItemValue as ee, isPresent as nt, itemIndexStartsWith as wn, sameCharsOnly as xn, shuffleData as Dn, matchText as rt } from "../common/utils.mjs";
19
+ import { getFilteredData as k, getItemIndexByText as yn, areSame as L, getItemValue as ee, isPresent as nt, itemIndexStartsWith as wn, sameCharsOnly as xn, shuffleData as Dn, matchText as rt } from "../common/utils.mjs";
20
20
  import { packageMetadata as ot } from "../package-metadata.mjs";
21
21
  import { Button as Sn } from "@progress/kendo-react-buttons";
22
22
  import { useLocalization as Cn } from "@progress/kendo-react-intl";
@@ -32,7 +32,7 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
32
32
  ignoreCase: G = z.ignoreCase,
33
33
  size: H = z.size,
34
34
  rounded: Ke = z.rounded,
35
- fillMode: ce = z.fillMode
35
+ fillMode: ue = z.fillMode
36
36
  } = t;
37
37
  if (t.filterable || t.virtual) {
38
38
  const e = [];
@@ -41,7 +41,7 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
41
41
  features: e
42
42
  });
43
43
  }
44
- const K = tn(), ue = nn(t.id), pe = () => {
44
+ const K = tn(), pe = nn(t.id), fe = () => {
45
45
  var e;
46
46
  if (et)
47
47
  return ((e = T.current) == null ? void 0 : e.ownerDocument) || window.document;
@@ -50,22 +50,22 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
50
50
  (e = r == null ? void 0 : r.current) != null && e.wrapper && ((n = r == null ? void 0 : r.current) == null || n.wrapper.focus({ preventScroll: !0 }));
51
51
  }, b = () => {
52
52
  let e;
53
- return V.current !== void 0 && V.current !== null ? e = V.current : t.value !== void 0 ? e = t.value : m.value !== void 0 && m.value !== null ? e = m.value : t.defaultValue !== void 0 && t.defaultValue !== null && (e = t.defaultValue), !nt(e) && t.defaultItem !== void 0 && t.defaultItem !== null && (e = t.defaultItem), e;
53
+ return B.current !== void 0 && B.current !== null ? e = B.current : t.value !== void 0 ? e = t.value : m.value !== void 0 && m.value !== null ? e = m.value : t.defaultValue !== void 0 && t.defaultValue !== null && (e = t.defaultValue), !nt(e) && t.defaultItem !== void 0 && t.defaultItem !== null && (e = t.defaultItem), e;
54
54
  }, vt = () => {
55
55
  const { dataItemKey: e } = t, n = k(t), o = b();
56
- return n.findIndex((l) => F(l, o, e));
57
- }, fe = () => t.required !== void 0 ? t.required : z.required, me = () => {
58
- const e = t.validationMessage !== void 0, n = b(), o = !fe() || n !== null && n !== "" && n !== void 0, l = t.valid !== void 0 ? t.valid : o;
56
+ return n.findIndex((a) => L(a, o, e));
57
+ }, te = () => t.required !== void 0 ? t.required : z.required, me = () => {
58
+ const e = t.validationMessage !== void 0, n = b(), o = !te() || n !== null && n !== "" && n !== void 0, a = t.valid !== void 0 ? t.valid : o;
59
59
  return {
60
60
  customError: e,
61
- valid: l,
61
+ valid: a,
62
62
  valueMissing: n === null
63
63
  };
64
- }, gt = () => t.validityStyles !== void 0 ? t.validityStyles : z.validityStyles, te = (e) => {
65
- ne.current = !0, e.focus(), window.setTimeout(() => ne.current = !1, 30);
64
+ }, gt = () => t.validityStyles !== void 0 ? t.validityStyles : z.validityStyles, ne = (e) => {
65
+ re.current = !0, e.focus(), window.setTimeout(() => re.current = !1, 30);
66
66
  }, ve = () => {
67
- Y.current && te(Y.current), t.adaptive && setTimeout(() => {
68
- Y.current && te(Y.current);
67
+ Y.current && ne(Y.current), t.adaptive && setTimeout(() => {
68
+ Y.current && ne(Y.current);
69
69
  }, 300);
70
70
  }, ht = i.useCallback((e) => {
71
71
  for (const n of e)
@@ -75,54 +75,59 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
75
75
  (e = we.current) != null && e.setCustomValidity && we.current.setCustomValidity(
76
76
  me().valid ? "" : t.validationMessage || En
77
77
  );
78
- }, A = (e, n) => {
78
+ }, V = (e, n) => {
79
79
  const o = b();
80
- F(o, e, t.dataItemKey) || (t.value === void 0 && (n.data.value = e), r.current.updateComponentArgs({ value: e }), V.current = e, n.events.push({ type: "onChange" }));
80
+ L(o, e, t.dataItemKey) || (t.value === void 0 && (n.data.value = e), r.current.updateComponentArgs({ value: e }), B.current = e, n.events.push({ type: "onChange" }));
81
81
  }, M = (e) => {
82
82
  var n;
83
- (n = r == null ? void 0 : r.current) == null || n.applyState(e), V.current = void 0;
83
+ (n = r == null ? void 0 : r.current) == null || n.applyState(e), B.current = void 0;
84
84
  }, $ = (e, n) => {
85
85
  var u;
86
- const { virtual: o, dataItemKey: l, defaultItem: a } = t, c = k(t), f = o ? o.skip : 0, v = b(), d = e === -1 && a !== void 0 ? a : c[e - f], p = !F(d, v, l);
87
- A(d, n), p && ((u = r == null ? void 0 : r.current) == null || u.triggerPageChangeCornerItems(d, n));
88
- }, B = (e, n, o) => {
86
+ const { virtual: o, dataItemKey: a, defaultItem: l } = t, c = k(t), f = o ? o.skip : 0, v = b(), d = e === -1 && l !== void 0 ? l : c[e - f], p = !L(d, v, a);
87
+ V(d, n), p && ((u = r == null ? void 0 : r.current) == null || u.triggerPageChangeCornerItems(d, n));
88
+ }, A = (e, n, o) => {
89
89
  var S, h;
90
- const { defaultItem: l, dataItemKey: a, virtual: c = { skip: 0, total: 0, pageSize: 0 } } = t, f = b(), v = k(t), d = (S = r == null ? void 0 : r.current) == null ? void 0 : S.vs, p = v.findIndex((x) => F(x, f, a)), u = (h = r == null ? void 0 : r.current) == null ? void 0 : h.navigation.navigate({
90
+ const { defaultItem: a, dataItemKey: l, virtual: c = { skip: 0, total: 0, pageSize: 0 } } = t, f = b(), v = k(t), d = (S = r == null ? void 0 : r.current) == null ? void 0 : S.vs, p = v.findIndex((x) => L(x, f, l)), u = (h = r == null ? void 0 : r.current) == null ? void 0 : h.navigation.navigate({
91
91
  current: c.skip + p,
92
92
  max: (d != null && d.enabled ? c.total : v.length) - 1,
93
- min: l !== void 0 ? -1 : 0,
93
+ min: a !== void 0 ? -1 : 0,
94
94
  keyCode: n,
95
95
  skipItems: o || void 0
96
96
  });
97
97
  u !== void 0 && $(u, e), M(e);
98
98
  }, It = (e) => {
99
99
  T.current = e, r.current.wrapper = e;
100
- }, yt = (e) => /* @__PURE__ */ i.createElement(
101
- "select",
102
- {
103
- name: t.name,
104
- ref: (n) => {
105
- we.current = n;
100
+ }, yt = (e) => {
101
+ const n = t.defaultItem !== void 0 && L(e, t.defaultItem, t.dataItemKey);
102
+ let o = e;
103
+ return n ? o = "" : t.valueMap && (o = t.valueMap(e)), /* @__PURE__ */ i.createElement(
104
+ "select",
105
+ {
106
+ name: t.name,
107
+ required: te() && t.valid !== !0,
108
+ ref: (a) => {
109
+ we.current = a;
110
+ },
111
+ tabIndex: -1,
112
+ "aria-hidden": !0,
113
+ title: t.label,
114
+ style: { opacity: 0, width: 1, border: 0, zIndex: -1, position: "absolute", left: "50%" }
106
115
  },
107
- tabIndex: -1,
108
- "aria-hidden": !0,
109
- title: t.label,
110
- style: { opacity: 0, width: 1, border: 0, zIndex: -1, position: "absolute", left: "50%" }
111
- },
112
- /* @__PURE__ */ i.createElement("option", { value: t.valueMap ? t.valueMap.call(void 0, e) : e })
113
- ), ge = () => {
116
+ /* @__PURE__ */ i.createElement("option", { value: o })
117
+ );
118
+ }, ge = () => {
114
119
  const {
115
120
  textField: e,
116
121
  dataItemKey: n,
117
122
  virtual: o = { skip: 0 },
118
- focusedItemIndex: l = wn,
119
- filterable: a,
123
+ focusedItemIndex: a = wn,
124
+ filterable: l,
120
125
  skipDisabledItems: c = !0
121
126
  } = t, f = b(), v = k(t), d = t.filter ? t.filter : m.text;
122
- return c && e && !d && !f ? v.findIndex((p) => !p.disabled) : nt(f) && d === void 0 || a && d === "" ? v.findIndex((p) => F(p, f, n)) : d ? xe.current ? l(v, d, e) : v.findIndex((p) => F(p, f, n)) : o.skip === 0 ? 0 : -1;
127
+ return c && e && !d && !f ? v.findIndex((p) => !p.disabled) : nt(f) && d === void 0 || l && d === "" ? v.findIndex((p) => L(p, f, n)) : d ? xe.current ? a(v, d, e) : v.findIndex((p) => L(p, f, n)) : o.skip === 0 ? 0 : -1;
123
128
  }, Te = (e, n) => n !== void 0 && n !== -1 && e && e.length > 0 && e[n].disabled, he = () => {
124
129
  const e = k(t), n = r.current.initState(), o = ge();
125
- Te(e, o) && (A(null, n), M(n));
130
+ Te(e, o) && (V(null, n), M(n));
126
131
  }, Ie = (e) => {
127
132
  if (e.isPropagationStopped())
128
133
  return;
@@ -133,34 +138,30 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
133
138
  const {
134
139
  filterable: n,
135
140
  disabled: o,
136
- defaultItem: l,
137
- leftRightKeysNavigation: a = !0,
141
+ defaultItem: a,
142
+ leftRightKeysNavigation: l = !0,
138
143
  virtual: c = { skip: 0, total: 0, pageSize: 0 },
139
144
  dataItemKey: f,
140
145
  groupField: v = "",
141
146
  textField: d,
142
147
  skipDisabledItems: p = !0
143
- } = t, u = k(t), S = b(), h = u.findIndex((w) => F(w, S, f)), x = t.opened !== void 0 ? t.opened : m.opened, s = e.keyCode, N = s === y.home || s === y.end, L = s === y.up || s === y.down, _ = !x && (e.altKey && s === y.down || s === y.enter || s === y.space), Z = x && (e.altKey && s === y.up || s === y.esc), ae = a && (s === y.left || s === y.right), le = L || ae && !n || N, D = r.current.initState();
148
+ } = t, u = k(t), S = b(), h = u.findIndex((w) => L(w, S, f)), x = t.opened !== void 0 ? t.opened : m.opened, s = e.keyCode, N = s === y.home || s === y.end, P = s === y.up || s === y.down, _ = !x && (e.altKey && s === y.down || s === y.enter || s === y.space), Z = x && (e.altKey && s === y.up || s === y.esc), le = l && (s === y.left || s === y.right), de = P || le && !n || N, D = r.current.initState();
144
149
  if (D.syntheticEvent = e, !o) {
145
150
  if (N && r.current.vs.enabled)
146
- s === y.home ? c.skip !== 0 ? (r.current.triggerOnPageChange(D, 0, c.pageSize), W.current = !0) : A(u[0], D) : c.skip < c.total - c.pageSize ? (r.current.triggerOnPageChange(
147
- D,
148
- c.total - c.pageSize,
149
- c.pageSize
150
- ), W.current = !0) : A(u[u.length - 1], D);
151
+ s === y.home ? c.skip !== 0 ? (r.current.triggerOnPageChange(D, 0, c.pageSize), W.current = !0) : V(u[0], D) : c.skip < c.total - c.pageSize ? (r.current.triggerOnPageChange(D, c.total - c.pageSize, c.pageSize), W.current = !0) : V(u[u.length - 1], D);
151
152
  else if (x && s === y.pageUp)
152
153
  e.preventDefault(), r.current.scrollPopupByPageSize(-1);
153
154
  else if (x && s === y.pageDown)
154
155
  e.preventDefault(), r.current.scrollPopupByPageSize(1);
155
156
  else if (x && s === y.enter) {
156
157
  const w = ge();
157
- Te(u, w) ? (A(null, D), M(D)) : $(w, D), r.current.togglePopup(D), e.preventDefault();
158
+ Te(u, w) ? (V(null, D), M(D)) : $(w, D), r.current.togglePopup(D), e.preventDefault();
158
159
  } else if (_ || Z)
159
160
  Z && he(), r.current.togglePopup(D), e.preventDefault();
160
- else if (le) {
161
+ else if (de) {
161
162
  if (xe.current = !1, v !== "" && d)
162
163
  if (!p && x)
163
- B(D, s);
164
+ A(D, s);
164
165
  else {
165
166
  let w;
166
167
  if (s === y.down || s === y.right) {
@@ -168,7 +169,7 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
168
169
  w = g && u.indexOf(g);
169
170
  } else if (s === y.up || s === y.left) {
170
171
  let g;
171
- if (h === 0 && l)
172
+ if (h === 0 && a)
172
173
  w = -1;
173
174
  else if (h === -1)
174
175
  g = u, w = u.findIndex((I) => !I.disabled);
@@ -182,11 +183,11 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
182
183
  }
183
184
  if (w !== void 0) {
184
185
  const g = w - h;
185
- B(D, s, g);
186
- } else w === void 0 && h === u.length - 1 && B(D, s);
186
+ A(D, s, g);
187
+ } else w === void 0 && h === u.length - 1 && A(D, s);
187
188
  }
188
189
  else if (!p && x || N)
189
- B(D, s);
190
+ A(D, s);
190
191
  else if (d) {
191
192
  let w;
192
193
  if (s === y.down || s === y.right) {
@@ -194,7 +195,7 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
194
195
  w = g && u.indexOf(g);
195
196
  } else if (s === y.up || s === y.left) {
196
197
  let g;
197
- if (h === 0 && l)
198
+ if (h === 0 && a)
198
199
  w = -1;
199
200
  else if (h === -1)
200
201
  g = u, w = u.findIndex((I) => !I.disabled);
@@ -208,10 +209,10 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
208
209
  }
209
210
  if (w !== void 0) {
210
211
  const g = w - h;
211
- B(D, s, g);
212
- } else w === void 0 && h === u.length - 1 && B(D, s);
212
+ A(D, s, g);
213
+ } else w === void 0 && h === u.length - 1 && A(D, s);
213
214
  } else
214
- B(D, s);
215
+ A(D, s);
215
216
  e.preventDefault();
216
217
  }
217
218
  M(D);
@@ -232,7 +233,7 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
232
233
  onKeyDown: Oe,
233
234
  size: e ? "large" : H,
234
235
  rounded: Ke,
235
- fillMode: ce,
236
+ fillMode: ue,
236
237
  renderListFilterWrapper: !0,
237
238
  placeholder: be.toLanguageString(
238
239
  st,
@@ -242,33 +243,33 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
242
243
  );
243
244
  }, xt = (e) => {
244
245
  const n = r.current.initState();
245
- n.syntheticEvent = e, r.current.togglePopup(n), A(t.defaultItem, n), M(n);
246
+ n.syntheticEvent = e, r.current.togglePopup(n), V(t.defaultItem, n), M(n);
246
247
  }, Dt = () => {
247
- const { textField: e, defaultItem: n, dataItemKey: o } = t, l = b();
248
+ const { textField: e, defaultItem: n, dataItemKey: o } = t, a = b();
248
249
  return n !== void 0 && /* @__PURE__ */ i.createElement(
249
250
  hn,
250
251
  {
251
252
  defaultItem: n,
252
253
  textField: e,
253
- selected: F(l, n, o),
254
+ selected: L(a, n, o),
254
255
  key: "defaultitemkey",
255
256
  onClick: xt
256
257
  }
257
258
  );
258
259
  }, St = (e, n) => {
259
260
  var o;
260
- (o = r == null ? void 0 : r.current) == null || o.handleItemClick(e, n), V.current = void 0;
261
+ (o = r == null ? void 0 : r.current) == null || o.handleItemClick(e, n), B.current = void 0;
261
262
  }, Ct = (e) => {
262
263
  const { vs: n, list: o } = r.current;
263
264
  n.scrollHandler(e);
264
- const { groupField: l } = t;
265
- let a = k(t);
266
- if (!(!l || !a.length) && l) {
267
- const c = Be.current = Be.current || (n.enabled ? n.itemHeight : o ? o.children[0].offsetHeight : 0), v = e.target.scrollTop - n.skip * c;
268
- a = r.current.getGroupedDataModernMode(a, l);
269
- let d = a[0][l];
270
- for (let p = 1; p < a.length && !(c * p > v); p++)
271
- a[p] && a[p][l] && (d = a[p][l]);
265
+ const { groupField: a } = t;
266
+ let l = k(t);
267
+ if (!(!a || !l.length) && a) {
268
+ const c = Ae.current = Ae.current || (n.enabled ? n.itemHeight : o ? o.children[0].offsetHeight : 0), v = e.target.scrollTop - n.skip * c;
269
+ l = r.current.getGroupedDataModernMode(l, a);
270
+ let d = l[0][a];
271
+ for (let p = 1; p < l.length && !(c * p > v); p++)
272
+ l[p] && l[p][a] && (d = l[p][a]);
272
273
  d !== m.group && J({ group: d });
273
274
  }
274
275
  }, He = () => {
@@ -277,8 +278,8 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
277
278
  textField: e,
278
279
  dataItemKey: n,
279
280
  virtual: o = { skip: 0, total: void 0 },
280
- groupHeaderItemRender: l,
281
- listNoDataRender: a,
281
+ groupHeaderItemRender: a,
282
+ listNoDataRender: l,
282
283
  itemRender: c
283
284
  } = t, f = k(t), v = K && K.uDropDownList, d = r.current.vs, p = o.skip, u = t.opened !== void 0 ? t.opened : m.opened, S = r.current.getPopupSettings(), h = `translateY(${d.translate}px)`, x = b();
284
285
  return /* @__PURE__ */ i.createElement(
@@ -298,14 +299,14 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
298
299
  d.list = r.current.list = N;
299
300
  },
300
301
  wrapperStyle: { maxHeight: q ? void 0 : S.height },
301
- wrapperCssClass: E(P.listContent({ c: v })),
302
+ wrapperCssClass: E(F.listContent({ c: v })),
302
303
  listStyle: d.enabled ? { transform: h } : void 0,
303
304
  key: "listkey",
304
305
  skip: p,
305
306
  onClick: St,
306
307
  itemRender: c,
307
- groupHeaderItemRender: l,
308
- noDataRender: a,
308
+ groupHeaderItemRender: a,
309
+ noDataRender: l,
309
310
  onScroll: Ct,
310
311
  wrapperRef: d.scrollerRef,
311
312
  scroller: (s = r == null ? void 0 : r.current) == null ? void 0 : s.renderScrollElement(),
@@ -313,7 +314,7 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
313
314
  }
314
315
  );
315
316
  }, bt = () => {
316
- const { groupField: e } = t, n = k(t), o = t.opened !== void 0 ? t.opened : m.opened, l = K && K.uDropDownList, a = {
317
+ const { groupField: e } = t, n = k(t), o = t.opened !== void 0 ? t.opened : m.opened, a = K && K.uDropDownList, l = {
317
318
  title: t.adaptiveTitle || t.label,
318
319
  subTitle: t.adaptiveSubtitle,
319
320
  expand: o,
@@ -322,22 +323,22 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
322
323
  mobileFilter: ze(!0)
323
324
  };
324
325
  let { group: c } = m;
325
- return c === void 0 && e !== void 0 && (c = ee(n[0], e)), /* @__PURE__ */ i.createElement(kn, { ...a }, /* @__PURE__ */ i.createElement(bn, null, /* @__PURE__ */ i.createElement("div", { className: E(P.listContainer({ c: l, popup: !1 })) }, Pt())));
326
+ return c === void 0 && e !== void 0 && (c = ee(n[0], e)), /* @__PURE__ */ i.createElement(kn, { ...l }, /* @__PURE__ */ i.createElement(bn, null, /* @__PURE__ */ i.createElement("div", { className: E(F.listContainer({ c: a, popup: !1 })) }, Pt())));
326
327
  }, kt = () => {
327
328
  m.focused && window.setTimeout(() => {
328
- m.focused && r.current.wrapper && te(r.current.wrapper);
329
+ m.focused && r.current.wrapper && ne(r.current.wrapper);
329
330
  });
330
331
  }, Et = (e) => {
331
332
  "onMouseDownOutside" in (t.popupSettings || {}) && t.popupSettings.onMouseDownOutside.call(void 0, e);
332
333
  }, Lt = () => {
333
- const { header: e, footer: n, dir: o, groupField: l, groupStickyHeaderItemRender: a, list: c } = t, f = k(t), v = r.current, d = v.getPopupSettings(), p = t.opened !== void 0 ? t.opened : m.opened, u = d.width !== void 0 ? d.width : Ce != null ? Ce : v.popupWidth, S = K && K.uDropDownList, h = {
334
+ const { header: e, footer: n, dir: o, groupField: a, groupStickyHeaderItemRender: l, list: c } = t, f = k(t), v = r.current, d = v.getPopupSettings(), p = t.opened !== void 0 ? t.opened : m.opened, u = d.width !== void 0 ? d.width : Ce != null ? Ce : v.popupWidth, S = K && K.uDropDownList, h = {
334
335
  dir: o !== void 0 ? o : v.dirCalculated,
335
336
  width: u,
336
337
  popupSettings: {
337
338
  ...d,
338
339
  popupClass: E(
339
340
  d.popupClass,
340
- P.listContainer({
341
+ F.listContainer({
341
342
  c: S,
342
343
  popup: !0
343
344
  })
@@ -351,11 +352,11 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
351
352
  itemsCount: [f.length]
352
353
  };
353
354
  let { group: x } = m;
354
- return x === void 0 && l !== void 0 && (x = ee(f[0], l)), /* @__PURE__ */ i.createElement(vn, { ...h }, ze(!1), e && /* @__PURE__ */ i.createElement("div", { className: E(P.listHeader({ c: S })) }, e), /* @__PURE__ */ i.createElement(
355
+ return x === void 0 && a !== void 0 && (x = ee(f[0], a)), /* @__PURE__ */ i.createElement(vn, { ...h }, ze(!1), e && /* @__PURE__ */ i.createElement("div", { className: E(F.listHeader({ c: S })) }, e), /* @__PURE__ */ i.createElement(
355
356
  "div",
356
357
  {
357
358
  className: E(
358
- P.list({
359
+ F.list({
359
360
  c: S,
360
361
  size: H,
361
362
  virtual: r.current.vs.enabled
@@ -363,50 +364,50 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
363
364
  )
364
365
  },
365
366
  Dt(),
366
- !c && x && f.length !== 0 && /* @__PURE__ */ i.createElement(tt, { group: x, render: a }),
367
+ !c && x && f.length !== 0 && /* @__PURE__ */ i.createElement(tt, { group: x, render: l }),
367
368
  He()
368
- ), n && /* @__PURE__ */ i.createElement("div", { className: E(P.listFooter({ c: S })) }, n), Me && /* @__PURE__ */ i.createElement(cn, { message: ut }));
369
+ ), n && /* @__PURE__ */ i.createElement("div", { className: E(F.listFooter({ c: S })) }, n), Me && /* @__PURE__ */ i.createElement(cn, { message: ut }));
369
370
  }, Pt = () => {
370
- const { header: e, footer: n, groupStickyHeaderItemRender: o, groupField: l, list: a } = t, c = k(t), f = K && K.uDropDownList;
371
+ const { header: e, footer: n, groupStickyHeaderItemRender: o, groupField: a, list: l } = t, c = k(t), f = K && K.uDropDownList;
371
372
  let { group: v } = m;
372
- return v === void 0 && l !== void 0 && (v = ee(c[0], l)), /* @__PURE__ */ i.createElement(i.Fragment, null, e && /* @__PURE__ */ i.createElement("div", { className: E(P.listHeader({ c: f })) }, e), /* @__PURE__ */ i.createElement(
373
+ return v === void 0 && a !== void 0 && (v = ee(c[0], a)), /* @__PURE__ */ i.createElement(i.Fragment, null, e && /* @__PURE__ */ i.createElement("div", { className: E(F.listHeader({ c: f })) }, e), /* @__PURE__ */ i.createElement(
373
374
  "div",
374
375
  {
375
376
  className: E("k-list", {
376
377
  [`k-list-${q ? "lg" : un[H] || H}`]: q || H
377
378
  })
378
379
  },
379
- !a && v && c.length !== 0 && /* @__PURE__ */ i.createElement(tt, { group: v, render: o }),
380
+ !l && v && c.length !== 0 && /* @__PURE__ */ i.createElement(tt, { group: v, render: o }),
380
381
  He()
381
382
  ), n && /* @__PURE__ */ i.createElement("div", { className: "k-list-footer" }, n));
382
383
  }, Ft = (e) => {
383
- const { dataItemKey: n } = t, o = k(t), l = b();
384
- let a = o.map((L, _) => ({ item: L, itemIndex: _ }));
384
+ const { dataItemKey: n } = t, o = k(t), a = b();
385
+ let l = o.map((P, _) => ({ item: P, itemIndex: _ }));
385
386
  const c = U.current.word, f = U.current.last, v = xn(c, f);
386
- let d = a.length, p = Math.max(
387
+ let d = l.length, p = Math.max(
387
388
  0,
388
- o.findIndex((L) => F(L, l, n))
389
+ o.findIndex((P) => L(P, a, n))
389
390
  ), u;
390
- t.defaultItem && (u = { item: t.defaultItem, itemIndex: -1 }, d += 1, p += 1), p += v ? 1 : 0, a = Dn(a, p, u);
391
+ t.defaultItem && (u = { item: t.defaultItem, itemIndex: -1 }, d += 1, p += 1), p += v ? 1 : 0, l = Dn(l, p, u);
391
392
  let S, h, x, s = 0;
392
393
  const { textField: N } = t;
393
394
  for (; s < d; ) {
394
- if (S = ee(a[s].item, N), h = v && rt(S, f, G), x = rt(S, c, G), h || x) {
395
- s = a[s].itemIndex;
395
+ if (S = ee(l[s].item, N), h = v && rt(S, f, G), x = rt(S, c, G), h || x) {
396
+ s = l[s].itemIndex;
396
397
  break;
397
398
  }
398
399
  s++;
399
400
  }
400
401
  if (s !== d) {
401
- const L = r.current.initState();
402
- L.syntheticEvent = e, $(s, L), M(L), V.current = void 0;
402
+ const P = r.current.initState();
403
+ P.syntheticEvent = e, $(s, P), M(P), B.current = void 0;
403
404
  }
404
405
  }, Mt = (e) => {
405
- clearTimeout(Ae.current), t.filterable || (Ae.current = window.setTimeout(() => U.current.word = "", pt), Ft(e));
406
+ clearTimeout(Ve.current), t.filterable || (Ve.current = window.setTimeout(() => U.current.word = "", pt), Ft(e));
406
407
  }, Kt = (e) => {
407
- ne.current || r.current.handleFocus(e);
408
+ re.current || r.current.handleFocus(e);
408
409
  }, Nt = (e) => {
409
- if (ne.current || !m.focused)
410
+ if (re.current || !m.focused)
410
411
  return;
411
412
  const n = t.opened !== void 0 ? t.opened : m.opened, o = r.current.initState();
412
413
  o.syntheticEvent = e, o.data.focused = !1, o.events.push({ type: "onBlur" }), n && he(), n && !q && r.current.togglePopup(o), M(o);
@@ -454,7 +455,7 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
454
455
  ct,
455
456
  () => ye.current
456
457
  ), rn("dropdownlist", ye, t, t.webMcp);
457
- const Ae = i.useRef(null), U = i.useRef({ word: "", last: "" }), ne = i.useRef(!1), V = i.useRef(null), W = i.useRef(!1), xe = i.useRef(!1), R = i.useRef({}), De = i.useRef({}), r = i.useRef(
458
+ const Ve = i.useRef(null), U = i.useRef({ word: "", last: "" }), re = i.useRef(!1), B = i.useRef(null), W = i.useRef(!1), xe = i.useRef(!1), R = i.useRef({}), De = i.useRef({}), r = i.useRef(
458
459
  new lt({
459
460
  props: t,
460
461
  setState: () => {
@@ -467,23 +468,23 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
467
468
  handleItemSelect: () => {
468
469
  }
469
470
  })
470
- ), Be = i.useRef(0), j = i.useRef(null), [m, zt] = i.useState({}), [Se, Ht] = i.useState(), [, Ve] = i.useReducer((e) => e, !0), [Ce, At] = i.useState(), be = Cn(), We = t.name || t.id, Bt = i.useCallback(
471
+ ), Ae = i.useRef(0), j = i.useRef(null), [m, zt] = i.useState({}), [Se, Ht] = i.useState(), [, Be] = i.useReducer((e) => e, !0), [Ce, Vt] = i.useState(), be = Cn(), We = t.name || t.id, At = i.useCallback(
471
472
  (e) => {
472
473
  if (e == null || !r.current)
473
474
  return;
474
- const n = k(t), { textField: o } = t, l = String(e), a = yn(n, l, o, !1, G), c = a !== -1 ? n[a] : void 0;
475
+ const n = k(t), { textField: o } = t, a = String(e), l = yn(n, a, o, !1, G), c = l !== -1 ? n[l] : void 0;
475
476
  if (c !== void 0) {
476
477
  const f = r.current.initState();
477
478
  f.syntheticEvent = {
478
479
  target: T.current
479
- }, A(c, f), M(f);
480
+ }, V(c, f), M(f);
480
481
  }
481
482
  },
482
483
  [t, G]
483
484
  );
484
485
  on(T, {
485
486
  fieldName: We,
486
- onValueChange: Bt,
487
+ onValueChange: At,
487
488
  enabled: !!We
488
489
  });
489
490
  const J = (e) => {
@@ -494,94 +495,94 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
494
495
  props: t,
495
496
  setState: J,
496
497
  state: m,
497
- forceUpdate: Ve,
498
+ forceUpdate: Be,
498
499
  element: T.current,
499
500
  handleItemSelect: $,
500
501
  value: b()
501
502
  });
502
- }, [J, m, Ve, $, b]), i.useEffect(() => {
503
- var u, S, h, x, s, N, L, _, Z, ae, le, D, w;
504
- const { dataItemKey: e, virtual: n, groupField: o = "", textField: l } = t, a = k(t), c = R.current.virtual ? R.current.virtual.total : 0, f = t.opened !== void 0 ? t.opened : m.opened, v = R.current.opened !== void 0 ? R.current.opened : De.current.opened, d = !v && f;
503
+ }, [J, m, Be, $, b]), i.useEffect(() => {
504
+ var u, S, h, x, s, N, P, _, Z, le, de, D, w;
505
+ const { dataItemKey: e, virtual: n, groupField: o = "", textField: a } = t, l = k(t), c = R.current.virtual ? R.current.virtual.total : 0, f = t.opened !== void 0 ? t.opened : m.opened, v = R.current.opened !== void 0 ? R.current.opened : De.current.opened, d = !v && f;
505
506
  (u = r == null ? void 0 : r.current) == null || u.didUpdate();
506
507
  const p = (S = r == null ? void 0 : r.current) == null ? void 0 : S.getPopupSettings();
507
508
  if (f && (p == null ? void 0 : p.width) === void 0 && T.current) {
508
509
  const g = T.current.offsetWidth;
509
- At((I) => I !== g ? g : I);
510
+ Vt((I) => I !== g ? g : I);
510
511
  }
511
512
  if (p != null && p.animate || d && ve(), n && n.total !== c)
512
513
  (h = r == null ? void 0 : r.current) == null || h.vs.calcScrollElementHeight(), (x = r == null ? void 0 : r.current) == null || x.vs.reset();
513
514
  else {
514
515
  const g = b(), I = R.current.value !== void 0 ? R.current.value : De.current.value;
515
- let de = a.findIndex((Le) => F(Le, g, e));
516
- o !== "" && g && l && (de = (N = (s = r == null ? void 0 : r.current) == null ? void 0 : s.getGroupedDataModernMode(a, o)) == null ? void 0 : N.map((Le) => Le[l]).indexOf(g[l]));
517
- const Qt = !F(I, g, e);
518
- d && n ? (L = r == null ? void 0 : r.current) == null || L.scrollToVirtualItem(n, de) : d && !n ? (ve(), a && a.length !== 0 && ((_ = r == null ? void 0 : r.current) == null || _.resetGroupStickyHeader(a[0][o], {
516
+ let ce = l.findIndex((Le) => L(Le, g, e));
517
+ o !== "" && g && a && (ce = (N = (s = r == null ? void 0 : r.current) == null ? void 0 : s.getGroupedDataModernMode(l, o)) == null ? void 0 : N.map((Le) => Le[a]).indexOf(g[a]));
518
+ const Qt = !L(I, g, e);
519
+ d && n ? (P = r == null ? void 0 : r.current) == null || P.scrollToVirtualItem(n, ce) : d && !n ? (ve(), l && l.length !== 0 && ((_ = r == null ? void 0 : r.current) == null || _.resetGroupStickyHeader(l[0][o], {
519
520
  setState: J,
520
521
  group: m.group,
521
522
  state: m
522
- })), (Z = r == null ? void 0 : r.current) == null || Z.scrollToItem(de)) : f && v && g && Qt && !W.current ? (le = r == null ? void 0 : r.current) == null || le.scrollToItem(de, (ae = r == null ? void 0 : r.current) == null ? void 0 : ae.vs.enabled) : f && v && W.current && (W.current && n && n.skip === 0 ? (D = r == null ? void 0 : r.current) == null || D.vs.reset() : W.current && n && n.skip === n.total - n.pageSize && ((w = r == null ? void 0 : r.current) == null || w.vs.scrollToEnd()));
523
+ })), (Z = r == null ? void 0 : r.current) == null || Z.scrollToItem(ce)) : f && v && g && Qt && !W.current ? (de = r == null ? void 0 : r.current) == null || de.scrollToItem(ce, (le = r == null ? void 0 : r.current) == null ? void 0 : le.vs.enabled) : f && v && W.current && (W.current && n && n.skip === 0 ? (D = r == null ? void 0 : r.current) == null || D.vs.reset() : W.current && n && n.skip === n.total - n.pageSize && ((w = r == null ? void 0 : r.current) == null || w.vs.scrollToEnd()));
523
524
  }
524
525
  W.current = !1, De.current = m, R.current = t, Ne();
525
526
  }), i.useEffect(() => {
526
527
  var e, n;
527
- return j.current = et && window.ResizeObserver && new window.ResizeObserver(ht.bind(void 0)), (e = r == null ? void 0 : r.current) == null || e.didMount(), Ne(), (n = pe()) != null && n.body && j.current && j.current.observe(pe().body), () => {
528
+ return j.current = et && window.ResizeObserver && new window.ResizeObserver(ht.bind(void 0)), (e = r == null ? void 0 : r.current) == null || e.didMount(), Ne(), (n = fe()) != null && n.body && j.current && j.current.observe(fe().body), () => {
528
529
  var o;
529
- (o = pe()) != null && o.body && j.current && j.current.disconnect();
530
+ (o = fe()) != null && o.body && j.current && j.current.disconnect();
530
531
  };
531
532
  }, []);
532
- const Re = ue + "-accessibility-id", qe = ue + "-listbox-id", Ue = ue + "-guid", Vt = be.toLanguageString(
533
+ const Re = pe + "-accessibility-id", qe = pe + "-listbox-id", Ue = pe + "-guid", Bt = be.toLanguageString(
533
534
  it,
534
535
  Pe[it]
535
536
  ), {
536
- style: re,
537
+ style: oe,
537
538
  className: Wt,
538
539
  label: ke,
539
540
  dir: Rt,
540
541
  virtual: O,
541
542
  adaptive: Pn,
542
543
  dataItemKey: qt,
543
- disabled: oe,
544
+ disabled: ie,
544
545
  loading: _e,
545
546
  iconClassName: Ge,
546
547
  svgIcon: Ut,
547
548
  valueRender: $e
548
- } = t, Q = t.opened !== void 0 ? t.opened : m.opened, ie = b(), Ee = ee(ie, t.textField), Ye = !gt() || me().valid, se = r.current, _t = se.vs, X = K && K.uDropDownList;
549
+ } = t, Q = t.opened !== void 0 ? t.opened : m.opened, se = b(), Ee = ee(se, t.textField), Ye = !gt() || me().valid, ae = r.current, _t = ae.vs, X = K && K.uDropDownList;
549
550
  _t.enabled = O !== void 0;
550
551
  const je = sn(), q = !!(Se && je && Se <= je.medium && t.adaptive);
551
- O !== void 0 && (se.vs.skip = O.skip, se.vs.total = O.total, se.vs.pageSize = O.pageSize);
552
- const Gt = k(t), { focused: $t } = m, Je = Gt.findIndex((e) => F(e, ie, qt)), Yt = (Ze = O == null ? void 0 : O.skip) != null ? Ze : 0, jt = Q && Je >= 0 ? `k-${Ue}-item-${Je + Yt + 1}` : void 0, Qe = /* @__PURE__ */ i.createElement("span", { id: Re, className: E(P.inputInner({ c: X })) }, Ee && /* @__PURE__ */ i.createElement("span", { className: E(P.inputText({ c: X })) }, Ee)), Jt = $e !== void 0 ? $e.call(void 0, Qe, ie) : Qe, Xe = /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement(
552
+ O !== void 0 && (ae.vs.skip = O.skip, ae.vs.total = O.total, ae.vs.pageSize = O.pageSize);
553
+ const Gt = k(t), { focused: $t } = m, Je = Gt.findIndex((e) => L(e, se, qt)), Yt = (Ze = O == null ? void 0 : O.skip) != null ? Ze : 0, jt = Q && Je >= 0 ? `k-${Ue}-item-${Je + Yt + 1}` : void 0, Qe = /* @__PURE__ */ i.createElement("span", { id: Re, className: E(F.inputInner({ c: X })) }, Ee && /* @__PURE__ */ i.createElement("span", { className: E(F.inputText({ c: X })) }, Ee)), Jt = $e !== void 0 ? $e.call(void 0, Qe, se) : Qe, Xe = /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement(
553
554
  "span",
554
555
  {
555
556
  ref: It,
556
557
  className: E(
557
- P.wrapper({
558
+ F.wrapper({
558
559
  c: X,
559
560
  size: H,
560
561
  rounded: Ke,
561
- fillMode: ce,
562
+ fillMode: ue,
562
563
  focused: $t,
563
- disabled: oe,
564
+ disabled: ie,
564
565
  invalid: !Ye,
565
566
  loading: _e,
566
- required: fe()
567
+ required: te()
567
568
  }),
568
569
  Wt
569
570
  ),
570
- style: ke ? { ...re, width: void 0 } : re,
571
+ style: ke ? { ...oe, width: void 0 } : oe,
571
572
  dir: Rt,
572
573
  onMouseDown: Q ? (e) => {
573
- e.target.nodeName !== "INPUT" && (te(r.current.wrapper), e.preventDefault());
574
+ e.target.nodeName !== "INPUT" && (ne(r.current.wrapper), e.preventDefault());
574
575
  } : void 0,
575
576
  onFocus: q ? (e) => Ie(e) : Kt,
576
577
  onBlur: Nt,
577
- tabIndex: an(ft, oe),
578
+ tabIndex: an(ft, ie),
578
579
  accessKey: t.accessKey,
579
580
  onKeyDown: Oe,
580
581
  onKeyPress: Tt,
581
- onClick: oe ? void 0 : Ie,
582
+ onClick: ie ? void 0 : Ie,
582
583
  role: "combobox",
583
- "aria-required": fe() || void 0,
584
- "aria-disabled": oe || void 0,
584
+ "aria-required": te() || void 0,
585
+ "aria-disabled": ie || void 0,
585
586
  "aria-haspopup": "listbox",
586
587
  "aria-expanded": Q || !1,
587
588
  "aria-activedescendant": jt,
@@ -593,22 +594,22 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
593
594
  title: t.title
594
595
  },
595
596
  Jt,
596
- _e && /* @__PURE__ */ i.createElement(ln, { className: E(P.loadingIcon({ c: X })), name: "loading" }),
597
+ _e && /* @__PURE__ */ i.createElement(ln, { className: E(F.loadingIcon({ c: X })), name: "loading" }),
597
598
  /* @__PURE__ */ i.createElement(
598
599
  Sn,
599
600
  {
600
601
  tabIndex: -1,
601
602
  type: "button",
602
- "aria-label": Vt,
603
+ "aria-label": Bt,
603
604
  size: H,
604
- fillMode: ce,
605
- className: E(P.inputButton({ c: X })),
605
+ fillMode: ue,
606
+ className: E(F.inputButton({ c: X })),
606
607
  iconClass: Ge,
607
608
  svgIcon: Ge ? void 0 : Ut || mn,
608
609
  onMouseDown: (e) => m.focused && e.preventDefault()
609
610
  }
610
611
  ),
611
- yt(ie),
612
+ yt(se),
612
613
  !q && Lt()
613
614
  ), q && bt());
614
615
  return ke ? /* @__PURE__ */ i.createElement(
@@ -618,7 +619,7 @@ const En = "Please select a value from the list!", Fe = i.forwardRef((dt, ct) =>
618
619
  editorValue: Ee,
619
620
  editorValid: Ye,
620
621
  editorDisabled: t.disabled,
621
- style: { width: re ? re.width : void 0 },
622
+ style: { width: oe ? oe.width : void 0 },
622
623
  children: Xe
623
624
  }
624
625
  ) : Xe;