@progress/kendo-react-dropdowns 11.0.0-develop.3 → 11.0.0-develop.5

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