@progress/kendo-react-dropdowns 10.0.0 → 10.1.0-develop.2

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,27 +7,27 @@
7
7
  */
8
8
  import * as t from "react";
9
9
  import n from "prop-types";
10
- import { createPropsContext as Ze, validatePackage as et, usePropsContext as tt, useId as nt, getTabIndex as ot, useRtl as at, useAdaptiveModeContext as rt, canUseDOM as it, Keys as c, noop as j, mapTree as lt, extendDataItem as st, classNames as ae, IconWrap as Fe, WatermarkOverlay as ct, kendoThemeMaps as ut } from "@progress/kendo-react-common";
11
- import { Popup as dt } from "@progress/kendo-react-popup";
12
- import { useLocalization as pt } from "@progress/kendo-react-intl";
13
- import { TreeView as De } from "@progress/kendo-react-treeview";
14
- import { packageMetadata as mt } from "../package-metadata.mjs";
15
- import { getItemValue as ft, areSame as Ie, isPresent as vt } from "../common/utils.mjs";
16
- import { useDropdownWidth as gt } from "./useDropdownWidth.mjs";
17
- import { ListNoData as bt } from "./ListNoData.mjs";
18
- import { clear as Se, messages as re, nodata as G } from "../messages/index.mjs";
19
- import { FloatingLabel as ht } from "@progress/kendo-react-labels";
20
- import Me from "../common/ListFilter.mjs";
21
- import { Button as yt } from "@progress/kendo-react-buttons";
22
- import { xIcon as Et, caretAltDownIcon as Ct } from "@progress/kendo-svg-icons";
23
- import { AdaptiveMode as kt } from "../common/AdaptiveMode.mjs";
24
- import { ActionSheetContent as xt } from "@progress/kendo-react-layout";
25
- const { sizeMap: wt, roundedMap: Ft } = ut, Dt = "Please select a value from the list!", It = (E) => /* @__PURE__ */ t.createElement("span", { className: "k-input-value-text" }, E.children), Re = (E) => E.split("_").map((D) => parseInt(D, 10)), St = (E, D) => {
26
- const { validationMessage: U, valid: r, required: a } = E;
10
+ import { createPropsContext as nt, validatePackage as ot, usePropsContext as at, useId as rt, getTabIndex as it, ZIndexContext as Fe, useRtl as lt, useAdaptiveModeContext as st, canUseDOM as ct, Keys as c, noop as $, mapTree as ut, extendDataItem as dt, classNames as ae, IconWrap as Ie, WatermarkOverlay as pt, kendoThemeMaps as mt } from "@progress/kendo-react-common";
11
+ import { Popup as ft } from "@progress/kendo-react-popup";
12
+ import { useLocalization as vt } from "@progress/kendo-react-intl";
13
+ import { TreeView as Se } from "@progress/kendo-react-treeview";
14
+ import { packageMetadata as gt } from "../package-metadata.mjs";
15
+ import { getItemValue as bt, areSame as Re, isPresent as ht } from "../common/utils.mjs";
16
+ import { useDropdownWidth as Et } from "./useDropdownWidth.mjs";
17
+ import { ListNoData as yt } from "./ListNoData.mjs";
18
+ import { clear as Te, messages as re, nodata as U } from "../messages/index.mjs";
19
+ import { FloatingLabel as Ct } from "@progress/kendo-react-labels";
20
+ import Ne from "../common/ListFilter.mjs";
21
+ import { Button as kt } from "@progress/kendo-react-buttons";
22
+ import { xIcon as xt, caretAltDownIcon as wt } from "@progress/kendo-svg-icons";
23
+ import { AdaptiveMode as Dt } from "../common/AdaptiveMode.mjs";
24
+ import { ActionSheetContent as Ft } from "@progress/kendo-react-layout";
25
+ const { sizeMap: It, roundedMap: St } = mt, Rt = 12e3, Tt = 2e3, Nt = "Please select a value from the list!", Pt = (y) => /* @__PURE__ */ t.createElement("span", { className: "k-input-value-text" }, y.children), Pe = (y) => y.split("_").map((F) => parseInt(F, 10)), Mt = (y, F) => {
26
+ const { validationMessage: X, valid: r, required: a } = y;
27
27
  return {
28
- customError: U !== void 0,
29
- valid: !!(r !== void 0 ? r : !a || D),
30
- valueMissing: !D
28
+ customError: X !== void 0,
29
+ valid: !!(r !== void 0 ? r : !a || F),
30
+ valueMissing: !F
31
31
  };
32
32
  }, ie = {
33
33
  selectField: "selected",
@@ -44,64 +44,64 @@ const { sizeMap: wt, roundedMap: Ft } = ut, Dt = "Please select a value from the
44
44
  size: "medium",
45
45
  rounded: "medium",
46
46
  fillMode: "solid"
47
- }, Mt = Ze(), Te = t.forwardRef((E, D) => {
48
- const U = !et(mt, { component: "DropDownTree" }), r = tt(Mt, E), a = {
47
+ }, Ot = nt(), Me = t.forwardRef((y, F) => {
48
+ const X = !ot(gt, { component: "DropDownTree" }), r = at(Ot, y), a = {
49
49
  ...ie,
50
50
  ...r
51
- }, Ne = nt(), le = a.id || Ne, {
52
- data: T,
53
- dataItemKey: N,
51
+ }, Oe = rt(), le = a.id || Oe, {
52
+ data: N,
53
+ dataItemKey: P,
54
54
  popupSettings: b = {},
55
- style: P,
55
+ style: M,
56
56
  opened: u,
57
57
  disabled: I,
58
- onOpen: V = j,
59
- onClose: m = j,
60
- placeholder: J,
61
- label: O,
62
- name: Pe,
58
+ onOpen: O = $,
59
+ onClose: m = $,
60
+ placeholder: j,
61
+ label: V,
62
+ name: Ve,
63
63
  selectField: z,
64
- subItemsField: K,
64
+ subItemsField: W,
65
65
  validationMessage: H,
66
- valid: Ve,
67
- required: Q,
68
- validityStyles: Oe
69
- } = a, X = ot(a.tabIndex, I), i = t.useRef(null), f = t.useRef(null), S = t.useRef(null), Y = t.useRef(null), $ = t.useRef(null), h = t.useRef(null), _ = t.useRef(!1), [se, Ke] = t.useState(void 0), C = a.value !== void 0, v = C ? a.value : se !== void 0 ? se : a.defaultValue, L = vt(v), Z = L ? ft(v, a.textField) : "", ee = St({ validationMessage: H, valid: Ve, required: Q }, L), Le = t.useCallback(() => f.current && f.current.focus(), []);
66
+ valid: We,
67
+ required: G,
68
+ validityStyles: Le
69
+ } = a, J = it(a.tabIndex, I), i = t.useRef(null), f = t.useRef(null), S = t.useRef(null), Q = t.useRef(null), _ = t.useRef(null), h = t.useRef(null), Z = t.useRef(!1), [se, Ke] = t.useState(void 0), C = a.value !== void 0, v = C ? a.value : se !== void 0 ? se : a.defaultValue, L = ht(v), Y = L ? bt(v, a.textField) : "", ee = Mt({ validationMessage: H, valid: We, required: G }, L), ce = t.useContext(Fe), Be = ce ? ce + Tt : Rt, qe = t.useCallback(() => f.current && f.current.focus(), []);
70
70
  t.useImperativeHandle(i, () => ({
71
71
  props: a,
72
72
  element: f.current,
73
- focus: Le
74
- })), t.useImperativeHandle(D, () => i.current);
75
- const k = at(f, a.dir), We = {
76
- width: gt(
73
+ focus: qe
74
+ })), t.useImperativeHandle(F, () => i.current);
75
+ const k = lt(f, a.dir), Ae = {
76
+ width: Et(
77
77
  f,
78
78
  ie,
79
79
  { ...ie.popupSettings, ...b },
80
- P
80
+ M
81
81
  ),
82
82
  ...k !== void 0 ? { direction: k } : {}
83
- }, [Be, ce] = t.useState(!1), l = u !== void 0 ? u : Be, [d, te] = t.useState(!1), [ne, qe] = t.useState(), [ue, Ae] = t.useState(""), de = rt(), x = !!(ne && de && ne <= de.medium && a.adaptive), ze = t.useCallback(() => {
84
- $.current && $.current.setCustomValidity && $.current.setCustomValidity(
85
- ee.valid ? "" : H === void 0 ? Dt : H
83
+ }, [ze, ue] = t.useState(!1), l = u !== void 0 ? u : ze, [d, te] = t.useState(!1), [ne, He] = t.useState(), [de, _e] = t.useState(""), pe = st(), x = !!(ne && pe && ne <= pe.medium && a.adaptive), Ze = t.useCallback(() => {
84
+ _.current && _.current.setCustomValidity && _.current.setCustomValidity(
85
+ ee.valid ? "" : H === void 0 ? Nt : H
86
86
  );
87
87
  }, [H, ee]);
88
- t.useEffect(ze), t.useEffect(() => {
89
- const e = it && window.ResizeObserver && new window.ResizeObserver(Xe.bind(void 0));
88
+ t.useEffect(Ze), t.useEffect(() => {
89
+ const e = ct && window.ResizeObserver && new window.ResizeObserver(et.bind(void 0));
90
90
  return document != null && document.body && e && e.observe(document.body), () => {
91
91
  document != null && document.body && e && e.disconnect();
92
92
  };
93
93
  }, []);
94
- const pe = t.useCallback(
94
+ const me = t.useCallback(
95
95
  (e) => {
96
96
  if (!l) {
97
- if (V) {
97
+ if (O) {
98
98
  const o = { ...e };
99
- V.call(void 0, o);
99
+ O.call(void 0, o);
100
100
  }
101
- u === void 0 && ce(!0);
101
+ u === void 0 && ue(!0);
102
102
  }
103
103
  },
104
- [l, u, V]
104
+ [l, u, O]
105
105
  ), w = t.useCallback(
106
106
  (e) => {
107
107
  if (l) {
@@ -109,14 +109,14 @@ const { sizeMap: wt, roundedMap: Ft } = ut, Dt = "Please select a value from the
109
109
  const o = { ...e };
110
110
  m.call(void 0, o);
111
111
  }
112
- u === void 0 && (ce(!1), x && setTimeout(() => {
112
+ u === void 0 && (ue(!1), x && setTimeout(() => {
113
113
  var o;
114
- g((o = Y.current) == null ? void 0 : o.element);
114
+ g((o = Q.current) == null ? void 0 : o.element);
115
115
  }, 300));
116
116
  }
117
117
  },
118
118
  [l, u, m, x]
119
- ), He = t.useCallback(
119
+ ), $e = t.useCallback(
120
120
  (e) => {
121
121
  if (!e.isDefaultPrevented() && i.current) {
122
122
  te(!0);
@@ -125,48 +125,48 @@ const { sizeMap: wt, roundedMap: Ft } = ut, Dt = "Please select a value from the
125
125
  nativeEvent: e.nativeEvent,
126
126
  target: i.current
127
127
  };
128
- (l ? w : pe)(o);
128
+ (l ? w : me)(o);
129
129
  }
130
130
  },
131
- [l, u, V, m]
132
- ), M = t.useCallback((e) => {
133
- _.current = !0, e(), window.setTimeout(() => _.current = !1, 0);
134
- }, []), $e = t.useCallback(
131
+ [l, u, O, m]
132
+ ), R = t.useCallback((e) => {
133
+ Z.current = !0, e(), window.setTimeout(() => Z.current = !1, 0);
134
+ }, []), Ue = t.useCallback(
135
135
  (e) => {
136
- var F, xe;
136
+ var D, we;
137
137
  const { keyCode: o, altKey: s } = e, p = h.current && h.current.element;
138
- if (!i.current || e.isDefaultPrevented() && ((F = S.current) == null ? void 0 : F.element) === e.target)
138
+ if (!i.current || e.isDefaultPrevented() && ((D = S.current) == null ? void 0 : D.element) === e.target)
139
139
  return;
140
- const R = {
140
+ const T = {
141
141
  syntheticEvent: e,
142
142
  nativeEvent: e.nativeEvent,
143
143
  target: i.current
144
144
  };
145
145
  if (l)
146
146
  if (o === c.esc || s && o === c.up)
147
- e.preventDefault(), w(R);
147
+ e.preventDefault(), w(T);
148
148
  else if (p && p.querySelector(".k-focus") && (o === c.up || o === c.down || o === c.left || o === c.right || o === c.home || o === c.end)) {
149
- if (o === c.up && ((xe = S.current) != null && xe.element)) {
150
- const q = Array.from(p.querySelectorAll(".k-treeview-item")), we = [...q].reverse().find((A) => !!(A && A.querySelector(".k-focus")));
151
- if (we && q.indexOf(we) === 0)
152
- return M(() => {
149
+ if (o === c.up && ((we = S.current) != null && we.element)) {
150
+ const q = Array.from(p.querySelectorAll(".k-treeview-item")), De = [...q].reverse().find((A) => !!(A && A.querySelector(".k-focus")));
151
+ if (De && q.indexOf(De) === 0)
152
+ return R(() => {
153
153
  var A;
154
154
  g((A = S.current) == null ? void 0 : A.element);
155
155
  });
156
156
  }
157
- M(j);
157
+ R($);
158
158
  } else
159
- o === c.down && M(() => {
159
+ o === c.down && R(() => {
160
160
  var q;
161
161
  g(((q = S.current) == null ? void 0 : q.element) || p);
162
162
  });
163
163
  else
164
- s && o === c.down ? (e.preventDefault(), pe(R)) : l || o === c.esc && ge(e);
164
+ s && o === c.down ? (e.preventDefault(), me(T)) : l || o === c.esc && be(e);
165
165
  },
166
- [l, u, V, m]
167
- ), me = t.useCallback((e) => {
166
+ [l, u, O, m]
167
+ ), fe = t.useCallback((e) => {
168
168
  const { keyCode: o, altKey: s } = e;
169
- s || o !== c.up && o !== c.down || (e.preventDefault(), M(
169
+ s || o !== c.up && o !== c.down || (e.preventDefault(), R(
170
170
  o === c.up ? () => {
171
171
  g(f.current);
172
172
  } : () => {
@@ -174,15 +174,15 @@ const { sizeMap: wt, roundedMap: Ft } = ut, Dt = "Please select a value from the
174
174
  }
175
175
  ));
176
176
  }, []), g = t.useCallback((e) => {
177
- e && M(() => e.focus());
178
- }, []), _e = t.useCallback(() => {
177
+ e && R(() => e.focus());
178
+ }, []), Xe = t.useCallback(() => {
179
179
  var e;
180
180
  !d && l && !u ? w({ target: i.current }) : r.filterable ? g((e = S.current) == null ? void 0 : e.element) : g(h.current && h.current.element);
181
181
  }, [m, r.filterable, d, u, l]), je = t.useCallback(() => {
182
182
  d && g(f.current);
183
183
  }, [d]), Ge = t.useCallback(
184
184
  (e) => {
185
- if (!d && !_.current && (te(!0), r.onFocus && i.current)) {
185
+ if (!d && !Z.current && (te(!0), r.onFocus && i.current)) {
186
186
  const o = {
187
187
  syntheticEvent: e,
188
188
  nativeEvent: e.nativeEvent,
@@ -192,9 +192,9 @@ const { sizeMap: wt, roundedMap: Ft } = ut, Dt = "Please select a value from the
192
192
  }
193
193
  },
194
194
  [d, r.onFocus]
195
- ), Ue = t.useCallback(
195
+ ), Je = t.useCallback(
196
196
  (e) => {
197
- if (d && !_.current && i.current) {
197
+ if (d && !Z.current && i.current) {
198
198
  te(!1);
199
199
  const o = {
200
200
  syntheticEvent: e,
@@ -209,17 +209,17 @@ const { sizeMap: wt, roundedMap: Ft } = ut, Dt = "Please select a value from the
209
209
  }
210
210
  },
211
211
  [d, r.onBlur, l, u, m]
212
- ), Je = t.useCallback(() => {
213
- d && M(j), x && setTimeout(() => {
212
+ ), Qe = t.useCallback(() => {
213
+ d && R($), x && setTimeout(() => {
214
214
  var e;
215
- g((e = Y.current) == null ? void 0 : e.element);
215
+ g((e = Q.current) == null ? void 0 : e.element);
216
216
  }, 300);
217
- }, [d, x]), fe = t.useCallback(
217
+ }, [d, x]), ve = t.useCallback(
218
218
  (e, o, s) => {
219
219
  if (r.onChange) {
220
220
  const p = {
221
221
  value: o,
222
- level: s ? Re(s) : [],
222
+ level: s ? Pe(s) : [],
223
223
  ...e
224
224
  };
225
225
  r.onChange.call(void 0, p);
@@ -227,19 +227,19 @@ const { sizeMap: wt, roundedMap: Ft } = ut, Dt = "Please select a value from the
227
227
  C || Ke(o);
228
228
  },
229
229
  [r.onChange, C]
230
- ), ve = t.useCallback(
230
+ ), ge = t.useCallback(
231
231
  (e) => {
232
- if (Ie(e.item, v, N) || !i.current)
232
+ if (Re(e.item, v, P) || !i.current)
233
233
  return;
234
- const { item: o, itemHierarchicalIndex: s, nativeEvent: p, syntheticEvent: R } = e, F = {
235
- syntheticEvent: R,
234
+ const { item: o, itemHierarchicalIndex: s, nativeEvent: p, syntheticEvent: T } = e, D = {
235
+ syntheticEvent: T,
236
236
  nativeEvent: p,
237
237
  target: i.current
238
238
  };
239
- fe(F, o, s), w(F);
239
+ ve(D, o, s), w(D);
240
240
  },
241
- [C, v, r.onChange, N, l, u, m]
242
- ), ge = t.useCallback(
241
+ [C, v, r.onChange, P, l, u, m]
242
+ ), be = t.useCallback(
243
243
  (e) => {
244
244
  if (!i.current)
245
245
  return;
@@ -248,24 +248,24 @@ const { sizeMap: wt, roundedMap: Ft } = ut, Dt = "Please select a value from the
248
248
  nativeEvent: e.nativeEvent,
249
249
  target: i.current
250
250
  };
251
- fe(o, null), w(o), e.preventDefault();
251
+ ve(o, null), w(o), e.preventDefault();
252
252
  },
253
253
  [C, r.onChange, l, u, m]
254
- ), be = t.useCallback(
254
+ ), he = t.useCallback(
255
255
  (e) => {
256
256
  if (e.syntheticEvent.stopPropagation(), r.onExpandChange && i.current) {
257
- const { item: o, itemHierarchicalIndex: s, nativeEvent: p, syntheticEvent: R } = e, F = {
258
- level: Re(s),
257
+ const { item: o, itemHierarchicalIndex: s, nativeEvent: p, syntheticEvent: T } = e, D = {
258
+ level: Pe(s),
259
259
  item: o,
260
260
  nativeEvent: p,
261
- syntheticEvent: R,
261
+ syntheticEvent: T,
262
262
  target: i.current
263
263
  };
264
- r.onExpandChange.call(void 0, F);
264
+ r.onExpandChange.call(void 0, D);
265
265
  }
266
266
  },
267
267
  [r.onExpandChange]
268
- ), he = t.useCallback(
268
+ ), Ee = t.useCallback(
269
269
  (e) => {
270
270
  if (r.onFilterChange && i.current) {
271
271
  const s = {
@@ -278,20 +278,20 @@ const { sizeMap: wt, roundedMap: Ft } = ut, Dt = "Please select a value from the
278
278
  nativeEvent: e.nativeEvent,
279
279
  target: i.current
280
280
  };
281
- r.onFilterChange.call(void 0, s), r.filter === void 0 && Ae(e.target.value);
281
+ r.onFilterChange.call(void 0, s), r.filter === void 0 && _e(e.target.value);
282
282
  }
283
283
  },
284
284
  [r.onFilterChange, r.filter, r.textField]
285
- ), Qe = () => {
285
+ ), Ye = () => {
286
286
  const e = a.filterable ? /* @__PURE__ */ t.createElement(
287
- Me,
287
+ Ne,
288
288
  {
289
- value: a.filter === void 0 ? ue : a.filter,
290
- ref: Y,
291
- onChange: he,
292
- onKeyDown: me,
293
- size: y,
294
- rounded: W,
289
+ value: a.filter === void 0 ? de : a.filter,
290
+ ref: Q,
291
+ onChange: Ee,
292
+ onKeyDown: fe,
293
+ size: E,
294
+ rounded: K,
295
295
  fillMode: B
296
296
  }
297
297
  ) : null, o = {
@@ -301,172 +301,172 @@ const { sizeMap: wt, roundedMap: Ft } = ut, Dt = "Please select a value from the
301
301
  windowWidth: ne,
302
302
  mobileFilter: e
303
303
  };
304
- return /* @__PURE__ */ t.createElement(kt, { ...o }, /* @__PURE__ */ t.createElement(xt, { overflowHidden: !0 }, /* @__PURE__ */ t.createElement("div", { className: "k-list-container" }, /* @__PURE__ */ t.createElement("div", { className: "k-list k-list-lg" }, T.length > 0 ? /* @__PURE__ */ t.createElement(
305
- De,
304
+ return /* @__PURE__ */ t.createElement(Dt, { ...o }, /* @__PURE__ */ t.createElement(Ft, { overflowHidden: !0 }, /* @__PURE__ */ t.createElement("div", { className: "k-list-container" }, /* @__PURE__ */ t.createElement("div", { className: "k-list k-list-lg" }, N.length > 0 ? /* @__PURE__ */ t.createElement(
305
+ Se,
306
306
  {
307
307
  ref: h,
308
- tabIndex: X,
308
+ tabIndex: J,
309
309
  data: ye,
310
- focusIdField: N,
310
+ focusIdField: P,
311
311
  textField: a.textField,
312
312
  selectField: z,
313
313
  expandField: a.expandField,
314
- childrenField: K,
314
+ childrenField: W,
315
315
  expandIcons: !0,
316
- onItemClick: ve,
317
- onExpandChange: be,
318
- size: y,
316
+ onItemClick: ge,
317
+ onExpandChange: he,
318
+ size: E,
319
319
  item: a.item,
320
320
  dir: k,
321
321
  animate: b.animate
322
322
  }
323
- ) : /* @__PURE__ */ t.createElement(Ee, null, oe.toLanguageString(G, re[G]))))));
324
- }, Xe = t.useCallback((e) => {
323
+ ) : /* @__PURE__ */ t.createElement(Ce, null, oe.toLanguageString(U, re[U]))))));
324
+ }, et = t.useCallback((e) => {
325
325
  for (const o of e)
326
- qe(o.target.clientWidth);
327
- }, []), ye = t.useMemo(() => C || !L ? T : lt(
328
- T,
329
- K,
330
- (e) => st(e, K, { [z]: Ie(e, v, N) })
331
- ), [T, v, C, L, z, K]), Ee = a.listNoData || bt, Ye = a.valueHolder || It, oe = pt(), Ce = !Oe || ee.valid, { size: y, rounded: W, fillMode: B } = a, ke = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
326
+ He(o.target.clientWidth);
327
+ }, []), ye = t.useMemo(() => C || !L ? N : ut(
328
+ N,
329
+ W,
330
+ (e) => dt(e, W, { [z]: Re(e, v, P) })
331
+ ), [N, v, C, L, z, W]), Ce = a.listNoData || yt, tt = a.valueHolder || Pt, oe = vt(), ke = !Le || ee.valid, { size: E, rounded: K, fillMode: B } = a, xe = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
332
332
  "span",
333
333
  {
334
334
  className: ae("k-dropdowntree k-picker", a.className, {
335
- [`k-picker-${wt[y] || y}`]: y,
336
- [`k-rounded-${Ft[W] || W}`]: W,
335
+ [`k-picker-${It[E] || E}`]: E,
336
+ [`k-rounded-${St[K] || K}`]: K,
337
337
  [`k-picker-${B}`]: B,
338
338
  "k-focus": d,
339
- "k-invalid": !Ce,
339
+ "k-invalid": !ke,
340
340
  "k-loading": a.loading,
341
- "k-required": Q,
341
+ "k-required": G,
342
342
  "k-disabled": a.disabled
343
343
  }),
344
- tabIndex: X,
344
+ tabIndex: J,
345
345
  accessKey: a.accessKey,
346
346
  id: le,
347
- style: O ? { ...P, width: void 0 } : P,
347
+ style: V ? { ...M, width: void 0 } : M,
348
348
  dir: k,
349
349
  ref: f,
350
- onKeyDown: I ? void 0 : $e,
351
- onMouseDown: Je,
352
- onClick: I ? void 0 : He,
350
+ onKeyDown: I ? void 0 : Ue,
351
+ onMouseDown: Qe,
352
+ onClick: I ? void 0 : $e,
353
353
  onFocus: Ge,
354
- onBlur: Ue,
354
+ onBlur: Je,
355
355
  role: "combobox",
356
356
  "aria-haspopup": "tree",
357
357
  "aria-expanded": l,
358
358
  "aria-disabled": I,
359
- "aria-label": O,
359
+ "aria-label": V,
360
360
  "aria-labelledby": a.ariaLabelledBy,
361
361
  "aria-describedby": a.ariaDescribedBy,
362
- "aria-required": Q
362
+ "aria-required": G
363
363
  },
364
- /* @__PURE__ */ t.createElement("span", { className: "k-input-inner" }, (Z || J) && /* @__PURE__ */ t.createElement(Ye, { item: v }, Z || J)),
365
- a.loading && /* @__PURE__ */ t.createElement(Fe, { className: "k-input-loading-icon", name: "loading" }),
364
+ /* @__PURE__ */ t.createElement("span", { className: "k-input-inner" }, (Y || j) && /* @__PURE__ */ t.createElement(tt, { item: v }, Y || j)),
365
+ a.loading && /* @__PURE__ */ t.createElement(Ie, { className: "k-input-loading-icon", name: "loading" }),
366
366
  L && !I && /* @__PURE__ */ t.createElement(
367
367
  "span",
368
368
  {
369
- onClick: ge,
369
+ onClick: be,
370
370
  className: "k-clear-value",
371
- title: oe.toLanguageString(Se, re[Se]),
371
+ title: oe.toLanguageString(Te, re[Te]),
372
372
  role: "button",
373
373
  tabIndex: -1,
374
374
  onMouseDown: (e) => e.preventDefault()
375
375
  },
376
- /* @__PURE__ */ t.createElement(Fe, { name: "x", icon: Et })
376
+ /* @__PURE__ */ t.createElement(Ie, { name: "x", icon: xt })
377
377
  ),
378
378
  /* @__PURE__ */ t.createElement(
379
- yt,
379
+ kt,
380
380
  {
381
381
  tabIndex: -1,
382
382
  type: "button",
383
383
  "aria-label": "select",
384
384
  className: "k-input-button",
385
- size: y,
385
+ size: E,
386
386
  fillMode: B,
387
387
  themeColor: "base",
388
388
  rounded: null,
389
389
  icon: "caret-alt-down",
390
- svgIcon: Ct
390
+ svgIcon: wt
391
391
  }
392
392
  ),
393
393
  /* @__PURE__ */ t.createElement(
394
394
  "select",
395
395
  {
396
- name: Pe,
397
- ref: $,
396
+ name: Ve,
397
+ ref: _,
398
398
  tabIndex: -1,
399
399
  "aria-hidden": !0,
400
- title: O,
400
+ title: V,
401
401
  style: { opacity: 0, width: 1, border: 0, zIndex: -1, position: "absolute", left: "50%" }
402
402
  },
403
403
  /* @__PURE__ */ t.createElement("option", { value: a.valueMap ? a.valueMap.call(void 0, v) : v })
404
404
  ),
405
- !x && /* @__PURE__ */ t.createElement(
406
- dt,
405
+ !x && /* @__PURE__ */ t.createElement(Fe.Provider, { value: Be }, /* @__PURE__ */ t.createElement(
406
+ ft,
407
407
  {
408
408
  ...b,
409
409
  className: ae(b.className, { "k-rtl": k === "rtl" }),
410
410
  popupClass: ae(b.popupClass, "k-dropdowntree-popup k-list-container"),
411
- style: We,
411
+ style: Ae,
412
412
  anchor: b.anchor || f.current,
413
413
  show: l,
414
- onOpen: _e,
414
+ onOpen: Xe,
415
415
  onClose: je
416
416
  },
417
417
  a.filterable && /* @__PURE__ */ t.createElement(
418
- Me,
418
+ Ne,
419
419
  {
420
- value: a.filter === void 0 ? ue : a.filter,
420
+ value: a.filter === void 0 ? de : a.filter,
421
421
  ref: S,
422
- onChange: he,
423
- onKeyDown: me,
424
- size: y,
425
- rounded: W,
422
+ onChange: Ee,
423
+ onKeyDown: fe,
424
+ size: E,
425
+ rounded: K,
426
426
  fillMode: B,
427
427
  renderListFilterWrapper: !0,
428
428
  renderPrefixSeparator: !0
429
429
  }
430
430
  ),
431
- T.length > 0 ? /* @__PURE__ */ t.createElement(
432
- De,
431
+ N.length > 0 ? /* @__PURE__ */ t.createElement(
432
+ Se,
433
433
  {
434
434
  style: { height: b.height },
435
435
  ref: h,
436
- tabIndex: X,
436
+ tabIndex: J,
437
437
  data: ye,
438
- focusIdField: N,
438
+ focusIdField: P,
439
439
  textField: a.textField,
440
440
  selectField: z,
441
441
  expandField: a.expandField,
442
- childrenField: K,
442
+ childrenField: W,
443
443
  expandIcons: !0,
444
- onItemClick: ve,
445
- onExpandChange: be,
446
- size: y,
444
+ onItemClick: ge,
445
+ onExpandChange: he,
446
+ size: E,
447
447
  item: a.item,
448
448
  dir: k,
449
449
  animate: b.animate
450
450
  }
451
- ) : /* @__PURE__ */ t.createElement(Ee, null, oe.toLanguageString(G, re[G])),
452
- U && /* @__PURE__ */ t.createElement(ct, null)
453
- )
454
- ), x && Qe());
455
- return O ? /* @__PURE__ */ t.createElement(
456
- ht,
451
+ ) : /* @__PURE__ */ t.createElement(Ce, null, oe.toLanguageString(U, re[U])),
452
+ X && /* @__PURE__ */ t.createElement(pt, null)
453
+ ))
454
+ ), x && Ye());
455
+ return V ? /* @__PURE__ */ t.createElement(
456
+ Ct,
457
457
  {
458
- label: O,
459
- editorValue: Z,
460
- editorPlaceholder: J,
461
- editorValid: Ce,
458
+ label: V,
459
+ editorValue: Y,
460
+ editorPlaceholder: j,
461
+ editorValid: ke,
462
462
  editorDisabled: I,
463
463
  editorId: le,
464
- style: { width: P ? P.width : void 0 },
465
- children: ke,
464
+ style: { width: M ? M.width : void 0 },
465
+ children: xe,
466
466
  dir: k
467
467
  }
468
- ) : ke;
469
- }), Rt = {
468
+ ) : xe;
469
+ }), Vt = {
470
470
  opened: n.bool,
471
471
  disabled: n.bool,
472
472
  dir: n.string,
@@ -522,9 +522,9 @@ const { sizeMap: wt, roundedMap: Ft } = ut, Dt = "Please select a value from the
522
522
  adaptiveTitle: n.string,
523
523
  adaptive: n.bool
524
524
  };
525
- Te.displayName = "KendoReactDropDownTree";
526
- Te.propTypes = Rt;
525
+ Me.displayName = "KendoReactDropDownTree";
526
+ Me.propTypes = Vt;
527
527
  export {
528
- Te as DropDownTree,
529
- Mt as DropDownTreePropsContext
528
+ Me as DropDownTree,
529
+ Ot as DropDownTreePropsContext
530
530
  };
@@ -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 strict";const i=require("react"),s=require("@progress/kendo-react-popup");function u(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const a=u(i),p=e=>{const{children:n,width:t,dir:r,itemsCount:o,popupSettings:c}=e;return a.createElement(s.Popup,{style:{width:t,direction:r},contentKey:o&&o.join(),...c},n)};module.exports=p;
8
+ "use strict";const d=require("react"),l=require("@progress/kendo-react-popup"),s=require("@progress/kendo-react-common");function p(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const r=p(d),f=12e3,m=2e3,x=e=>{const{children:n,width:t,dir:o,itemsCount:c,popupSettings:u}=e,i=r.useContext(s.ZIndexContext),a=i?i+m:f;return r.createElement(s.ZIndexContext.Provider,{value:a},r.createElement(l.Popup,{style:{width:t,direction:o},contentKey:c&&c.join(),...u},n))};module.exports=x;