@progress/kendo-react-dropdowns 7.5.0-develop.2 → 7.5.0-develop.21

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.
@@ -17,9 +17,9 @@ import H from "../common/GroupStickyHeader.mjs";
17
17
  import de from "../common/ListDefaultItem.mjs";
18
18
  import pe from "../common/List.mjs";
19
19
  import O from "../common/DropDownBase.mjs";
20
- import { areSame as C, getItemValue as K, sameCharsOnly as he, shuffleData as ce, matchText as B, isPresent as q, itemIndexStartsWith as ue } from "../common/utils.mjs";
20
+ import { areSame as C, getItemValue as L, sameCharsOnly as he, shuffleData as ce, matchText as B, isPresent as W, itemIndexStartsWith as ue } from "../common/utils.mjs";
21
21
  import { packageMetadata as me } from "../package-metadata.mjs";
22
- import { Button as W } from "@progress/kendo-react-buttons";
22
+ import { Button as q } from "@progress/kendo-react-buttons";
23
23
  import { provideLocalizationService as fe } from "@progress/kendo-react-intl";
24
24
  import { dropDownListArrowBtnAriaLabel as U, messages as ge } from "../messages/index.mjs";
25
25
  import { MOBILE_MEDIUM_DEVISE as G, MOBILE_SMALL_DEVISE as $ } from "../common/constants.mjs";
@@ -52,7 +52,7 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
52
52
  }
53
53
  )
54
54
  ), this.renderListContainer = () => {
55
- const { header: e, footer: t, dir: a, data: r = [], size: o, groupField: n, groupStickyHeaderItemRender: c, list: d } = this.props, p = this.base, i = p.getPopupSettings(), g = this.props.opened !== void 0 ? this.props.opened : this.state.opened, b = i.width !== void 0 ? i.width : p.popupWidth, y = {
55
+ const { header: e, footer: t, dir: a, data: r = [], size: o, groupField: n, groupStickyHeaderItemRender: c, list: d } = this.props, p = this.base, i = p.getPopupSettings(), g = this.props.opened !== void 0 ? this.props.opened : this.state.opened, b = i.width !== void 0 ? i.width : p.popupWidth, I = {
56
56
  dir: a !== void 0 ? a : p.dirCalculated,
57
57
  width: b,
58
58
  popupSettings: {
@@ -70,7 +70,7 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
70
70
  itemsCount: [r.length]
71
71
  };
72
72
  let { group: m } = this.state;
73
- return m === void 0 && n !== void 0 && (m = K(r[0], n)), /* @__PURE__ */ h.createElement(le, { ...y }, this.renderListFilter(), e && /* @__PURE__ */ h.createElement("div", { className: "k-list-header" }, e), /* @__PURE__ */ h.createElement(
73
+ return m === void 0 && n !== void 0 && (m = L(r[0], n)), /* @__PURE__ */ h.createElement(le, { ...I }, this.renderListFilter(), e && /* @__PURE__ */ h.createElement("div", { className: "k-list-header" }, e), /* @__PURE__ */ h.createElement(
74
74
  "div",
75
75
  {
76
76
  className: P(
@@ -108,7 +108,7 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
108
108
  optionsGuid: this._guid,
109
109
  groupField: this.props.groupField,
110
110
  groupMode: "modern",
111
- listRef: (y) => d.list = this.base.list = y,
111
+ listRef: (I) => d.list = this.base.list = I,
112
112
  wrapperStyle: { maxHeight: g.height },
113
113
  wrapperCssClass: "k-list-content",
114
114
  listStyle: d.enabled ? { transform: b } : void 0,
@@ -150,7 +150,8 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
150
150
  onKeyDown: this.handleKeyDown,
151
151
  size: this.props.size,
152
152
  rounded: this.props.rounded,
153
- fillMode: this.props.fillMode
153
+ fillMode: this.props.fillMode,
154
+ renderListFilterWrapper: !0
154
155
  }
155
156
  );
156
157
  }, this.renderDefaultItem = () => {
@@ -169,14 +170,14 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
169
170
  clearTimeout(this._typingTimeout), this.props.filterable || (this._typingTimeout = window.setTimeout(() => this.searchState.word = "", this.props.delay), this.selectNext(e));
170
171
  }, this.selectNext = (e) => {
171
172
  const { data: t = [], dataItemKey: a } = this.props;
172
- let r = t.map((w, N) => ({ item: w, itemIndex: N }));
173
+ let r = t.map((w, F) => ({ item: w, itemIndex: F }));
173
174
  const o = this.searchState.word, n = this.searchState.last, c = he(o, n);
174
175
  let d = r.length, p = Math.max(0, t.findIndex((w) => C(w, this.value, a))), i;
175
176
  this.props.defaultItem && (i = { item: this.props.defaultItem, itemIndex: -1 }, d += 1, p += 1), p += c ? 1 : 0, r = ce(r, p, i);
176
- let g, b, y, m = 0;
177
+ let g, b, I, m = 0;
177
178
  const { textField: l, ignoreCase: x } = this.props;
178
179
  for (; m < d; m++)
179
- if (g = K(r[m].item, l), b = c && B(g, n, x), y = B(g, o, x), b || y) {
180
+ if (g = L(r[m].item, l), b = c && B(g, n, x), I = B(g, o, x), b || I) {
180
181
  m = r[m].itemIndex;
181
182
  break;
182
183
  }
@@ -197,7 +198,7 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
197
198
  groupField: p = "",
198
199
  textField: i,
199
200
  skipDisabledItems: g = !0
200
- } = this.props, b = this.value, y = t.findIndex((I) => C(I, b, d)), m = this.props.opened !== void 0 ? this.props.opened : this.state.opened, l = e.keyCode, x = l === v.home || l === v.end, w = l === v.up || l === v.down, N = !m && (e.altKey && l === v.down || l === v.enter || l === v.space), M = m && (e.altKey && l === v.up || l === v.esc), D = n && (l === v.left || l === v.right), L = w || D && !a || x, k = this.base.initState();
201
+ } = this.props, b = this.value, I = t.findIndex((y) => C(y, b, d)), m = this.props.opened !== void 0 ? this.props.opened : this.state.opened, l = e.keyCode, x = l === v.home || l === v.end, w = l === v.up || l === v.down, F = !m && (e.altKey && l === v.down || l === v.enter || l === v.space), M = m && (e.altKey && l === v.up || l === v.esc), D = n && (l === v.left || l === v.right), K = w || D && !a || x, k = this.base.initState();
201
202
  if (k.syntheticEvent = e, !r) {
202
203
  if (x && this.base.vs.enabled)
203
204
  l === v.home ? c.skip !== 0 ? (this.base.triggerOnPageChange(k, 0, c.pageSize), this._navigated = !0) : this.triggerOnChange(t[0], k) : c.skip < c.total - c.pageSize ? (this.base.triggerOnPageChange(k, c.total - c.pageSize, c.pageSize), this._navigated = !0) : this.triggerOnChange(t[t.length - 1], k);
@@ -206,65 +207,65 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
206
207
  else if (m && l === v.pageDown)
207
208
  this.base.scrollPopupByPageSize(1);
208
209
  else if (m && l === v.enter) {
209
- const I = this.getFocusedIndex();
210
- this.haveFocusedItemAndDataNotEmpty(t, I) ? (this.triggerOnChange(null, k), this.applyState(k)) : this.handleItemSelect(I, k), this.base.togglePopup(k), e.preventDefault();
211
- } else if (N || M)
210
+ const y = this.getFocusedIndex();
211
+ this.haveFocusedItemAndDataNotEmpty(t, y) ? (this.triggerOnChange(null, k), this.applyState(k)) : this.handleItemSelect(y, k), this.base.togglePopup(k), e.preventDefault();
212
+ } else if (F || M)
212
213
  M && this.resetValueIfDisabledItem(), this.base.togglePopup(k), e.preventDefault();
213
- else if (L) {
214
+ else if (K) {
214
215
  if (this._lastKeypressIsFilter = !1, p !== "" && i)
215
216
  if (!g && m)
216
217
  this.onNavigate(k, l);
217
218
  else {
218
- let I;
219
+ let y;
219
220
  if (l === v.down || l === v.right) {
220
- const f = t.slice(y + 1).find((u) => !u.disabled && u[i]);
221
- I = f && t.findIndex((u) => u[i] === f[i]);
221
+ const f = t.slice(I + 1).find((u) => !u.disabled && u[i]);
222
+ y = f && t.findIndex((u) => u[i] === f[i]);
222
223
  } else if (l === v.up || l === v.left) {
223
224
  let f;
224
- if (y === 0 && o)
225
- I = -1;
226
- else if (y === -1)
227
- f = t, I = t.findIndex((u) => !u.disabled && u[i]);
225
+ if (I === 0 && o)
226
+ y = -1;
227
+ else if (I === -1)
228
+ f = t, y = t.findIndex((u) => !u.disabled && u[i]);
228
229
  else {
229
- f = t.slice(0, y);
230
+ f = t.slice(0, I);
230
231
  let u = f.pop();
231
232
  for (; u && u.disabled; )
232
233
  u = f.pop();
233
- I = u && t.findIndex((F) => F[i] === u[i]);
234
+ y = u && t.findIndex((N) => N[i] === u[i]);
234
235
  }
235
236
  }
236
- if (I !== void 0) {
237
- const f = I - y;
237
+ if (y !== void 0) {
238
+ const f = y - I;
238
239
  this.onNavigate(k, l, f);
239
240
  } else
240
- I === void 0 && t.findIndex((f) => f[i] === b[i]) === t.length - 1 && this.onNavigate(k, l);
241
+ y === void 0 && t.findIndex((f) => f[i] === b[i]) === t.length - 1 && this.onNavigate(k, l);
241
242
  }
242
243
  else if (!g && m || x)
243
244
  this.onNavigate(k, l);
244
245
  else if (i) {
245
- let I;
246
+ let y;
246
247
  if (l === v.down || l === v.right) {
247
- const f = t.slice(y + 1).find((u) => !u.disabled && u[i]);
248
- I = f && t.findIndex((u) => u[i] === f[i]);
248
+ const f = t.slice(I + 1).find((u) => !u.disabled && u[i]);
249
+ y = f && t.findIndex((u) => u[i] === f[i]);
249
250
  } else if (l === v.up || l === v.left) {
250
251
  let f;
251
- if (y === 0 && o)
252
- I = -1;
253
- else if (y === -1)
254
- f = t, I = t.find((u) => !u.disabled && u[i]);
252
+ if (I === 0 && o)
253
+ y = -1;
254
+ else if (I === -1)
255
+ f = t, y = t.find((u) => !u.disabled && u[i]);
255
256
  else {
256
- f = t.slice(0, y);
257
+ f = t.slice(0, I);
257
258
  let u = f.pop();
258
259
  for (; u && u.disabled; )
259
260
  u = f.pop();
260
- I = u && t.findIndex((F) => F[i] === u[i]);
261
+ y = u && t.findIndex((N) => N[i] === u[i]);
261
262
  }
262
263
  }
263
- if (I !== void 0) {
264
- const f = I - y;
264
+ if (y !== void 0) {
265
+ const f = y - I;
265
266
  this.onNavigate(k, l, f);
266
267
  } else
267
- I === void 0 && t.findIndex((f) => f[i] === b[i]) === t.length - 1 && this.onNavigate(k, l);
268
+ y === void 0 && t.findIndex((f) => f[i] === b[i]) === t.length - 1 && this.onNavigate(k, l);
268
269
  } else
269
270
  this.onNavigate(k, l);
270
271
  e.preventDefault();
@@ -339,7 +340,7 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
339
340
  */
340
341
  get value() {
341
342
  let s;
342
- return this._valueDuringOnChange !== void 0 ? s = this._valueDuringOnChange : this.props.value !== void 0 ? s = this.props.value : this.state.value !== void 0 ? s = this.state.value : this.props.defaultValue !== void 0 && (s = this.props.defaultValue), !q(s) && this.props.defaultItem !== void 0 && (s = this.props.defaultItem), s;
343
+ return this._valueDuringOnChange !== void 0 ? s = this._valueDuringOnChange : this.props.value !== void 0 ? s = this.props.value : this.state.value !== void 0 ? s = this.state.value : this.props.defaultValue !== void 0 && (s = this.props.defaultValue), !W(s) && this.props.defaultItem !== void 0 && (s = this.props.defaultItem), s;
343
344
  }
344
345
  /**
345
346
  * The index of the selected item.
@@ -380,14 +381,14 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
380
381
  componentDidUpdate(s, e) {
381
382
  var g;
382
383
  const { dataItemKey: t, virtual: a, groupField: r = "", textField: o } = this.props, { data: n = [] } = this.props, c = s.virtual ? s.virtual.total : 0, d = this.props.opened !== void 0 ? this.props.opened : this.state.opened, p = s.opened !== void 0 ? s.opened : e.opened, i = !p && d;
383
- if (this.base.getPopupSettings().animate || i && this.onPopupOpened(), a && a.total !== c)
384
+ if (this.base.didUpdate(), this.base.getPopupSettings().animate || i && this.onPopupOpened(), a && a.total !== c)
384
385
  this.base.vs.calcScrollElementHeight(), this.base.vs.reset();
385
386
  else {
386
- const b = this.value, y = s.value !== void 0 ? s.value : e.value;
387
+ const b = this.value, I = s.value !== void 0 ? s.value : e.value;
387
388
  let m = n.findIndex((x) => C(x, b, t));
388
389
  r !== "" && b && o && (m = (g = this.base.getGroupedDataModernMode(n, r)) == null ? void 0 : g.map((x) => x[o]).indexOf(b[o]));
389
- const l = !C(y, b, t);
390
- i && a ? this.base.scrollToVirtualItem(a, m) : i && !a ? (this.onPopupOpened(), n && n.length !== 0 && this.base.resetGroupStickyHeader(n[0][r], this), this.base.scrollToItem(m)) : d && p && b && l && !this._navigated ? this.base.scrollToItem(m) : d && p && this._navigated && (this._navigated && a && a.skip === 0 ? this.base.vs.reset() : this._navigated && a && a.skip === a.total - a.pageSize && this.base.vs.scrollToEnd());
390
+ const l = !C(I, b, t);
391
+ i && a ? this.base.scrollToVirtualItem(a, m) : i && !a ? (this.onPopupOpened(), n && n.length !== 0 && this.base.resetGroupStickyHeader(n[0][r], this), this.base.scrollToItem(m)) : d && p && b && l && !this._navigated ? this.base.scrollToItem(m, this.base.vs.enabled) : d && p && this._navigated && (this._navigated && a && a.skip === 0 ? this.base.vs.reset() : this._navigated && a && a.skip === a.total - a.pageSize && this.base.vs.scrollToEnd());
391
392
  }
392
393
  this._navigated = !1, this.setValidity();
393
394
  }
@@ -407,18 +408,18 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
407
408
  * @hidden
408
409
  */
409
410
  render() {
410
- const s = fe(this).toLanguageString(U, ge[U]), { style: e, className: t, label: a, dir: r, virtual: o, size: n, rounded: c, fillMode: d, adaptive: p } = this.props, { windowWidth: i = 0 } = this.state, g = this.props.opened !== void 0 ? this.props.opened : this.state.opened, b = this.value, y = K(b, this.props.textField), m = !this.validityStyles || this.validity.valid, l = this.base, x = l.vs, w = i <= G && p;
411
+ const s = fe(this).toLanguageString(U, ge[U]), { style: e, className: t, label: a, dir: r, virtual: o, size: n, rounded: c, fillMode: d, adaptive: p } = this.props, { windowWidth: i = 0 } = this.state, g = this.props.opened !== void 0 ? this.props.opened : this.state.opened, b = this.value, I = L(b, this.props.textField), m = !this.validityStyles || this.validity.valid, l = this.base, x = l.vs, w = i <= G && p;
411
412
  x.enabled = o !== void 0, o !== void 0 && (l.vs.skip = o.skip, l.vs.total = o.total, l.vs.pageSize = o.pageSize);
412
413
  const {
413
- dataItemKey: N,
414
+ dataItemKey: F,
414
415
  data: M = [],
415
416
  disabled: D,
416
- tabIndex: L,
417
+ tabIndex: K,
417
418
  loading: k,
418
- iconClassName: I,
419
+ iconClassName: y,
419
420
  svgIcon: f,
420
421
  valueRender: u
421
- } = this.props, { focused: F } = this.state, Y = M.findIndex((_) => C(_, b, N)), R = /* @__PURE__ */ h.createElement("span", { id: this._inputId, className: "k-input-inner" }, /* @__PURE__ */ h.createElement("span", { className: "k-input-value-text" }, y)), j = u !== void 0 ? u.call(void 0, R, b) : R, V = /* @__PURE__ */ h.createElement(h.Fragment, null, /* @__PURE__ */ h.createElement(
422
+ } = this.props, { focused: N } = this.state, Y = M.findIndex((_) => C(_, b, F)), R = /* @__PURE__ */ h.createElement("span", { id: this._inputId, className: "k-input-inner" }, I && /* @__PURE__ */ h.createElement("span", { className: "k-input-value-text" }, I)), j = u !== void 0 ? u.call(void 0, R, b) : R, V = /* @__PURE__ */ h.createElement(h.Fragment, null, /* @__PURE__ */ h.createElement(
422
423
  "span",
423
424
  {
424
425
  ref: this.componentRef,
@@ -429,7 +430,7 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
429
430
  [`k-picker-${z[n] || n}`]: n,
430
431
  [`k-rounded-${ke[c] || c}`]: c,
431
432
  [`k-picker-${d}`]: d,
432
- "k-focus": F,
433
+ "k-focus": N,
433
434
  "k-disabled": D,
434
435
  "k-invalid": !m,
435
436
  "k-loading": k,
@@ -443,7 +444,7 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
443
444
  } : void 0,
444
445
  onFocus: this.handleFocus,
445
446
  onBlur: this.handleBlur,
446
- tabIndex: X(L, D),
447
+ tabIndex: X(K, D),
447
448
  accessKey: this.props.accessKey,
448
449
  onKeyDown: this.handleKeyDown,
449
450
  onKeyPress: this.handleKeyPress,
@@ -464,7 +465,7 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
464
465
  j,
465
466
  k && /* @__PURE__ */ h.createElement(Z, { className: "k-input-loading-icon", name: "loading" }),
466
467
  /* @__PURE__ */ h.createElement(
467
- W,
468
+ q,
468
469
  {
469
470
  tabIndex: -1,
470
471
  type: "button",
@@ -472,11 +473,11 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
472
473
  "aria-hidden": !0,
473
474
  size: n,
474
475
  fillMode: d,
475
- iconClass: I,
476
+ iconClass: y,
476
477
  className: "k-input-button",
477
478
  rounded: null,
478
479
  themeColor: "base",
479
- icon: I ? void 0 : "caret-alt-down",
480
+ icon: y ? void 0 : "caret-alt-down",
480
481
  svgIcon: f || oe,
481
482
  onMouseDown: (_) => this.state.focused && _.preventDefault()
482
483
  }
@@ -488,7 +489,7 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
488
489
  ae,
489
490
  {
490
491
  label: a,
491
- editorValue: y,
492
+ editorValue: I,
492
493
  editorValid: m,
493
494
  editorDisabled: this.props.disabled,
494
495
  style: { width: e ? e.width : void 0 },
@@ -525,8 +526,8 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
525
526
  className: s <= $ ? "k-adaptive-actionsheet k-actionsheet-fullscreen" : "k-adaptive-actionsheet k-actionsheet-bottom"
526
527
  };
527
528
  let { group: g } = this.state;
528
- return g === void 0 && o !== void 0 && (g = K(d[0], o)), /* @__PURE__ */ h.createElement(ve, { ...i }, /* @__PURE__ */ h.createElement(be, { className: "k-text-center" }, /* @__PURE__ */ h.createElement("div", { className: "k-actionsheet-titlebar-group k-hbox" }, /* @__PURE__ */ h.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ h.createElement("div", null, r)), /* @__PURE__ */ h.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ h.createElement(
529
- W,
529
+ return g === void 0 && o !== void 0 && (g = L(d[0], o)), /* @__PURE__ */ h.createElement(ve, { ...i }, /* @__PURE__ */ h.createElement(be, { className: "k-text-center" }, /* @__PURE__ */ h.createElement("div", { className: "k-actionsheet-titlebar-group k-hbox" }, /* @__PURE__ */ h.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ h.createElement("div", null, r)), /* @__PURE__ */ h.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ h.createElement(
530
+ q,
530
531
  {
531
532
  tabIndex: 0,
532
533
  "aria-label": "Cancel",
@@ -563,7 +564,7 @@ const ye = "Please select a value from the list!", { sizeMap: z, roundedMap: ke
563
564
  filterable: n,
564
565
  skipDisabledItems: c = !0
565
566
  } = this.props, d = this.props.filter ? this.props.filter : this.state.text;
566
- return c && t && !d && !s ? e.findIndex((p) => !p.disabled && p[t]) : q(s) && d === void 0 || n && d === "" ? e.findIndex((p) => C(p, s, a)) : d ? this._lastKeypressIsFilter ? o(e, d, t) : e.findIndex((p) => C(p, s, a)) : r.skip === 0 ? 0 : -1;
567
+ return c && t && !d && !s ? e.findIndex((p) => !p.disabled && p[t]) : W(s) && d === void 0 || n && d === "" ? e.findIndex((p) => C(p, s, a)) : d ? this._lastKeypressIsFilter ? o(e, d, t) : e.findIndex((p) => C(p, s, a)) : r.skip === 0 ? 0 : -1;
567
568
  }
568
569
  focusElement(s) {
569
570
  this._skipFocusEvent = !0, s.focus(), window.setTimeout(() => this._skipFocusEvent = !1, 30);
@@ -605,6 +606,7 @@ E.displayName = "DropDownList", E.propTypes = {
605
606
  groupField: S.string,
606
607
  list: S.any,
607
608
  skipDisabledItems: S.bool,
609
+ renderListFilterWrapper: S.bool,
608
610
  ...O.propTypes
609
611
  }, E.defaultProps = {
610
612
  delay: 500,
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ge=require("react"),n=require("prop-types"),r=require("@progress/kendo-react-common"),Je=require("@progress/kendo-react-popup"),Qe=require("@progress/kendo-react-intl"),Ce=require("@progress/kendo-react-treeview"),Xe=require("../package-metadata.js"),U=require("../common/utils.js"),Ye=require("./useDropdownWidth.js"),Ze=require("./ListNoData.js"),h=require("../messages/index.js"),et=require("@progress/kendo-react-labels"),we=require("../common/ListFilter.js"),tt=require("@progress/kendo-react-buttons"),xe=require("@progress/kendo-svg-icons"),nt=require("../common/AdaptiveMode.js"),at=require("@progress/kendo-react-layout"),ot=require("../common/constants.js");function rt(u){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(u){for(const s in u)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(u,s);Object.defineProperty(f,s,o.get?o:{enumerable:!0,get:()=>u[s]})}}return f.default=u,Object.freeze(f)}const t=rt(Ge),{sizeMap:st,roundedMap:it}=r.kendoThemeMaps,lt="Please select a value from the list!",ct=u=>t.createElement("span",{className:"k-input-value-text"},u.children),De=u=>u.split("_").map(f=>parseInt(f,10)),ut=(u,f)=>{const{validationMessage:s,valid:o,required:G}=u;return{customError:s!==void 0,valid:!!(o!==void 0?o:!G||f),valueMissing:!f}},Ie={selectField:"selected",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},data:[],required:!1,style:{},validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid"},Fe=r.createPropsContext(),ne=t.forwardRef((u,f)=>{r.validatePackage(Xe.packageMetadata);const s=r.usePropsContext(Fe,u),o={...Ie,...s},G=r.useId(),ae=o.id||G,{data:M,dataItemKey:T,popupSettings:F={},style:N,opened:d,disabled:S,onOpen:P=r.noop,onClose:m=r.noop,placeholder:oe,label:O,name:Se,selectField:H,subItemsField:V,validationMessage:_,valid:Re,required:J,validityStyles:qe}=o,Q=r.getTabIndex(o.tabIndex,S),i=t.useRef(null),g=t.useRef(null),R=t.useRef(null),X=t.useRef(null),j=t.useRef(null),E=t.useRef(null),$=t.useRef(!1),[re,Ke]=t.useState(void 0),C=o.value!==void 0,b=C?o.value:re!==void 0?re:o.defaultValue,L=U.isPresent(b),se=L?U.getItemValue(b,o.textField):"",Y=ut({validationMessage:_,valid:Re,required:J},L),Me=t.useCallback(()=>g.current&&g.current.focus(),[]);t.useImperativeHandle(i,()=>({props:o,element:g.current,focus:Me})),t.useImperativeHandle(f,()=>i.current);const w=r.useRtl(g,o.dir),Te={width:Ye.useDropdownWidth(g,Ie,F,N),...w!==void 0?{direction:w}:{}},[Ne,ie]=t.useState(!1),l=d!==void 0?d:Ne,[p,Z]=t.useState(!1),[ee,Pe]=t.useState(),x=!!(ee&&ee<=ot.MOBILE_MEDIUM_DEVISE&&o.adaptive),[le,Oe]=t.useState(""),Ve=t.useCallback(()=>{j.current&&j.current.setCustomValidity&&j.current.setCustomValidity(Y.valid?"":_===void 0?lt:_)},[_,Y]);t.useEffect(Ve),t.useEffect(()=>{const e=r.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver($e.bind(void 0));return document!=null&&document.body&&e&&e.observe(document.body),()=>{document!=null&&document.body&&e&&e.disconnect()}},[]);const ce=t.useCallback(e=>{if(!l){if(P){const a={...e};P.call(void 0,a)}d===void 0&&ie(!0)}},[l,d,P]),D=t.useCallback(e=>{if(l){if(m){const a={...e};m.call(void 0,a)}d===void 0&&(ie(!1),x&&setTimeout(()=>{var a;y((a=X.current)==null?void 0:a.element)},300))}},[l,d,m,x]),Le=t.useCallback(e=>{if(!e.isDefaultPrevented()&&i.current){Z(!0);const a={syntheticEvent:e,nativeEvent:e.nativeEvent,target:i.current};(l?D:ce)(a)}},[l,d,P,m]),q=t.useCallback(e=>{$.current=!0,e(),window.setTimeout(()=>$.current=!1,0)},[]),Be=t.useCallback(e=>{var I,Ee;const{keyCode:a,altKey:c}=e,v=E.current&&E.current.element;if(!i.current||e.isDefaultPrevented()&&((I=R.current)==null?void 0:I.element)===e.target)return;const K={syntheticEvent:e,nativeEvent:e.nativeEvent,target:i.current};if(l)if(a===r.Keys.esc||c&&a===r.Keys.up)e.preventDefault(),D(K);else if(v&&v.querySelector(".k-focus")&&(a===r.Keys.up||a===r.Keys.down||a===r.Keys.left||a===r.Keys.right||a===r.Keys.home||a===r.Keys.end)){if(a===r.Keys.up&&((Ee=R.current)!=null&&Ee.element)){const A=Array.from(v.querySelectorAll(".k-treeview-item")),ke=[...A].reverse().find(z=>!!(z&&z.querySelector(".k-focus")));if(ke&&A.indexOf(ke)===0)return q(()=>{var z;y((z=R.current)==null?void 0:z.element)})}q(r.noop)}else a===r.Keys.down&&q(()=>{var A;y(((A=R.current)==null?void 0:A.element)||v)});else c&&a===r.Keys.down?(e.preventDefault(),ce(K)):l||a===r.Keys.esc&&fe(e)},[l,d,P,m]),ue=t.useCallback(e=>{const{keyCode:a,altKey:c}=e;c||a!==r.Keys.up&&a!==r.Keys.down||(e.preventDefault(),q(a===r.Keys.up?()=>{y(g.current)}:()=>{y(E.current&&E.current.element)}))},[]),y=t.useCallback(e=>{e&&q(()=>e.focus())},[]),We=t.useCallback(()=>{var e;!p&&l&&!d?D({target:i.current}):s.filterable?y((e=R.current)==null?void 0:e.element):y(E.current&&E.current.element)},[m,s.filterable,p,d,l]),Ae=t.useCallback(()=>{p&&y(g.current)},[p]),ze=t.useCallback(e=>{if(!p&&!$.current&&(Z(!0),s.onFocus&&i.current)){const a={syntheticEvent:e,nativeEvent:e.nativeEvent,target:i.current};s.onFocus.call(void 0,a)}},[p,s.onFocus]),He=t.useCallback(e=>{if(p&&!$.current&&i.current){Z(!1);const a={syntheticEvent:e,nativeEvent:e.nativeEvent,target:i.current};if(s.onBlur){const c={...a};s.onBlur.call(void 0,c)}x||D(a)}},[p,s.onBlur,l,d,m]),_e=t.useCallback(()=>{p&&q(r.noop),x&&setTimeout(()=>{var e;y((e=X.current)==null?void 0:e.element)},300)},[p,x]),de=t.useCallback((e,a,c)=>{if(s.onChange){const v={value:a,level:c?De(c):[],...e};s.onChange.call(void 0,v)}C||Ke(a)},[s.onChange,C]),pe=t.useCallback(e=>{if(U.areSame(e.item,b,T)||!i.current)return;const{item:a,itemHierarchicalIndex:c,nativeEvent:v,syntheticEvent:K}=e,I={syntheticEvent:K,nativeEvent:v,target:i.current};de(I,a,c),D(I)},[C,b,s.onChange,T,l,d,m]),fe=t.useCallback(e=>{if(!i.current)return;const a={syntheticEvent:e,nativeEvent:e.nativeEvent,target:i.current};de(a,null),D(a),e.preventDefault()},[C,s.onChange,l,d,m]),ve=t.useCallback(e=>{if(e.syntheticEvent.stopPropagation(),s.onExpandChange&&i.current){const{item:a,itemHierarchicalIndex:c,nativeEvent:v,syntheticEvent:K}=e,I={level:De(c),item:a,nativeEvent:v,syntheticEvent:K,target:i.current};s.onExpandChange.call(void 0,I)}},[s.onExpandChange]),me=t.useCallback(e=>{if(s.onFilterChange&&i.current){const c={filter:{field:s.textField,operator:"contains",value:e.target.value},syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,target:i.current};s.onFilterChange.call(void 0,c),s.filter===void 0&&Oe(e.target.value)}},[s.onFilterChange,s.filter,s.textField]),je=()=>{const e=o.filterable?t.createElement(we,{value:o.filter===void 0?le:o.filter,ref:X,onChange:me,onKeyDown:ue,size:k,rounded:B,fillMode:W}):null,a={adaptiveTitle:o.adaptiveTitle,expand:l,onClose:c=>D(c),windowWidth:ee,mobileFilter:e};return t.createElement(nt.AdaptiveMode,{...a},t.createElement(at.ActionSheetContent,{className:"!k-overflow-hidden"},t.createElement("div",{className:"k-list-container"},t.createElement("div",{className:"k-list k-list-lg"},M.length>0?t.createElement(Ce.TreeView,{ref:E,tabIndex:Q,data:ge,focusIdField:T,textField:o.textField,selectField:H,expandField:o.expandField,childrenField:V,expandIcons:!0,onItemClick:pe,onExpandChange:ve,size:k,item:o.item,dir:w}):t.createElement(be,null,te.toLanguageString(h.nodata,h.messages[h.nodata]))))))},$e=t.useCallback(e=>{for(let a of e)Pe(a.target.clientWidth)},[]),ge=t.useMemo(()=>C||!L?M:r.mapTree(M,V,e=>r.extendDataItem(e,V,{[H]:U.areSame(e,b,T)})),[M,b,C,L,H,V]),be=o.listNoData||Ze.ListNoData,Ue=o.valueHolder||ct,te=Qe.useLocalization(),ye=!qe||Y.valid,{size:k,rounded:B,fillMode:W}=o,he=t.createElement(t.Fragment,null,t.createElement("span",{className:r.classNames("k-dropdowntree k-picker",o.className,{[`k-picker-${st[k]||k}`]:k,[`k-rounded-${it[B]||B}`]:B,[`k-picker-${W}`]:W,"k-focus":p,"k-invalid":!ye,"k-loading":o.loading,"k-required":J,"k-disabled":o.disabled}),tabIndex:Q,accessKey:o.accessKey,id:ae,style:O?{...N,width:void 0}:N,dir:w,ref:g,onKeyDown:S?void 0:Be,onMouseDown:_e,onClick:S?void 0:Le,onFocus:ze,onBlur:He,role:"combobox","aria-haspopup":"tree","aria-expanded":l,"aria-disabled":S,"aria-label":O,"aria-labelledby":o.ariaLabelledBy,"aria-describedby":o.ariaDescribedBy,"aria-required":J},t.createElement("span",{className:"k-input-inner"},t.createElement(Ue,{item:b},se||oe)),o.loading&&t.createElement(r.IconWrap,{className:"k-input-loading-icon",name:"loading"}),L&&!S&&t.createElement("span",{onClick:fe,className:"k-clear-value",title:te.toLanguageString(h.clear,h.messages[h.clear]),role:"button",tabIndex:-1,onMouseDown:e=>e.preventDefault()},t.createElement(r.IconWrap,{name:"x",icon:xe.xIcon})),t.createElement(tt.Button,{tabIndex:-1,type:"button","aria-label":"select",className:"k-input-button",size:k,fillMode:W,themeColor:"base",rounded:null,icon:"caret-alt-down",svgIcon:xe.caretAltDownIcon}),t.createElement("select",{name:Se,ref:j,tabIndex:-1,"aria-hidden":!0,title:O,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},t.createElement("option",{value:o.valueMap?o.valueMap.call(void 0,b):b})),!x&&t.createElement(Je.Popup,{...F,className:r.classNames(F.className,{"k-rtl":w==="rtl"}),popupClass:r.classNames(F.popupClass,"k-dropdowntree-popup"),style:Te,anchor:F.anchor||g.current,show:l,onOpen:We,onClose:Ae},o.filterable&&t.createElement(we,{value:o.filter===void 0?le:o.filter,ref:R,onChange:me,onKeyDown:ue,size:k,rounded:B,fillMode:W}),M.length>0?t.createElement(Ce.TreeView,{style:{height:F.height},ref:E,tabIndex:Q,data:ge,focusIdField:T,textField:o.textField,selectField:H,expandField:o.expandField,childrenField:V,expandIcons:!0,onItemClick:pe,onExpandChange:ve,size:k,item:o.item,dir:w}):t.createElement(be,null,te.toLanguageString(h.nodata,h.messages[h.nodata])))),x&&je());return O?t.createElement(et.FloatingLabel,{label:O,editorValue:se,editorPlaceholder:oe,editorValid:ye,editorDisabled:S,editorId:ae,style:{width:N?N.width:void 0},children:he,dir:w}):he}),dt={opened:n.bool,disabled:n.bool,dir:n.string,tabIndex:n.number,accessKey:n.string,data:n.array,value:n.any,valueMap:n.func,placeholder:n.string,dataItemKey:n.string.isRequired,textField:n.string.isRequired,selectField:n.string,expandField:n.string,subItemsField:n.string,className:n.string,style:n.object,label:n.string,validationMessage:n.string,validityStyles:n.bool,valid:n.bool,required:n.bool,name:n.string,id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,filterable:n.bool,filter:n.string,loading:n.bool,popupSettings:n.shape({animate:n.oneOfType([n.bool,n.shape({openDuration:n.number,closeDuration:n.number})]),popupClass:n.string,className:n.string,appendTo:n.any,width:n.oneOfType([n.string,n.number]),height:n.oneOfType([n.string,n.number])}),onOpen:n.func,onClose:n.func,onFocus:n.func,onBlur:n.func,onChange:n.func,onFilterChange:n.func,onExpandChange:n.func,item:n.func,valueHolder:n.func,listNoData:n.func,adaptiveTitle:n.string,adaptive:n.bool};ne.displayName="KendoReactDropDownTree";ne.propTypes=dt;exports.DropDownTree=ne;exports.DropDownTreePropsContext=Fe;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ge=require("react"),n=require("prop-types"),r=require("@progress/kendo-react-common"),Je=require("@progress/kendo-react-popup"),Qe=require("@progress/kendo-react-intl"),we=require("@progress/kendo-react-treeview"),Xe=require("../package-metadata.js"),U=require("../common/utils.js"),Ye=require("./useDropdownWidth.js"),Ze=require("./ListNoData.js"),h=require("../messages/index.js"),et=require("@progress/kendo-react-labels"),xe=require("../common/ListFilter.js"),tt=require("@progress/kendo-react-buttons"),De=require("@progress/kendo-svg-icons"),nt=require("../common/AdaptiveMode.js"),at=require("@progress/kendo-react-layout"),ot=require("../common/constants.js");function rt(u){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(u){for(const s in u)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(u,s);Object.defineProperty(f,s,o.get?o:{enumerable:!0,get:()=>u[s]})}}return f.default=u,Object.freeze(f)}const t=rt(Ge),{sizeMap:st,roundedMap:it}=r.kendoThemeMaps,lt="Please select a value from the list!",ct=u=>t.createElement("span",{className:"k-input-value-text"},u.children),Ie=u=>u.split("_").map(f=>parseInt(f,10)),ut=(u,f)=>{const{validationMessage:s,valid:o,required:G}=u;return{customError:s!==void 0,valid:!!(o!==void 0?o:!G||f),valueMissing:!f}},oe={selectField:"selected",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},data:[],required:!1,style:{},validityStyles:!0,size:"medium",rounded:"medium",fillMode:"solid"},Fe=r.createPropsContext(),re=t.forwardRef((u,f)=>{r.validatePackage(Xe.packageMetadata);const s=r.usePropsContext(Fe,u),o={...oe,...s},G=r.useId(),se=o.id||G,{data:M,dataItemKey:T,popupSettings:E={},style:N,opened:d,disabled:S,onOpen:P=r.noop,onClose:v=r.noop,placeholder:J,label:O,name:Se,selectField:H,subItemsField:V,validationMessage:_,valid:Re,required:Q,validityStyles:qe}=o,X=r.getTabIndex(o.tabIndex,S),i=t.useRef(null),g=t.useRef(null),R=t.useRef(null),Y=t.useRef(null),j=t.useRef(null),k=t.useRef(null),$=t.useRef(!1),[ie,Ke]=t.useState(void 0),w=o.value!==void 0,b=w?o.value:ie!==void 0?ie:o.defaultValue,L=U.isPresent(b),Z=L?U.getItemValue(b,o.textField):"",ee=ut({validationMessage:_,valid:Re,required:Q},L),Me=t.useCallback(()=>g.current&&g.current.focus(),[]);t.useImperativeHandle(i,()=>({props:o,element:g.current,focus:Me})),t.useImperativeHandle(f,()=>i.current);const x=r.useRtl(g,o.dir),Te={width:Ye.useDropdownWidth(g,oe,{...oe.popupSettings,...E},N),...x!==void 0?{direction:x}:{}},[Ne,le]=t.useState(!1),l=d!==void 0?d:Ne,[p,te]=t.useState(!1),[ne,Pe]=t.useState(),D=!!(ne&&ne<=ot.MOBILE_MEDIUM_DEVISE&&o.adaptive),[ce,Oe]=t.useState(""),Ve=t.useCallback(()=>{j.current&&j.current.setCustomValidity&&j.current.setCustomValidity(ee.valid?"":_===void 0?lt:_)},[_,ee]);t.useEffect(Ve),t.useEffect(()=>{const e=r.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver($e.bind(void 0));return document!=null&&document.body&&e&&e.observe(document.body),()=>{document!=null&&document.body&&e&&e.disconnect()}},[]);const ue=t.useCallback(e=>{if(!l){if(P){const a={...e};P.call(void 0,a)}d===void 0&&le(!0)}},[l,d,P]),I=t.useCallback(e=>{if(l){if(v){const a={...e};v.call(void 0,a)}d===void 0&&(le(!1),D&&setTimeout(()=>{var a;y((a=Y.current)==null?void 0:a.element)},300))}},[l,d,v,D]),Le=t.useCallback(e=>{if(!e.isDefaultPrevented()&&i.current){te(!0);const a={syntheticEvent:e,nativeEvent:e.nativeEvent,target:i.current};(l?I:ue)(a)}},[l,d,P,v]),q=t.useCallback(e=>{$.current=!0,e(),window.setTimeout(()=>$.current=!1,0)},[]),Be=t.useCallback(e=>{var F,ke;const{keyCode:a,altKey:c}=e,m=k.current&&k.current.element;if(!i.current||e.isDefaultPrevented()&&((F=R.current)==null?void 0:F.element)===e.target)return;const K={syntheticEvent:e,nativeEvent:e.nativeEvent,target:i.current};if(l)if(a===r.Keys.esc||c&&a===r.Keys.up)e.preventDefault(),I(K);else if(m&&m.querySelector(".k-focus")&&(a===r.Keys.up||a===r.Keys.down||a===r.Keys.left||a===r.Keys.right||a===r.Keys.home||a===r.Keys.end)){if(a===r.Keys.up&&((ke=R.current)!=null&&ke.element)){const A=Array.from(m.querySelectorAll(".k-treeview-item")),Ce=[...A].reverse().find(z=>!!(z&&z.querySelector(".k-focus")));if(Ce&&A.indexOf(Ce)===0)return q(()=>{var z;y((z=R.current)==null?void 0:z.element)})}q(r.noop)}else a===r.Keys.down&&q(()=>{var A;y(((A=R.current)==null?void 0:A.element)||m)});else c&&a===r.Keys.down?(e.preventDefault(),ue(K)):l||a===r.Keys.esc&&me(e)},[l,d,P,v]),de=t.useCallback(e=>{const{keyCode:a,altKey:c}=e;c||a!==r.Keys.up&&a!==r.Keys.down||(e.preventDefault(),q(a===r.Keys.up?()=>{y(g.current)}:()=>{y(k.current&&k.current.element)}))},[]),y=t.useCallback(e=>{e&&q(()=>e.focus())},[]),We=t.useCallback(()=>{var e;!p&&l&&!d?I({target:i.current}):s.filterable?y((e=R.current)==null?void 0:e.element):y(k.current&&k.current.element)},[v,s.filterable,p,d,l]),Ae=t.useCallback(()=>{p&&y(g.current)},[p]),ze=t.useCallback(e=>{if(!p&&!$.current&&(te(!0),s.onFocus&&i.current)){const a={syntheticEvent:e,nativeEvent:e.nativeEvent,target:i.current};s.onFocus.call(void 0,a)}},[p,s.onFocus]),He=t.useCallback(e=>{if(p&&!$.current&&i.current){te(!1);const a={syntheticEvent:e,nativeEvent:e.nativeEvent,target:i.current};if(s.onBlur){const c={...a};s.onBlur.call(void 0,c)}D||I(a)}},[p,s.onBlur,l,d,v]),_e=t.useCallback(()=>{p&&q(r.noop),D&&setTimeout(()=>{var e;y((e=Y.current)==null?void 0:e.element)},300)},[p,D]),pe=t.useCallback((e,a,c)=>{if(s.onChange){const m={value:a,level:c?Ie(c):[],...e};s.onChange.call(void 0,m)}w||Ke(a)},[s.onChange,w]),fe=t.useCallback(e=>{if(U.areSame(e.item,b,T)||!i.current)return;const{item:a,itemHierarchicalIndex:c,nativeEvent:m,syntheticEvent:K}=e,F={syntheticEvent:K,nativeEvent:m,target:i.current};pe(F,a,c),I(F)},[w,b,s.onChange,T,l,d,v]),me=t.useCallback(e=>{if(!i.current)return;const a={syntheticEvent:e,nativeEvent:e.nativeEvent,target:i.current};pe(a,null),I(a),e.preventDefault()},[w,s.onChange,l,d,v]),ve=t.useCallback(e=>{if(e.syntheticEvent.stopPropagation(),s.onExpandChange&&i.current){const{item:a,itemHierarchicalIndex:c,nativeEvent:m,syntheticEvent:K}=e,F={level:Ie(c),item:a,nativeEvent:m,syntheticEvent:K,target:i.current};s.onExpandChange.call(void 0,F)}},[s.onExpandChange]),ge=t.useCallback(e=>{if(s.onFilterChange&&i.current){const c={filter:{field:s.textField,operator:"contains",value:e.target.value},syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,target:i.current};s.onFilterChange.call(void 0,c),s.filter===void 0&&Oe(e.target.value)}},[s.onFilterChange,s.filter,s.textField]),je=()=>{const e=o.filterable?t.createElement(xe,{value:o.filter===void 0?ce:o.filter,ref:Y,onChange:ge,onKeyDown:de,size:C,rounded:B,fillMode:W}):null,a={adaptiveTitle:o.adaptiveTitle,expand:l,onClose:c=>I(c),windowWidth:ne,mobileFilter:e};return t.createElement(nt.AdaptiveMode,{...a},t.createElement(at.ActionSheetContent,{className:"!k-overflow-hidden"},t.createElement("div",{className:"k-list-container"},t.createElement("div",{className:"k-list k-list-lg"},M.length>0?t.createElement(we.TreeView,{ref:k,tabIndex:X,data:be,focusIdField:T,textField:o.textField,selectField:H,expandField:o.expandField,childrenField:V,expandIcons:!0,onItemClick:fe,onExpandChange:ve,size:C,item:o.item,dir:x,animate:E.animate}):t.createElement(ye,null,ae.toLanguageString(h.nodata,h.messages[h.nodata]))))))},$e=t.useCallback(e=>{for(let a of e)Pe(a.target.clientWidth)},[]),be=t.useMemo(()=>w||!L?M:r.mapTree(M,V,e=>r.extendDataItem(e,V,{[H]:U.areSame(e,b,T)})),[M,b,w,L,H,V]),ye=o.listNoData||Ze.ListNoData,Ue=o.valueHolder||ct,ae=Qe.useLocalization(),he=!qe||ee.valid,{size:C,rounded:B,fillMode:W}=o,Ee=t.createElement(t.Fragment,null,t.createElement("span",{className:r.classNames("k-dropdowntree k-picker",o.className,{[`k-picker-${st[C]||C}`]:C,[`k-rounded-${it[B]||B}`]:B,[`k-picker-${W}`]:W,"k-focus":p,"k-invalid":!he,"k-loading":o.loading,"k-required":Q,"k-disabled":o.disabled}),tabIndex:X,accessKey:o.accessKey,id:se,style:O?{...N,width:void 0}:N,dir:x,ref:g,onKeyDown:S?void 0:Be,onMouseDown:_e,onClick:S?void 0:Le,onFocus:ze,onBlur:He,role:"combobox","aria-haspopup":"tree","aria-expanded":l,"aria-disabled":S,"aria-label":O,"aria-labelledby":o.ariaLabelledBy,"aria-describedby":o.ariaDescribedBy,"aria-required":Q},t.createElement("span",{className:"k-input-inner"},(Z||J)&&t.createElement(Ue,{item:b},Z||J)),o.loading&&t.createElement(r.IconWrap,{className:"k-input-loading-icon",name:"loading"}),L&&!S&&t.createElement("span",{onClick:me,className:"k-clear-value",title:ae.toLanguageString(h.clear,h.messages[h.clear]),role:"button",tabIndex:-1,onMouseDown:e=>e.preventDefault()},t.createElement(r.IconWrap,{name:"x",icon:De.xIcon})),t.createElement(tt.Button,{tabIndex:-1,type:"button","aria-label":"select",className:"k-input-button",size:C,fillMode:W,themeColor:"base",rounded:null,icon:"caret-alt-down",svgIcon:De.caretAltDownIcon}),t.createElement("select",{name:Se,ref:j,tabIndex:-1,"aria-hidden":!0,title:O,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},t.createElement("option",{value:o.valueMap?o.valueMap.call(void 0,b):b})),!D&&t.createElement(Je.Popup,{...E,className:r.classNames(E.className,{"k-rtl":x==="rtl"}),popupClass:r.classNames(E.popupClass,"k-dropdowntree-popup k-list-container"),style:Te,anchor:E.anchor||g.current,show:l,onOpen:We,onClose:Ae},o.filterable&&t.createElement(xe,{value:o.filter===void 0?ce:o.filter,ref:R,onChange:ge,onKeyDown:de,size:C,rounded:B,fillMode:W,renderListFilterWrapper:!0,renderPrefixSeparator:!0}),M.length>0?t.createElement(we.TreeView,{style:{height:E.height},ref:k,tabIndex:X,data:be,focusIdField:T,textField:o.textField,selectField:H,expandField:o.expandField,childrenField:V,expandIcons:!0,onItemClick:fe,onExpandChange:ve,size:C,item:o.item,dir:x,animate:E.animate}):t.createElement(ye,null,ae.toLanguageString(h.nodata,h.messages[h.nodata])))),D&&je());return O?t.createElement(et.FloatingLabel,{label:O,editorValue:Z,editorPlaceholder:J,editorValid:he,editorDisabled:S,editorId:se,style:{width:N?N.width:void 0},children:Ee,dir:x}):Ee}),dt={opened:n.bool,disabled:n.bool,dir:n.string,tabIndex:n.number,accessKey:n.string,data:n.array,value:n.any,valueMap:n.func,placeholder:n.string,dataItemKey:n.string.isRequired,textField:n.string.isRequired,selectField:n.string,expandField:n.string,subItemsField:n.string,className:n.string,style:n.object,label:n.string,validationMessage:n.string,validityStyles:n.bool,valid:n.bool,required:n.bool,name:n.string,id:n.string,ariaLabelledBy:n.string,ariaDescribedBy:n.string,filterable:n.bool,filter:n.string,loading:n.bool,popupSettings:n.shape({animate:n.oneOfType([n.bool,n.shape({openDuration:n.number,closeDuration:n.number})]),popupClass:n.string,className:n.string,appendTo:n.any,width:n.oneOfType([n.string,n.number]),height:n.oneOfType([n.string,n.number])}),onOpen:n.func,onClose:n.func,onFocus:n.func,onBlur:n.func,onChange:n.func,onFilterChange:n.func,onExpandChange:n.func,item:n.func,valueHolder:n.func,listNoData:n.func,adaptiveTitle:n.string,adaptive:n.bool};re.displayName="KendoReactDropDownTree";re.propTypes=dt;exports.DropDownTree=re;exports.DropDownTreePropsContext=Fe;