@progress/kendo-react-dropdowns 15.0.1-develop.9 → 15.1.0-develop.10

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