@progress/kendo-react-dropdowns 11.0.0-develop.2 → 11.0.0-develop.4

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