@progress/kendo-react-dropdowns 15.0.1-develop.3 → 15.0.1-develop.5

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