@progress/kendo-react-dropdowns 9.5.0 → 10.0.0-develop.1

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 it, usePropsContext as rt, validatePackage as ot, useId as lt, getTabIndex as st, useRtl as ct, useAdaptiveModeContext as ut, canUseDOM as dt, noop as Z, Keys as o, classNames as ee, IconWrap as pt, kendoThemeMaps as ft } from "@progress/kendo-react-common";
11
- import { Popup as mt } from "@progress/kendo-react-popup";
12
- import { useLocalization as gt } from "@progress/kendo-react-intl";
13
- import { TreeView as Te } from "@progress/kendo-react-treeview";
14
- import { packageMetadata as vt } from "../package-metadata.mjs";
15
- import { getItemValue as ht, areSame as bt, matchTags as De } from "../common/utils.mjs";
16
- import { useDropdownWidth as yt } from "../DropDownTree/useDropdownWidth.mjs";
17
- import { ListNoData as Ct } from "../DropDownTree/ListNoData.mjs";
18
- import { nodata as te, messages as ne, adaptiveModeFooterCancel as Re, adaptiveModeFooterApply as Me } from "../messages/index.mjs";
19
- import { FloatingLabel as Et } from "@progress/kendo-react-labels";
20
- import kt from "../MultiSelect/TagList.mjs";
21
- import Ft from "../common/ClearButton.mjs";
22
- import Ne from "../common/ListFilter.mjs";
23
- import { AdaptiveMode as xt } from "../common/AdaptiveMode.mjs";
24
- import { ActionSheetContent as St } from "@progress/kendo-react-layout";
25
- const wt = "Please select a value from the list!", { sizeMap: Pe, roundedMap: It } = ft, Tt = (O) => O.split("_").map((R) => parseInt(R, 10)), Dt = (O, R) => {
26
- const { validationMessage: a, valid: V, required: x } = O;
10
+ import { createPropsContext as it, usePropsContext as ot, validatePackage as lt, useId as st, getTabIndex as ct, useRtl as ut, useAdaptiveModeContext as dt, canUseDOM as pt, noop as Z, Keys as o, classNames as ee, IconWrap as ft, WatermarkOverlay as mt, kendoThemeMaps as gt } from "@progress/kendo-react-common";
11
+ import { Popup as vt } from "@progress/kendo-react-popup";
12
+ import { useLocalization as ht } from "@progress/kendo-react-intl";
13
+ import { TreeView as De } from "@progress/kendo-react-treeview";
14
+ import { packageMetadata as bt } from "../package-metadata.mjs";
15
+ import { getItemValue as yt, areSame as Ct, matchTags as Me } from "../common/utils.mjs";
16
+ import { useDropdownWidth as kt } from "../DropDownTree/useDropdownWidth.mjs";
17
+ import { ListNoData as Et } from "../DropDownTree/ListNoData.mjs";
18
+ import { nodata as te, messages as ne, adaptiveModeFooterCancel as Re, adaptiveModeFooterApply as Ne } from "../messages/index.mjs";
19
+ import { FloatingLabel as Ft } from "@progress/kendo-react-labels";
20
+ import xt from "../MultiSelect/TagList.mjs";
21
+ import St from "../common/ClearButton.mjs";
22
+ import Pe from "../common/ListFilter.mjs";
23
+ import { AdaptiveMode as wt } from "../common/AdaptiveMode.mjs";
24
+ import { ActionSheetContent as It } from "@progress/kendo-react-layout";
25
+ const Tt = "Please select a value from the list!", { sizeMap: Oe, roundedMap: Dt } = gt, Mt = (P) => P.split("_").map((D) => parseInt(D, 10)), Rt = (P, D) => {
26
+ const { validationMessage: a, valid: V, required: ae } = P;
27
27
  return {
28
28
  customError: a !== void 0,
29
- valid: !!(V !== void 0 ? V : !x || R),
30
- valueMissing: !R
29
+ valid: !!(V !== void 0 ? V : !ae || D),
30
+ valueMissing: !D
31
31
  };
32
32
  }, y = {
33
33
  checkField: "checkField",
@@ -43,53 +43,51 @@ const wt = "Please select a value from the list!", { sizeMap: Pe, roundedMap: It
43
43
  fillMode: "solid",
44
44
  required: !1,
45
45
  validityStyles: !0
46
- }, Rt = it(), Oe = t.forwardRef(
47
- (O, R) => {
48
- const a = rt(Rt, O);
49
- ot(vt);
50
- const V = lt(), x = a.id || V, {
51
- data: q = [],
52
- dataItemKey: S,
46
+ }, Nt = it(), Le = t.forwardRef(
47
+ (P, D) => {
48
+ const a = ot(Nt, P), V = !lt(bt, { component: "MultiSelectTree" }), ae = st(), O = a.id || ae, {
49
+ data: W = [],
50
+ dataItemKey: x,
53
51
  style: L = {},
54
- placeholder: de,
52
+ placeholder: pe,
55
53
  label: B,
56
- name: Le,
57
- validationMessage: A,
58
- valid: Be,
59
- tags: pe,
54
+ name: Be,
55
+ validationMessage: q,
56
+ valid: Ke,
57
+ tags: fe,
60
58
  value: m,
61
- opened: w,
62
- disabled: E,
59
+ opened: S,
60
+ disabled: k,
63
61
  popupSettings: M = y.popupSettings,
64
- checkField: fe = y.checkField,
65
- checkIndeterminateField: me = y.checkIndeterminateField,
66
- subItemsField: ge = y.subItemsField,
62
+ checkField: me = y.checkField,
63
+ checkIndeterminateField: ge = y.checkIndeterminateField,
64
+ subItemsField: ve = y.subItemsField,
67
65
  size: v = y.size,
68
66
  rounded: K = y.rounded,
69
- fillMode: W = y.fillMode,
70
- required: ve = y.required,
71
- validityStyles: Ke = y.validityStyles,
72
- onOpen: ae = Z,
67
+ fillMode: A = y.fillMode,
68
+ required: he = y.required,
69
+ validityStyles: Ve = y.validityStyles,
70
+ onOpen: re = Z,
73
71
  onClose: z = Z
74
- } = a, H = st(a.tabIndex, E), l = t.useRef(null), C = t.useRef(null), I = t.useRef(null), ie = t.useRef(null), $ = t.useRef(null), k = t.useRef(null), G = t.useRef(!1), _ = t.useRef([]), j = t.useRef(null), [N, Ve] = t.useState(), [qe, he] = t.useState(!1), [d, re] = t.useState(!1), [oe, Ae] = t.useState(), [We, ze] = t.useState([]), [be, He] = t.useState(""), s = w !== void 0 ? w : qe, le = !!(Array.isArray(m) && m.length), se = Dt({ validationMessage: A, valid: Be, required: ve }, le), T = ct(C, a.dir), $e = {
75
- width: yt(C, y, M, L),
76
- ...T !== void 0 ? { direction: T } : {}
77
- }, Ge = t.useCallback(() => C.current && C.current.focus(), []), ye = ut(), P = !!(oe && ye && oe <= ye.medium && a.adaptive);
78
- _.current = pe === void 0 ? (m || []).map((e) => ({ text: ht(e, a.textField), data: [e] })) : [...pe], t.useImperativeHandle(l, () => ({
72
+ } = a, H = ct(a.tabIndex, k), l = t.useRef(null), C = t.useRef(null), w = t.useRef(null), ie = t.useRef(null), $ = t.useRef(null), E = t.useRef(null), G = t.useRef(!1), _ = t.useRef([]), j = t.useRef(null), [R, We] = t.useState(), [qe, be] = t.useState(!1), [d, oe] = t.useState(!1), [le, Ae] = t.useState(), [ze, He] = t.useState([]), [ye, $e] = t.useState(""), s = S !== void 0 ? S : qe, se = !!(Array.isArray(m) && m.length), ce = Rt({ validationMessage: q, valid: Ke, required: he }, se), I = ut(C, a.dir), Ge = {
73
+ width: kt(C, y, M, L),
74
+ ...I !== void 0 ? { direction: I } : {}
75
+ }, _e = t.useCallback(() => C.current && C.current.focus(), []), Ce = dt(), N = !!(le && Ce && le <= Ce.medium && a.adaptive);
76
+ _.current = fe === void 0 ? (m || []).map((e) => ({ text: yt(e, a.textField), data: [e] })) : [...fe], t.useImperativeHandle(l, () => ({
79
77
  props: a,
80
78
  element: C.current,
81
- focus: Ge
79
+ focus: _e
82
80
  })), t.useImperativeHandle(
83
- R,
81
+ D,
84
82
  () => l.current
85
83
  );
86
- const _e = t.useCallback(() => {
84
+ const je = t.useCallback(() => {
87
85
  $.current && $.current.setCustomValidity && $.current.setCustomValidity(
88
- se.valid ? "" : A === void 0 ? wt : A
86
+ ce.valid ? "" : q === void 0 ? Tt : q
89
87
  );
90
- }, [A, se]);
91
- t.useEffect(_e), t.useEffect(() => {
92
- const e = dt && window.ResizeObserver && new window.ResizeObserver(nt.bind(void 0));
88
+ }, [q, ce]);
89
+ t.useEffect(je), t.useEffect(() => {
90
+ const e = pt && window.ResizeObserver && new window.ResizeObserver(at.bind(void 0));
93
91
  return document != null && document.body && e && e.observe(document.body), () => {
94
92
  e && e.disconnect();
95
93
  };
@@ -97,11 +95,11 @@ const wt = "Please select a value from the list!", { sizeMap: Pe, roundedMap: It
97
95
  j.current && s && j.current.setPosition(j.current.element);
98
96
  }, [m, s]);
99
97
  const F = t.useCallback(
100
- (e, i, r) => {
98
+ (e, r, i) => {
101
99
  if (a.onChange) {
102
100
  const b = {
103
- items: i,
104
- operation: r,
101
+ items: r,
102
+ operation: i,
105
103
  ...e
106
104
  };
107
105
  a.onChange.call(void 0, b);
@@ -110,41 +108,41 @@ const wt = "Please select a value from the list!", { sizeMap: Pe, roundedMap: It
110
108
  [a.onChange]
111
109
  ), U = t.useCallback(
112
110
  (e) => {
113
- if (bt(e.item, m, S) || !l.current)
111
+ if (Ct(e.item, m, x) || !l.current)
114
112
  return;
115
- const { item: i, nativeEvent: r, syntheticEvent: b } = e, D = {
113
+ const { item: r, nativeEvent: i, syntheticEvent: b } = e, T = {
116
114
  syntheticEvent: b,
117
- nativeEvent: r,
115
+ nativeEvent: i,
118
116
  target: l.current
119
117
  };
120
- F(D, [i], "toggle");
118
+ F(T, [r], "toggle");
121
119
  },
122
- [m, S, F]
120
+ [m, x, F]
123
121
  ), J = t.useCallback(
124
122
  (e) => {
125
123
  if (!s) {
126
- if (ae) {
127
- const i = { ...e };
128
- ae.call(void 0, i);
124
+ if (re) {
125
+ const r = { ...e };
126
+ re.call(void 0, r);
129
127
  }
130
- w === void 0 && (he(!0), ze(m || []), P && setTimeout(() => {
131
- var i;
132
- u((i = ie.current) == null ? void 0 : i.element);
128
+ S === void 0 && (be(!0), He(m || []), N && setTimeout(() => {
129
+ var r;
130
+ u((r = ie.current) == null ? void 0 : r.element);
133
131
  }, 300));
134
132
  }
135
133
  },
136
- [s, w, ae, P, ie]
134
+ [s, S, re, N, ie]
137
135
  ), g = t.useCallback(
138
136
  (e) => {
139
137
  if (s) {
140
138
  if (z) {
141
- const i = { ...e };
142
- z.call(void 0, i);
139
+ const r = { ...e };
140
+ z.call(void 0, r);
143
141
  }
144
- w === void 0 && he(!1);
142
+ S === void 0 && be(!1);
145
143
  }
146
144
  },
147
- [s, w, z]
145
+ [s, S, z]
148
146
  ), h = t.useCallback((e) => {
149
147
  G.current = !0, e(), window.setTimeout(() => G.current = !1, 0);
150
148
  }, []), u = t.useCallback(
@@ -152,125 +150,125 @@ const wt = "Please select a value from the list!", { sizeMap: Pe, roundedMap: It
152
150
  e && h(() => e.focus());
153
151
  },
154
152
  [h]
155
- ), je = t.useCallback(() => {
153
+ ), Ue = t.useCallback(() => {
156
154
  var e;
157
- !d && s ? g({ target: l.current }) : a.filterable ? u((e = I.current) == null ? void 0 : e.element) : u(k.current && k.current.element);
158
- }, [d, s, u, g, a.filterable]), Ue = t.useCallback(() => {
155
+ !d && s ? g({ target: l.current }) : a.filterable ? u((e = w.current) == null ? void 0 : e.element) : u(E.current && E.current.element);
156
+ }, [d, s, u, g, a.filterable]), Je = t.useCallback(() => {
159
157
  d && u(C.current);
160
- }, [d, u]), Je = t.useCallback(
158
+ }, [d, u]), Qe = t.useCallback(
161
159
  (e) => {
162
- if (!d && !G.current && (re(!0), a.onFocus && l.current)) {
163
- const i = {
160
+ if (!d && !G.current && (oe(!0), a.onFocus && l.current)) {
161
+ const r = {
164
162
  syntheticEvent: e,
165
163
  nativeEvent: e.nativeEvent,
166
164
  target: l.current
167
165
  };
168
- a.onFocus.call(void 0, i);
166
+ a.onFocus.call(void 0, r);
169
167
  }
170
168
  },
171
169
  [d, a.onFocus]
172
- ), Qe = t.useCallback(
170
+ ), Xe = t.useCallback(
173
171
  (e) => {
174
172
  if (d && !G.current && l.current) {
175
- re(!1);
176
- const i = {
173
+ oe(!1);
174
+ const r = {
177
175
  syntheticEvent: e,
178
176
  nativeEvent: e.nativeEvent,
179
177
  target: l.current
180
178
  };
181
179
  if (a.onBlur) {
182
- const r = { ...i };
183
- a.onBlur.call(void 0, r);
180
+ const i = { ...r };
181
+ a.onBlur.call(void 0, i);
184
182
  }
185
- P || g(i);
183
+ N || g(r);
186
184
  }
187
185
  },
188
- [d, a.onBlur, s, w, z]
189
- ), Xe = t.useCallback(() => {
186
+ [d, a.onBlur, s, S, z]
187
+ ), Ye = t.useCallback(() => {
190
188
  d && h(Z);
191
- }, [d, h]), Ye = t.useCallback(
189
+ }, [d, h]), Ze = t.useCallback(
192
190
  (e) => {
193
191
  if (!e.isDefaultPrevented() && l.current) {
194
- re(!0);
195
- const i = {
192
+ oe(!0);
193
+ const r = {
196
194
  syntheticEvent: e,
197
195
  nativeEvent: e.nativeEvent,
198
196
  target: l.current
199
197
  };
200
- s || J(i);
198
+ s || J(r);
201
199
  }
202
200
  },
203
201
  [s, J]
204
- ), Ze = t.useCallback(
202
+ ), et = t.useCallback(
205
203
  (e) => {
206
- var Y, Ie;
207
- const { keyCode: i, altKey: r } = e, b = k.current && k.current.element;
208
- if (!l.current || e.isDefaultPrevented() && ((Y = I.current) == null ? void 0 : Y.element) === e.target)
204
+ var Y, Te;
205
+ const { keyCode: r, altKey: i } = e, b = E.current && E.current.element;
206
+ if (!l.current || e.isDefaultPrevented() && ((Y = w.current) == null ? void 0 : Y.element) === e.target)
209
207
  return;
210
- const D = {
208
+ const T = {
211
209
  syntheticEvent: e,
212
210
  nativeEvent: e.nativeEvent,
213
211
  target: l.current
214
212
  };
215
- if (m && m.length > 0 && (i === o.left || i === o.right || i === o.home || i === o.end || i === o.delete)) {
213
+ if (m && m.length > 0 && (r === o.left || r === o.right || r === o.home || r === o.end || r === o.delete)) {
216
214
  const c = _.current;
217
- let p = N ? c.findIndex((at) => De(at, N, S)) : -1, f;
218
- const ue = p !== -1;
219
- i === o.left ? (ue ? p = Math.max(0, p - 1) : p = c.length - 1, f = c[p]) : i === o.right ? p === c.length - 1 ? f = void 0 : ue && (p = Math.min(c.length - 1, p + 1), f = c[p]) : i === o.home ? f = c[0] : i === o.end ? f = c[c.length - 1] : i === o.delete && ue && F(D, c[p].data, "delete"), f !== N && Ve(f);
215
+ let p = R ? c.findIndex((rt) => Me(rt, R, x)) : -1, f;
216
+ const de = p !== -1;
217
+ r === o.left ? (de ? p = Math.max(0, p - 1) : p = c.length - 1, f = c[p]) : r === o.right ? p === c.length - 1 ? f = void 0 : de && (p = Math.min(c.length - 1, p + 1), f = c[p]) : r === o.home ? f = c[0] : r === o.end ? f = c[c.length - 1] : r === o.delete && de && F(T, c[p].data, "delete"), f !== R && We(f);
220
218
  }
221
219
  if (s)
222
- if (i === o.esc || r && i === o.up)
223
- e.preventDefault(), g(D);
224
- else if (b && b.querySelector(".k-focus") && (i === o.up || i === o.down || i === o.left || i === o.right || i === o.home || i === o.end)) {
225
- if (i === o.up && ((Ie = I.current) != null && Ie.element)) {
220
+ if (r === o.esc || i && r === o.up)
221
+ e.preventDefault(), g(T);
222
+ else if (b && b.querySelector(".k-focus") && (r === o.up || r === o.down || r === o.left || r === o.right || r === o.home || r === o.end)) {
223
+ if (r === o.up && ((Te = w.current) != null && Te.element)) {
226
224
  const c = Array.from(b.querySelectorAll(".k-treeview-item")), p = [...c].reverse().find((f) => !!(f && f.querySelector(".k-focus")));
227
225
  if (p && c.indexOf(p) === 0)
228
226
  return h(() => {
229
227
  var f;
230
- u((f = I.current) == null ? void 0 : f.element);
228
+ u((f = w.current) == null ? void 0 : f.element);
231
229
  });
232
230
  }
233
231
  h(Z);
234
232
  } else
235
- i === o.down && h(() => {
233
+ r === o.down && h(() => {
236
234
  var c;
237
- u(((c = I.current) == null ? void 0 : c.element) || b);
235
+ u(((c = w.current) == null ? void 0 : c.element) || b);
238
236
  });
239
237
  else
240
- r && i === o.down && (e.preventDefault(), J(D));
238
+ i && r === o.down && (e.preventDefault(), J(T));
241
239
  },
242
- [s, g, u, h, J, N, S, m, F]
243
- ), Ce = t.useCallback(
240
+ [s, g, u, h, J, R, x, m, F]
241
+ ), ke = t.useCallback(
244
242
  (e) => {
245
- const { keyCode: i, altKey: r } = e;
246
- r || i !== o.up && i !== o.down || (e.preventDefault(), h(
247
- i === o.up ? () => {
243
+ const { keyCode: r, altKey: i } = e;
244
+ i || r !== o.up && r !== o.down || (e.preventDefault(), h(
245
+ r === o.up ? () => {
248
246
  u(C.current);
249
247
  } : () => {
250
- u(k.current && k.current.element);
248
+ u(E.current && E.current.element);
251
249
  }
252
250
  ));
253
251
  },
254
252
  [u, h]
255
- ), ce = t.useCallback(
253
+ ), ue = t.useCallback(
256
254
  (e) => {
257
255
  if (!l.current)
258
256
  return;
259
- const i = {
257
+ const r = {
260
258
  syntheticEvent: e,
261
259
  nativeEvent: e.nativeEvent,
262
260
  target: l.current
263
261
  };
264
- F(i, [], "clear"), g(i), e.preventDefault();
262
+ F(r, [], "clear"), g(r), e.preventDefault();
265
263
  },
266
264
  [F, g]
267
- ), et = t.useCallback(
268
- (e, i) => {
269
- var r;
270
- g({ target: l.current }), d || u((r = I.current) == null ? void 0 : r.element), F(
265
+ ), tt = t.useCallback(
266
+ (e, r) => {
267
+ var i;
268
+ g({ target: l.current }), d || u((i = w.current) == null ? void 0 : i.element), F(
271
269
  {
272
- syntheticEvent: i,
273
- nativeEvent: i.nativeEvent,
270
+ syntheticEvent: r,
271
+ nativeEvent: r.nativeEvent,
274
272
  target: l.current
275
273
  },
276
274
  e,
@@ -281,21 +279,21 @@ const wt = "Please select a value from the list!", { sizeMap: Pe, roundedMap: It
281
279
  ), Ee = t.useCallback(
282
280
  (e) => {
283
281
  if (a.onExpandChange && l.current) {
284
- const { item: i, itemHierarchicalIndex: r, nativeEvent: b, syntheticEvent: D } = e, Y = {
285
- level: Tt(r),
286
- item: i,
282
+ const { item: r, itemHierarchicalIndex: i, nativeEvent: b, syntheticEvent: T } = e, Y = {
283
+ level: Mt(i),
284
+ item: r,
287
285
  nativeEvent: b,
288
- syntheticEvent: D,
286
+ syntheticEvent: T,
289
287
  target: l.current
290
288
  };
291
289
  a.onExpandChange.call(void 0, Y);
292
290
  }
293
291
  },
294
292
  [a.onExpandChange]
295
- ), ke = t.useCallback(
293
+ ), Fe = t.useCallback(
296
294
  (e) => {
297
295
  if (a.onFilterChange && l.current) {
298
- const r = {
296
+ const i = {
299
297
  filter: {
300
298
  field: a.textField,
301
299
  operator: "contains",
@@ -305,65 +303,65 @@ const wt = "Please select a value from the list!", { sizeMap: Pe, roundedMap: It
305
303
  nativeEvent: e.nativeEvent,
306
304
  target: l.current
307
305
  };
308
- a.onFilterChange.call(void 0, r), a.filter === void 0 && He(e.target.value);
306
+ a.onFilterChange.call(void 0, i), a.filter === void 0 && $e(e.target.value);
309
307
  }
310
308
  },
311
309
  [a.onFilterChange, a.filter, a.textField]
312
- ), Fe = t.useCallback(
310
+ ), xe = t.useCallback(
313
311
  (e) => {
314
312
  if (!l.current)
315
313
  return;
316
- const i = {
314
+ const r = {
317
315
  syntheticEvent: e,
318
316
  nativeEvent: e.nativeEvent,
319
317
  target: l.current
320
318
  };
321
- a.onCancel && a.onCancel.call(void 0, i), g(i), e.preventDefault();
319
+ a.onCancel && a.onCancel.call(void 0, r), g(r), e.preventDefault();
322
320
  },
323
321
  [a.onCancel, g]
324
- ), tt = () => {
322
+ ), nt = () => {
325
323
  const e = a.filterable ? /* @__PURE__ */ t.createElement(
326
- Ne,
324
+ Pe,
327
325
  {
328
- value: a.filter === void 0 ? be : a.filter,
326
+ value: a.filter === void 0 ? ye : a.filter,
329
327
  ref: ie,
330
- onChange: ke,
331
- onKeyDown: Ce,
328
+ onChange: Fe,
329
+ onKeyDown: ke,
332
330
  size: v,
333
331
  rounded: K,
334
- fillMode: W
332
+ fillMode: A
335
333
  }
336
- ) : null, i = {
334
+ ) : null, r = {
337
335
  title: a.adaptiveTitle,
338
336
  expand: s,
339
- onClose: (r) => a.onCancel ? Fe(r) : ce(r),
340
- windowWidth: oe,
337
+ onClose: (i) => a.onCancel ? xe(i) : ue(i),
338
+ windowWidth: le,
341
339
  mobileFilter: e,
342
340
  footer: {
343
341
  cancelText: Q.toLanguageString(
344
342
  Re,
345
343
  ne[Re]
346
344
  ),
347
- onCancel: (r) => a.onCancel ? Fe(r) : ce(r),
345
+ onCancel: (i) => a.onCancel ? xe(i) : ue(i),
348
346
  applyText: Q.toLanguageString(
349
- Me,
350
- ne[Me]
347
+ Ne,
348
+ ne[Ne]
351
349
  ),
352
- onApply: (r) => g(r)
350
+ onApply: (i) => g(i)
353
351
  }
354
352
  };
355
- return /* @__PURE__ */ t.createElement(xt, { ...i }, /* @__PURE__ */ t.createElement(St, { overflowHidden: !0 }, /* @__PURE__ */ t.createElement("div", { className: "k-list-container" }, /* @__PURE__ */ t.createElement("div", { className: "k-list k-list-lg" }, q.length > 0 ? /* @__PURE__ */ t.createElement(
356
- Te,
353
+ return /* @__PURE__ */ t.createElement(wt, { ...r }, /* @__PURE__ */ t.createElement(It, { overflowHidden: !0 }, /* @__PURE__ */ t.createElement("div", { className: "k-list-container" }, /* @__PURE__ */ t.createElement("div", { className: "k-list k-list-lg" }, W.length > 0 ? /* @__PURE__ */ t.createElement(
354
+ De,
357
355
  {
358
- ref: k,
356
+ ref: E,
359
357
  tabIndex: H,
360
- data: q,
361
- focusIdField: S,
358
+ data: W,
359
+ focusIdField: x,
362
360
  textField: a.textField,
363
- checkField: fe,
364
- checkIndeterminateField: me,
361
+ checkField: me,
362
+ checkIndeterminateField: ge,
365
363
  expandField: a.expandField,
366
- childrenField: ge,
364
+ childrenField: ve,
367
365
  expandIcons: !0,
368
366
  onItemClick: U,
369
367
  onCheckChange: U,
@@ -371,74 +369,74 @@ const wt = "Please select a value from the list!", { sizeMap: Pe, roundedMap: It
371
369
  checkboxes: !0,
372
370
  size: v,
373
371
  item: a.item,
374
- dir: T
372
+ dir: I
375
373
  }
376
- ) : /* @__PURE__ */ t.createElement(xe, null, Q.toLanguageString(te, ne[te]))))));
377
- }, nt = t.useCallback((e) => {
378
- for (const i of e)
379
- Ae(i.target.clientWidth);
380
- }, []), xe = a.listNoData || Ct, Q = gt(), Se = !Ke || se.valid, X = P && s ? We : _.current, we = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
374
+ ) : /* @__PURE__ */ t.createElement(Se, null, Q.toLanguageString(te, ne[te]))))));
375
+ }, at = t.useCallback((e) => {
376
+ for (const r of e)
377
+ Ae(r.target.clientWidth);
378
+ }, []), Se = a.listNoData || Et, Q = ht(), we = !Ve || ce.valid, X = N && s ? ze : _.current, Ie = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
381
379
  "span",
382
380
  {
383
381
  className: ee("k-multiselecttree k-input", a.className, {
384
- [`k-input-${Pe[v] || v}`]: v,
385
- [`k-rounded-${It[K] || K}`]: K,
386
- [`k-input-${W}`]: W,
387
- "k-focus": d && !E,
388
- "k-invalid": !Se,
389
- "k-disabled": E,
382
+ [`k-input-${Oe[v] || v}`]: v,
383
+ [`k-rounded-${Dt[K] || K}`]: K,
384
+ [`k-input-${A}`]: A,
385
+ "k-focus": d && !k,
386
+ "k-invalid": !we,
387
+ "k-disabled": k,
390
388
  "k-loading": a.loading,
391
- "k-required": ve
389
+ "k-required": he
392
390
  }),
393
391
  tabIndex: H,
394
392
  accessKey: a.accessKey,
395
- id: x,
393
+ id: O,
396
394
  style: B ? { ...L, width: void 0 } : L,
397
- dir: T,
395
+ dir: I,
398
396
  ref: C,
399
- onKeyDown: E ? void 0 : Ze,
400
- onMouseDown: Xe,
401
- onFocus: Je,
402
- onBlur: Qe,
397
+ onKeyDown: k ? void 0 : et,
398
+ onMouseDown: Ye,
399
+ onFocus: Qe,
400
+ onBlur: Xe,
403
401
  role: "combobox",
404
402
  "aria-haspopup": "tree",
405
403
  "aria-expanded": s,
406
- "aria-disabled": E,
404
+ "aria-disabled": k,
407
405
  "aria-label": B,
408
406
  "aria-labelledby": a.ariaLabelledBy,
409
- "aria-describedby": a.ariaDescribedBy ? a.ariaDescribedBy : "tagslist-" + x,
407
+ "aria-describedby": a.ariaDescribedBy ? a.ariaDescribedBy : "tagslist-" + O,
410
408
  "aria-required": a.required,
411
- onClick: E ? void 0 : Ye
409
+ onClick: k ? void 0 : Ze
412
410
  },
413
411
  /* @__PURE__ */ t.createElement(
414
412
  "div",
415
413
  {
416
- id: "tagslist-" + x,
414
+ id: "tagslist-" + O,
417
415
  className: ee("k-input-values k-chip-list", {
418
- [`k-chip-list-${Pe[v] || v}`]: v
416
+ [`k-chip-list-${Oe[v] || v}`]: v
419
417
  })
420
418
  },
421
419
  X.length > 0 && /* @__PURE__ */ t.createElement(
422
- kt,
420
+ xt,
423
421
  {
424
422
  tag: a.tag,
425
- onTagDelete: et,
423
+ onTagDelete: tt,
426
424
  data: X,
427
- guid: x,
428
- focused: N ? _.current.find(
429
- (e) => De(e, N, S)
425
+ guid: O,
426
+ focused: R ? _.current.find(
427
+ (e) => Me(e, R, x)
430
428
  ) : void 0,
431
429
  size: v
432
430
  }
433
431
  )
434
432
  ),
435
- /* @__PURE__ */ t.createElement("span", { className: "k-input-inner" }, X.length === 0 && /* @__PURE__ */ t.createElement("span", { className: "k-input-value-text" }, de)),
436
- a.loading && /* @__PURE__ */ t.createElement(pt, { className: "k-input-loading-icon", name: "loading" }),
437
- le && !E && X.length > 0 && /* @__PURE__ */ t.createElement(Ft, { onClick: ce }),
433
+ /* @__PURE__ */ t.createElement("span", { className: "k-input-inner" }, X.length === 0 && /* @__PURE__ */ t.createElement("span", { className: "k-input-value-text" }, pe)),
434
+ a.loading && /* @__PURE__ */ t.createElement(ft, { className: "k-input-loading-icon", name: "loading" }),
435
+ se && !k && X.length > 0 && /* @__PURE__ */ t.createElement(St, { onClick: ue }),
438
436
  /* @__PURE__ */ t.createElement(
439
437
  "select",
440
438
  {
441
- name: Le,
439
+ name: Be,
442
440
  ref: $,
443
441
  tabIndex: -1,
444
442
  "aria-hidden": !0,
@@ -447,47 +445,47 @@ const wt = "Please select a value from the list!", { sizeMap: Pe, roundedMap: It
447
445
  },
448
446
  /* @__PURE__ */ t.createElement("option", { value: a.valueMap ? a.valueMap.call(void 0, m) : m })
449
447
  ),
450
- !P && /* @__PURE__ */ t.createElement(
451
- mt,
448
+ !N && /* @__PURE__ */ t.createElement(
449
+ vt,
452
450
  {
453
451
  ...M,
454
452
  popupClass: ee(M.popupClass, "k-multiselecttree-popup"),
455
- className: ee(M.className, { "k-rtl": T === "rtl" }),
456
- style: $e,
453
+ className: ee(M.className, { "k-rtl": I === "rtl" }),
454
+ style: Ge,
457
455
  anchor: M.anchor || C.current,
458
456
  show: s,
459
- onOpen: je,
460
- onClose: Ue,
457
+ onOpen: Ue,
458
+ onClose: Je,
461
459
  ref: j
462
460
  },
463
461
  a.filterable && /* @__PURE__ */ t.createElement(
464
- Ne,
462
+ Pe,
465
463
  {
466
- value: a.filter === void 0 ? be : a.filter,
467
- ref: I,
468
- onChange: ke,
469
- onKeyDown: Ce,
464
+ value: a.filter === void 0 ? ye : a.filter,
465
+ ref: w,
466
+ onChange: Fe,
467
+ onKeyDown: ke,
470
468
  tabIndex: H,
471
469
  size: v,
472
470
  rounded: K,
473
- fillMode: W,
471
+ fillMode: A,
474
472
  renderListFilterWrapper: !0,
475
473
  renderPrefixSeparator: !0
476
474
  }
477
475
  ),
478
- q.length > 0 ? /* @__PURE__ */ t.createElement(
479
- Te,
476
+ W.length > 0 ? /* @__PURE__ */ t.createElement(
477
+ De,
480
478
  {
481
479
  style: { height: M.height },
482
- ref: k,
480
+ ref: E,
483
481
  tabIndex: H,
484
- data: q,
485
- focusIdField: S,
482
+ data: W,
483
+ focusIdField: x,
486
484
  textField: a.textField,
487
- checkField: fe,
488
- checkIndeterminateField: me,
485
+ checkField: me,
486
+ checkIndeterminateField: ge,
489
487
  expandField: a.expandField,
490
- childrenField: ge,
488
+ childrenField: ve,
491
489
  expandIcons: !0,
492
490
  onItemClick: U,
493
491
  onCheckChange: U,
@@ -495,27 +493,28 @@ const wt = "Please select a value from the list!", { sizeMap: Pe, roundedMap: It
495
493
  checkboxes: !0,
496
494
  size: v,
497
495
  item: a.item,
498
- dir: T
496
+ dir: I
499
497
  }
500
- ) : /* @__PURE__ */ t.createElement(xe, null, Q.toLanguageString(te, ne[te]))
498
+ ) : /* @__PURE__ */ t.createElement(Se, null, Q.toLanguageString(te, ne[te])),
499
+ V && /* @__PURE__ */ t.createElement(mt, null)
501
500
  )
502
- ), P && tt());
501
+ ), N && nt());
503
502
  return B ? /* @__PURE__ */ t.createElement(
504
- Et,
503
+ Ft,
505
504
  {
506
505
  label: B,
507
- editorValue: le,
508
- editorPlaceholder: de,
509
- editorValid: Se,
510
- editorDisabled: E,
511
- editorId: x,
506
+ editorValue: se,
507
+ editorPlaceholder: pe,
508
+ editorValid: we,
509
+ editorDisabled: k,
510
+ editorId: O,
512
511
  style: { width: L ? L.width : void 0 },
513
- children: we,
514
- dir: T
512
+ children: Ie,
513
+ dir: I
515
514
  }
516
- ) : we;
515
+ ) : Ie;
517
516
  }
518
- ), Mt = {
517
+ ), Pt = {
519
518
  opened: n.bool,
520
519
  disabled: n.bool,
521
520
  dir: n.string,
@@ -578,9 +577,9 @@ const wt = "Please select a value from the list!", { sizeMap: Pe, roundedMap: It
578
577
  adaptiveTitle: n.string,
579
578
  adaptive: n.bool
580
579
  };
581
- Oe.displayName = "KendoReactMultiSelectTree";
582
- Oe.propTypes = Mt;
580
+ Le.displayName = "KendoReactMultiSelectTree";
581
+ Le.propTypes = Pt;
583
582
  export {
584
- Oe as MultiSelectTree,
585
- Rt as MultiSelectTreePropsContext
583
+ Le as MultiSelectTree,
584
+ Nt as MultiSelectTreePropsContext
586
585
  };