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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@
8
8
  "use client";
9
9
  import * as t from "react";
10
10
  import a from "prop-types";
11
- import { createPropsContext as at, usePropsContext as it, validatePackage as ot, useId as rt, getTabIndex as lt, useRtl as st, canUseDOM as ct, noop as Z, Keys as r, classNames as ee, IconWrap as ut, kendoThemeMaps as dt } from "@progress/kendo-react-common";
11
+ import { createPropsContext as at, usePropsContext as it, validatePackage as rt, useId as ot, getTabIndex as lt, useRtl as st, canUseDOM as ct, noop as Z, Keys as o, classNames as ee, IconWrap as ut, kendoThemeMaps as dt } from "@progress/kendo-react-common";
12
12
  import { Popup as pt } from "@progress/kendo-react-popup";
13
13
  import { useLocalization as ft } from "@progress/kendo-react-intl";
14
14
  import { TreeView as Te } from "@progress/kendo-react-treeview";
@@ -24,14 +24,14 @@ import Ne from "../common/ListFilter.mjs";
24
24
  import { AdaptiveMode as kt } from "../common/AdaptiveMode.mjs";
25
25
  import { ActionSheetContent as Ft } from "@progress/kendo-react-layout";
26
26
  import { MOBILE_MEDIUM_DEVISE as xt } from "../common/constants.mjs";
27
- const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt } = dt, St = (O) => O.split("_").map((R) => parseInt(R, 10)), Tt = (O, R) => {
28
- const { validationMessage: n, valid: K, required: F } = O;
27
+ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: St } = dt, wt = (O) => O.split("_").map((R) => parseInt(R, 10)), Tt = (O, R) => {
28
+ const { validationMessage: n, valid: K, required: x } = O;
29
29
  return {
30
30
  customError: n !== void 0,
31
- valid: !!(K !== void 0 ? K : !F || R),
31
+ valid: !!(K !== void 0 ? K : !x || R),
32
32
  valueMissing: !R
33
33
  };
34
- }, D = {
34
+ }, F = {
35
35
  checkField: "checkField",
36
36
  checkIndeterminateField: "checkIndeterminateField",
37
37
  subItemsField: "items",
@@ -47,31 +47,31 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
47
47
  validityStyles: !0
48
48
  }, Dt = at(), de = t.forwardRef((O, R) => {
49
49
  const n = it(Dt, O);
50
- ot(mt);
51
- const K = rt(), F = n.id || K, {
50
+ rt(mt);
51
+ const K = ot(), x = n.id || K, {
52
52
  data: q = [],
53
- dataItemKey: x,
53
+ dataItemKey: I,
54
54
  popupSettings: M = {},
55
- style: B = {},
56
- opened: I,
55
+ style: L = {},
56
+ opened: S,
57
57
  disabled: C,
58
58
  onOpen: ae = Z,
59
59
  onClose: A = Z,
60
60
  placeholder: pe,
61
- label: L,
61
+ label: B,
62
62
  name: Oe,
63
- checkField: fe = D.checkField,
64
- checkIndeterminateField: me = D.checkIndeterminateField,
65
- subItemsField: ge = D.subItemsField,
63
+ checkField: fe = F.checkField,
64
+ checkIndeterminateField: me = F.checkIndeterminateField,
65
+ subItemsField: ge = F.subItemsField,
66
66
  validationMessage: W,
67
- valid: Be,
67
+ valid: Le,
68
68
  tags: ve,
69
69
  value: m,
70
- required: he = D.required,
71
- validityStyles: Le = D.validityStyles
72
- } = n, z = lt(n.tabIndex, C), l = t.useRef(null), y = t.useRef(null), w = t.useRef(null), ie = t.useRef(null), _ = t.useRef(null), E = t.useRef(null), $ = t.useRef(!1), H = t.useRef([]), G = t.useRef(null), [N, Ve] = t.useState(), [Ke, be] = t.useState(!1), [d, oe] = t.useState(!1), [re, qe] = t.useState(), [Ae, We] = t.useState([]), [ye, ze] = t.useState(""), P = !!(re && re <= xt && n.adaptive), s = I !== void 0 ? I : Ke, le = !!(Array.isArray(m) && m.length), se = Tt({ validationMessage: W, valid: Be, required: he }, le), S = st(y, n.dir), _e = {
73
- width: ht(y, D, M, B),
74
- ...S !== void 0 ? { direction: S } : {}
70
+ required: he = F.required,
71
+ validityStyles: Be = F.validityStyles
72
+ } = n, z = lt(n.tabIndex, C), l = t.useRef(null), y = t.useRef(null), w = t.useRef(null), ie = t.useRef(null), _ = t.useRef(null), E = t.useRef(null), $ = t.useRef(!1), H = t.useRef([]), G = t.useRef(null), [N, Ve] = t.useState(), [Ke, be] = t.useState(!1), [d, re] = t.useState(!1), [oe, qe] = t.useState(), [Ae, We] = t.useState([]), [ye, ze] = t.useState(""), P = !!(oe && oe <= xt && n.adaptive), s = S !== void 0 ? S : Ke, le = !!(Array.isArray(m) && m.length), se = Tt({ validationMessage: W, valid: Le, required: he }, le), T = st(y, n.dir), _e = {
73
+ width: ht(y, F, { ...F.popupSettings, ...M }, L),
74
+ ...T !== void 0 ? { direction: T } : {}
75
75
  }, $e = t.useCallback(() => y.current && y.current.focus(), []);
76
76
  H.current = ve === void 0 ? (m || []).map((e) => ({ text: gt(e, n.textField), data: [e] })) : [...ve], t.useImperativeHandle(
77
77
  l,
@@ -101,11 +101,11 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
101
101
  [m, s]
102
102
  );
103
103
  const k = t.useCallback(
104
- (e, i, o) => {
104
+ (e, i, r) => {
105
105
  if (n.onChange) {
106
106
  const b = {
107
107
  items: i,
108
- operation: o,
108
+ operation: r,
109
109
  ...e
110
110
  };
111
111
  n.onChange.call(void 0, b);
@@ -114,16 +114,16 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
114
114
  [n.onChange]
115
115
  ), U = t.useCallback(
116
116
  (e) => {
117
- if (vt(e.item, m, x) || !l.current)
117
+ if (vt(e.item, m, I) || !l.current)
118
118
  return;
119
- const { item: i, nativeEvent: o, syntheticEvent: b } = e, T = {
119
+ const { item: i, nativeEvent: r, syntheticEvent: b } = e, D = {
120
120
  syntheticEvent: b,
121
- nativeEvent: o,
121
+ nativeEvent: r,
122
122
  target: l.current
123
123
  };
124
- k(T, [i], "toggle");
124
+ k(D, [i], "toggle");
125
125
  },
126
- [m, x, k]
126
+ [m, I, k]
127
127
  ), j = t.useCallback(
128
128
  (e) => {
129
129
  if (!s) {
@@ -131,13 +131,13 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
131
131
  const i = { ...e };
132
132
  ae.call(void 0, i);
133
133
  }
134
- I === void 0 && (be(!0), We(m || []), P && setTimeout(() => {
134
+ S === void 0 && (be(!0), We(m || []), P && setTimeout(() => {
135
135
  var i;
136
136
  u((i = ie.current) == null ? void 0 : i.element);
137
137
  }, 300));
138
138
  }
139
139
  },
140
- [s, I, ae, P, ie]
140
+ [s, S, ae, P, ie]
141
141
  ), g = t.useCallback(
142
142
  (e) => {
143
143
  if (s) {
@@ -145,10 +145,10 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
145
145
  const i = { ...e };
146
146
  A.call(void 0, i);
147
147
  }
148
- I === void 0 && be(!1);
148
+ S === void 0 && be(!1);
149
149
  }
150
150
  },
151
- [s, I, A]
151
+ [s, S, A]
152
152
  ), h = t.useCallback(
153
153
  (e) => {
154
154
  $.current = !0, e(), window.setTimeout(() => $.current = !1, 0);
@@ -172,7 +172,7 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
172
172
  [d, u]
173
173
  ), je = t.useCallback(
174
174
  (e) => {
175
- if (!d && !$.current && (oe(!0), n.onFocus && l.current)) {
175
+ if (!d && !$.current && (re(!0), n.onFocus && l.current)) {
176
176
  const i = {
177
177
  syntheticEvent: e,
178
178
  nativeEvent: e.nativeEvent,
@@ -185,20 +185,20 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
185
185
  ), Je = t.useCallback(
186
186
  (e) => {
187
187
  if (d && !$.current && l.current) {
188
- oe(!1);
188
+ re(!1);
189
189
  const i = {
190
190
  syntheticEvent: e,
191
191
  nativeEvent: e.nativeEvent,
192
192
  target: l.current
193
193
  };
194
194
  if (n.onBlur) {
195
- const o = { ...i };
196
- n.onBlur.call(void 0, o);
195
+ const r = { ...i };
196
+ n.onBlur.call(void 0, r);
197
197
  }
198
198
  P || g(i);
199
199
  }
200
200
  },
201
- [d, n.onBlur, s, I, A]
201
+ [d, n.onBlur, s, S, A]
202
202
  ), Qe = t.useCallback(
203
203
  () => {
204
204
  d && h(Z);
@@ -207,7 +207,7 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
207
207
  ), Xe = t.useCallback(
208
208
  (e) => {
209
209
  if (!e.isDefaultPrevented() && l.current) {
210
- oe(!0);
210
+ re(!0);
211
211
  const i = {
212
212
  syntheticEvent: e,
213
213
  nativeEvent: e.nativeEvent,
@@ -219,26 +219,26 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
219
219
  [s, j]
220
220
  ), Ye = t.useCallback(
221
221
  (e) => {
222
- var Y, Se;
223
- const { keyCode: i, altKey: o } = e, b = E.current && E.current.element;
222
+ var Y, we;
223
+ const { keyCode: i, altKey: r } = e, b = E.current && E.current.element;
224
224
  if (!l.current || e.isDefaultPrevented() && ((Y = w.current) == null ? void 0 : Y.element) === e.target)
225
225
  return;
226
- const T = {
226
+ const D = {
227
227
  syntheticEvent: e,
228
228
  nativeEvent: e.nativeEvent,
229
229
  target: l.current
230
230
  };
231
- if (m && m.length > 0 && (i === r.left || i === r.right || i === r.home || i === r.end || i === r.delete)) {
231
+ if (m && m.length > 0 && (i === o.left || i === o.right || i === o.home || i === o.end || i === o.delete)) {
232
232
  const c = H.current;
233
- let p = N ? c.findIndex((nt) => De(nt, N, x)) : -1, f;
233
+ let p = N ? c.findIndex((nt) => De(nt, N, I)) : -1, f;
234
234
  const ue = p !== -1;
235
- i === r.left ? (ue ? p = Math.max(0, p - 1) : p = c.length - 1, f = c[p]) : i === r.right ? p === c.length - 1 ? f = void 0 : ue && (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 && ue && k(T, c[p].data, "delete"), f !== N && Ve(f);
235
+ 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 && k(D, c[p].data, "delete"), f !== N && Ve(f);
236
236
  }
237
237
  if (s)
238
- if (i === r.esc || o && i === r.up)
239
- e.preventDefault(), g(T);
240
- else if (b && b.querySelector(".k-focus") && (i === r.up || i === r.down || i === r.left || i === r.right || i === r.home || i === r.end)) {
241
- if (i === r.up && ((Se = w.current) != null && Se.element)) {
238
+ if (i === o.esc || r && i === o.up)
239
+ e.preventDefault(), g(D);
240
+ 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)) {
241
+ if (i === o.up && ((we = w.current) != null && we.element)) {
242
242
  const c = Array.from(b.querySelectorAll(".k-treeview-item")), p = [...c].reverse().find((f) => !!(f && f.querySelector(".k-focus")));
243
243
  if (p && c.indexOf(p) === 0)
244
244
  return h(() => {
@@ -248,19 +248,19 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
248
248
  }
249
249
  h(Z);
250
250
  } else
251
- i === r.down && h(() => {
251
+ i === o.down && h(() => {
252
252
  var c;
253
253
  u(((c = w.current) == null ? void 0 : c.element) || b);
254
254
  });
255
255
  else
256
- o && i === r.down && (e.preventDefault(), j(T));
256
+ r && i === o.down && (e.preventDefault(), j(D));
257
257
  },
258
- [s, g, u, h, j, N, x, m, k]
258
+ [s, g, u, h, j, N, I, m, k]
259
259
  ), Ce = t.useCallback(
260
260
  (e) => {
261
- const { keyCode: i, altKey: o } = e;
262
- o || i !== r.up && i !== r.down || (e.preventDefault(), h(
263
- i === r.up ? () => {
261
+ const { keyCode: i, altKey: r } = e;
262
+ r || i !== o.up && i !== o.down || (e.preventDefault(), h(
263
+ i === o.up ? () => {
264
264
  u(y.current);
265
265
  } : () => {
266
266
  u(E.current && E.current.element);
@@ -282,8 +282,8 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
282
282
  [k, g]
283
283
  ), Ze = t.useCallback(
284
284
  (e, i) => {
285
- var o;
286
- g({ target: l.current }), d || u((o = w.current) == null ? void 0 : o.element), k({
285
+ var r;
286
+ g({ target: l.current }), d || u((r = w.current) == null ? void 0 : r.element), k({
287
287
  syntheticEvent: i,
288
288
  nativeEvent: i.nativeEvent,
289
289
  target: l.current
@@ -293,11 +293,11 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
293
293
  ), Ee = t.useCallback(
294
294
  (e) => {
295
295
  if (n.onExpandChange && l.current) {
296
- const { item: i, itemHierarchicalIndex: o, nativeEvent: b, syntheticEvent: T } = e, Y = {
297
- level: St(o),
296
+ const { item: i, itemHierarchicalIndex: r, nativeEvent: b, syntheticEvent: D } = e, Y = {
297
+ level: wt(r),
298
298
  item: i,
299
299
  nativeEvent: b,
300
- syntheticEvent: T,
300
+ syntheticEvent: D,
301
301
  target: l.current
302
302
  };
303
303
  n.onExpandChange.call(void 0, Y);
@@ -307,13 +307,13 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
307
307
  ), ke = t.useCallback(
308
308
  (e) => {
309
309
  if (n.onFilterChange && l.current) {
310
- const o = {
310
+ const r = {
311
311
  filter: { field: n.textField, operator: "contains", value: e.target.value },
312
312
  syntheticEvent: e.syntheticEvent,
313
313
  nativeEvent: e.nativeEvent,
314
314
  target: l.current
315
315
  };
316
- n.onFilterChange.call(void 0, o), n.filter === void 0 && ze(e.target.value);
316
+ n.onFilterChange.call(void 0, r), n.filter === void 0 && ze(e.target.value);
317
317
  }
318
318
  },
319
319
  [n.onFilterChange, n.filter, n.textField]
@@ -344,14 +344,14 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
344
344
  ) : null, i = {
345
345
  adaptiveTitle: n.adaptiveTitle,
346
346
  expand: s,
347
- onClose: (o) => n.onCancel ? Fe(o) : ce(o),
348
- windowWidth: re,
347
+ onClose: (r) => n.onCancel ? Fe(r) : ce(r),
348
+ windowWidth: oe,
349
349
  mobileFilter: e,
350
350
  footer: {
351
351
  cancelText: J.toLanguageString(Re, ne[Re]),
352
- onCancel: (o) => n.onCancel ? Fe(o) : ce(o),
352
+ onCancel: (r) => n.onCancel ? Fe(r) : ce(r),
353
353
  applyText: J.toLanguageString(Me, ne[Me]),
354
- onApply: (o) => g(o)
354
+ onApply: (r) => g(r)
355
355
  }
356
356
  };
357
357
  return /* @__PURE__ */ t.createElement(kt, { ...i }, /* @__PURE__ */ t.createElement(Ft, { className: "!k-overflow-hidden" }, /* @__PURE__ */ t.createElement("div", { className: "k-list-container" }, /* @__PURE__ */ t.createElement("div", { className: "k-list k-list-lg" }, q.length > 0 ? /* @__PURE__ */ t.createElement(
@@ -360,7 +360,7 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
360
360
  ref: E,
361
361
  tabIndex: z,
362
362
  data: q,
363
- focusIdField: x,
363
+ focusIdField: I,
364
364
  textField: n.textField,
365
365
  checkField: fe,
366
366
  checkIndeterminateField: me,
@@ -373,7 +373,7 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
373
373
  checkboxes: !0,
374
374
  size: v,
375
375
  item: n.item,
376
- dir: S
376
+ dir: T
377
377
  }
378
378
  ) : /* @__PURE__ */ t.createElement(xe, null, J.toLanguageString(te, ne[te]))))));
379
379
  }, tt = t.useCallback(
@@ -382,12 +382,12 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
382
382
  qe(i.target.clientWidth);
383
383
  },
384
384
  []
385
- ), xe = n.listNoData || bt, J = ft(), Ie = !Le || se.valid, { size: v, rounded: V, fillMode: Q } = n, X = P && s ? Ae : H.current, we = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
385
+ ), xe = n.listNoData || bt, J = ft(), Ie = !Be || se.valid, { size: v, rounded: V, fillMode: Q } = n, X = P && s ? Ae : H.current, Se = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
386
386
  "span",
387
387
  {
388
388
  className: ee("k-multiselecttree k-input", n.className, {
389
389
  [`k-input-${Pe[v] || v}`]: v,
390
- [`k-rounded-${wt[V] || V}`]: V,
390
+ [`k-rounded-${St[V] || V}`]: V,
391
391
  [`k-input-${Q}`]: Q,
392
392
  "k-focus": d && !C,
393
393
  "k-invalid": !Ie,
@@ -397,9 +397,9 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
397
397
  }),
398
398
  tabIndex: z,
399
399
  accessKey: n.accessKey,
400
- id: F,
401
- style: L ? { ...B, width: void 0 } : B,
402
- dir: S,
400
+ id: x,
401
+ style: B ? { ...L, width: void 0 } : L,
402
+ dir: T,
403
403
  ref: y,
404
404
  onKeyDown: C ? void 0 : Ye,
405
405
  onMouseDown: Qe,
@@ -409,17 +409,17 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
409
409
  "aria-haspopup": "tree",
410
410
  "aria-expanded": s,
411
411
  "aria-disabled": C,
412
- "aria-label": L,
412
+ "aria-label": B,
413
413
  "aria-labelledby": n.ariaLabelledBy,
414
- "aria-describedby": n.ariaDescribedBy ? n.ariaDescribedBy : "tagslist-" + F,
414
+ "aria-describedby": n.ariaDescribedBy ? n.ariaDescribedBy : "tagslist-" + x,
415
415
  "aria-required": n.required,
416
416
  onClick: C ? void 0 : Xe
417
417
  },
418
418
  /* @__PURE__ */ t.createElement(
419
419
  "div",
420
420
  {
421
- id: "tagslist-" + F,
422
- className: ee("k-input-values k-chip-list k-selection-multiple", {
421
+ id: "tagslist-" + x,
422
+ className: ee("k-input-values k-chip-list", {
423
423
  [`k-chip-list-${Pe[v] || v}`]: v
424
424
  })
425
425
  },
@@ -429,8 +429,8 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
429
429
  tag: n.tag,
430
430
  onTagDelete: Ze,
431
431
  data: X,
432
- guid: F,
433
- focused: N ? H.current.find((e) => De(e, N, x)) : void 0,
432
+ guid: x,
433
+ focused: N ? H.current.find((e) => De(e, N, I)) : void 0,
434
434
  size: v
435
435
  }
436
436
  )
@@ -445,7 +445,7 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
445
445
  ref: _,
446
446
  tabIndex: -1,
447
447
  "aria-hidden": !0,
448
- title: L,
448
+ title: B,
449
449
  style: { opacity: 0, width: 1, border: 0, zIndex: -1, position: "absolute", left: "50%" }
450
450
  },
451
451
  /* @__PURE__ */ t.createElement(
@@ -463,7 +463,7 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
463
463
  M.popupClass,
464
464
  "k-multiselecttree-popup"
465
465
  ),
466
- className: ee(M.className, { "k-rtl": S === "rtl" }),
466
+ className: ee(M.className, { "k-rtl": T === "rtl" }),
467
467
  style: _e,
468
468
  anchor: M.anchor || y.current,
469
469
  show: s,
@@ -481,7 +481,9 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
481
481
  tabIndex: z,
482
482
  size: v,
483
483
  rounded: V,
484
- fillMode: Q
484
+ fillMode: Q,
485
+ renderListFilterWrapper: !0,
486
+ renderPrefixSeparator: !0
485
487
  }
486
488
  ),
487
489
  q.length > 0 ? /* @__PURE__ */ t.createElement(
@@ -491,7 +493,7 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
491
493
  ref: E,
492
494
  tabIndex: z,
493
495
  data: q,
494
- focusIdField: x,
496
+ focusIdField: I,
495
497
  textField: n.textField,
496
498
  checkField: fe,
497
499
  checkIndeterminateField: me,
@@ -504,25 +506,25 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
504
506
  checkboxes: !0,
505
507
  size: v,
506
508
  item: n.item,
507
- dir: S
509
+ dir: T
508
510
  }
509
511
  ) : /* @__PURE__ */ t.createElement(xe, null, J.toLanguageString(te, ne[te]))
510
512
  )
511
513
  ), P && et());
512
- return L ? /* @__PURE__ */ t.createElement(
514
+ return B ? /* @__PURE__ */ t.createElement(
513
515
  yt,
514
516
  {
515
- label: L,
517
+ label: B,
516
518
  editorValue: le,
517
519
  editorPlaceholder: pe,
518
520
  editorValid: Ie,
519
521
  editorDisabled: C,
520
- editorId: F,
521
- style: { width: B ? B.width : void 0 },
522
- children: we,
523
- dir: S
522
+ editorId: x,
523
+ style: { width: L ? L.width : void 0 },
524
+ children: Se,
525
+ dir: T
524
526
  }
525
- ) : we;
527
+ ) : Se;
526
528
  }), Rt = {
527
529
  opened: a.bool,
528
530
  disabled: a.bool,
@@ -582,7 +584,7 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
582
584
  adaptive: a.bool
583
585
  };
584
586
  de.displayName = "KendoReactMultiSelectTree";
585
- de.defaultProps = D;
587
+ de.defaultProps = F;
586
588
  de.propTypes = Rt;
587
589
  export {
588
590
  de as MultiSelectTree,
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react"),l=require("@progress/kendo-react-layout"),k=require("@progress/kendo-svg-icons"),i=require("@progress/kendo-react-buttons");function v(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const n in a)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>a[n]})}}return e.default=a,Object.freeze(e)}const t=v(h),s=500,g=a=>{const{footer:e,children:n,windowWidth:o=0,navigatable:d,navigatableElements:u,expand:m,animation:b,onClose:c,adaptiveTitle:p,mobileFilter:r}=a,f={navigatable:d||!1,navigatableElements:u||[],expand:m,animation:b!==!1,onClose:c,animationStyles:o<=s?{top:0,width:"100%",height:"100%"}:void 0,className:o<=s?"k-adaptive-actionsheet k-actionsheet-fullscreen":"k-adaptive-actionsheet k-actionsheet-bottom"};return t.createElement(l.ActionSheet,{...f},t.createElement(l.ActionSheetHeader,{className:"k-text-center"},t.createElement("div",{className:"k-actionsheet-titlebar-group k-hbox"},t.createElement("div",{className:"k-actionsheet-title"},t.createElement("div",null,p)),t.createElement("div",{className:"k-actionsheet-actions"},t.createElement(i.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",icon:"x",svgIcon:k.xIcon,onClick:c}))),r&&t.createElement("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter"},r)),n,e&&t.createElement(l.ActionSheetFooter,{className:"k-actions k-actions-stretched"},t.createElement(i.Button,{size:"large",tabIndex:0,"aria-label":e.cancelText,"aria-disabled":"false",type:"button",onClick:e.onCancel},e.cancelText),t.createElement(i.Button,{tabIndex:0,themeColor:"primary",size:"large","aria-label":e.applyText,"aria-disabled":"false",type:"button",onClick:e.onApply},e.applyText)))};exports.AdaptiveMode=g;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),c=require("@progress/kendo-react-layout"),h=require("@progress/kendo-svg-icons"),l=require("@progress/kendo-react-buttons"),v=require("@progress/kendo-react-common");function g(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const n in a)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>a[n]})}}return t.default=a,Object.freeze(t)}const e=g(f),r=500,E=a=>{const{footer:t,children:n,windowWidth:o=0,navigatable:d,navigatableElements:m,expand:u,animation:b,onClose:i,adaptiveTitle:p,mobileFilter:s}=a,k={navigatable:d||!1,navigatableElements:m||[],expand:u,animation:b!==!1,onClose:i,animationStyles:o<=r?{top:0,width:"100%",height:"100%"}:void 0,className:v.classNames("k-actionsheet","k-adaptive-actionsheet",o<=r?"k-actionsheet-fullscreen":"k-actionsheet-bottom")};return e.createElement(c.ActionSheet,{...k},e.createElement(c.ActionSheetHeader,{className:"k-text-center"},e.createElement("div",{className:"k-actionsheet-titlebar-group k-hbox"},e.createElement("div",{className:"k-actionsheet-title"},e.createElement("div",{className:"k-text-center"},p),e.createElement("div",{className:"k-actionsheet-subtitle k-text-center"})),e.createElement("div",{className:"k-actionsheet-actions"},e.createElement(l.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",icon:"x",svgIcon:h.xIcon,onClick:i}))),s&&e.createElement("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter"},s)),n,t&&e.createElement(c.ActionSheetFooter,{className:"k-actions k-actions-stretched"},e.createElement(l.Button,{size:"large",tabIndex:0,"aria-label":t.cancelText,"aria-disabled":"false",type:"button",onClick:t.onCancel},t.cancelText),e.createElement(l.Button,{tabIndex:0,themeColor:"primary",size:"large","aria-label":t.applyText,"aria-disabled":"false",type:"button",onClick:t.onApply},t.applyText)))};exports.AdaptiveMode=E;
@@ -7,10 +7,11 @@
7
7
  */
8
8
  "use client";
9
9
  import * as e from "react";
10
- import { ActionSheet as f, ActionSheetHeader as k, ActionSheetFooter as E } from "@progress/kendo-react-layout";
10
+ import { ActionSheet as k, ActionSheetHeader as f, ActionSheetFooter as E } from "@progress/kendo-react-layout";
11
11
  import { xIcon as v } from "@progress/kendo-svg-icons";
12
12
  import { Button as a } from "@progress/kendo-react-buttons";
13
- const o = 500, y = (c) => {
13
+ import { classNames as x } from "@progress/kendo-react-common";
14
+ const o = 500, C = (c) => {
14
15
  const {
15
16
  footer: t,
16
17
  children: s,
@@ -29,9 +30,13 @@ const o = 500, y = (c) => {
29
30
  animation: p !== !1,
30
31
  onClose: n,
31
32
  animationStyles: l <= o ? { top: 0, width: "100%", height: "100%" } : void 0,
32
- className: l <= o ? "k-adaptive-actionsheet k-actionsheet-fullscreen" : "k-adaptive-actionsheet k-actionsheet-bottom"
33
+ className: x(
34
+ "k-actionsheet",
35
+ "k-adaptive-actionsheet",
36
+ l <= o ? "k-actionsheet-fullscreen" : "k-actionsheet-bottom"
37
+ )
33
38
  };
34
- return /* @__PURE__ */ e.createElement(f, { ...h }, /* @__PURE__ */ e.createElement(k, { className: "k-text-center" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar-group k-hbox" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ e.createElement("div", null, b)), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement(
39
+ return /* @__PURE__ */ e.createElement(k, { ...h }, /* @__PURE__ */ e.createElement(f, { className: "k-text-center" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar-group k-hbox" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ e.createElement("div", { className: "k-text-center" }, b), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-subtitle k-text-center" })), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement(
35
40
  a,
36
41
  {
37
42
  tabIndex: 0,
@@ -69,5 +74,5 @@ const o = 500, y = (c) => {
69
74
  )));
70
75
  };
71
76
  export {
72
- y as AdaptiveMode
77
+ C as AdaptiveMode
73
78
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";const v=require("react"),i=require("prop-types"),y=require("./VirtualScroll.js"),S=require("./Navigation.js"),c=require("./utils.js");function b(l){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const t in l)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(l,t);Object.defineProperty(n,t,e.get?e:{enumerable:!0,get:()=>l[t]})}}return n.default=l,Object.freeze(n)}const P=b(v),p=class p{constructor(n){this.wrapper=null,this.list=null,this.vs=new y,this.navigation=new S.Navigation,this.handleItemClick=(t,e)=>{const s=this.initState();s.syntheticEvent=e,e.stopPropagation(),this.component.handleItemSelect(t,s),this.togglePopup(s),this.applyState(s)},this.handleFocus=t=>{if(!this.component.state.focused){const e=this.initState();e.data.focused=!0,e.events.push({type:"onFocus"}),e.syntheticEvent=t,this.applyState(e)}},this.filterChanged=(t,e)=>{const{textField:s,filterable:o}=this.component.props;o&&e.events.push({type:"onFilterChange",filter:{field:s,operator:"contains",ignoreCase:!0,value:t}})},this.togglePopup=t=>{const e=this.component.props,s=e.opened!==void 0?e.opened:this.component.state.opened;e.opened===void 0&&(t.data.opened=!s),s?t.events.push({type:"onClose"}):(t.events.push({type:"onOpen"}),this.calculatePopupWidth())},this.pageChange=(t,e)=>{const s=this.initState();s.syntheticEvent=e,this.triggerOnPageChange(s,t.skip,t.take),this.applyState(s)},this.scrollToVirtualItem=(t,e)=>{const s=this.vs;if(s.enabled=!1,t.skip===0)s.reset();else if(t.skip+t.pageSize===t.total)s.scrollToEnd();else{let o=s.translate;o===0&&(s.calcScrollElementHeight(),o=s.itemHeight*t.skip,s.translateTo(o-s.itemHeight)),s.container&&(s.container.scrollTop=o),this.scrollToItem(e,!0)}window.setTimeout(()=>s.enabled=!0,10)},this.scrollPopupByPageSize=t=>{var r,u,d,g,f,m;const e=this.vs,s=(u=(r=this.list)==null?void 0:r.parentElement)==null?void 0:u.scrollTop,o=e.enabled&&e.itemHeight?e.itemHeight:this.list?this.list.children[0].offsetHeight:0,a=(g=(d=this.list)==null?void 0:d.parentElement)==null?void 0:g.offsetHeight;s!==void 0&&a!==void 0&&((m=(f=this.list)==null?void 0:f.parentElement)==null||m.scroll({top:s+t*Math.floor(a/o)*o}))},this.renderScrollElement=()=>{const t=this.vs;return t.enabled&&P.createElement("div",{ref:e=>t.scrollElement=e,key:"scrollElementKey"})},this.resetGroupStickyHeader=(t,e)=>{t!==e.state.group&&e.setState({...e.state,group:t})},this.listBoxId=n.props.id+"list",this.guid=n.props.id,this.component=n,this.vs.PageChange=this.pageChange}didMount(){const n=this.component.props,t=n.popupSettings||{},e=n.style||{},s=t.width;let o=n.opened===!0;s===void 0&&this.calculatePopupWidth(),n.dir===void 0&&e.direction===void 0&&(this.calculateDir(),o=!0),o&&this.component.forceUpdate()}calculateDir(){const n=this.component.element;n&&n.ownerDocument&&n.ownerDocument.defaultView&&(this.dirCalculated=n.ownerDocument.defaultView.getComputedStyle(n).direction||void 0)}calculatePopupWidth(){this.wrapper&&(this.popupWidth=this.wrapper.offsetWidth+"px")}scrollToItem(n,t,e){const s=this.list||this.vs.list;if(!s&&!e&&setTimeout(()=>{this.scrollToItem(n,t,!0)},10),s&&n>=0){const o=this.vs,a=o.container||s.parentNode,r=t!==void 0?t:o.enabled;c.scrollToItem(a,s,n,o.translate,r)}}initState(){return{data:{},events:[],syntheticEvent:void 0}}applyState(n){Object.keys(n.data).length>0&&this.component.setState(n.data);const t={syntheticEvent:n.syntheticEvent,nativeEvent:n.syntheticEvent?n.syntheticEvent.nativeEvent:void 0,target:this.component,value:this.component.value};n.events.forEach(e=>{const s=e.type;delete e.type;const o=s&&this.component.props[s];o&&o.call(void 0,{...t,...e})})}triggerOnPageChange(n,t,e){const s=this.component.props.virtual;if(s){const o=Math.min(Math.max(0,t),Math.max(0,s.total-e));o!==s.skip&&n.events.push({type:"onPageChange",page:{skip:o,take:e}})}}triggerPageChangeCornerItems(n,t){const e=this.component.props,{data:s=[],dataItemKey:o,virtual:a}=e,r=e.opened!==void 0?e.opened:this.component.state.opened;n&&a&&this.vs.enabled&&(a.skip>0&&c.areSame(n,s[0],o)?this.triggerOnPageChange(t,a.skip-1,a.pageSize):!r&&a.skip+a.pageSize<a.total&&c.areSame(n,s[s.length-1],o)&&this.triggerOnPageChange(t,a.skip+1,a.pageSize))}getPopupSettings(){return Object.assign({},p.defaultProps.popupSettings,this.component.props.popupSettings)}getGroupedDataModernMode(n,t){let e=[];return n.forEach((s,o)=>{n[o-1]&&s[t]!==n[o-1][t]&&e.push({[t]:s[t]}),e.push(n[o])}),e}};p.basicPropTypes={opened:i.bool,disabled:i.bool,dir:i.string,tabIndex:i.number,accessKey:i.string,data:i.array,textField:i.string,className:i.string,label:i.string,loading:i.bool,popupSettings:i.shape({animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})]),popupClass:i.string,className:i.string,appendTo:i.any,width:i.oneOfType([i.string,i.number]),height:i.oneOfType([i.string,i.number])}),onOpen:i.func,onClose:i.func,onFocus:i.func,onBlur:i.func,onChange:i.func,itemRender:i.func,listNoDataRender:i.func,focusedItemIndex:i.func,header:i.node,footer:i.node},p.propTypes={...p.basicPropTypes,value:i.any,defaultValue:i.any,filterable:i.bool,filter:i.string,virtual:i.shape({pageSize:i.number.isRequired,skip:i.number.isRequired,total:i.number.isRequired}),onFilterChange:i.func,onPageChange:i.func},p.defaultProps={popupSettings:{height:"200px"},required:!1,validityStyles:!0};let h=p;module.exports=h;
8
+ "use client";"use strict";const v=require("react"),n=require("prop-types"),y=require("./VirtualScrollStatic.js"),S=require("./Navigation.js"),c=require("./utils.js");function b(l){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const e in l)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(l,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:()=>l[e]})}}return s.default=l,Object.freeze(s)}const P=b(v),a=class a{constructor(s){this.wrapper=null,this.list=null,this.vs=new y.VirtualScroll,this.navigation=new S.Navigation,this.handleItemClick=(e,t)=>{const i=this.initState();i.syntheticEvent=t,t.stopPropagation(),this.component.handleItemSelect(e,i),this.togglePopup(i),this.applyState(i)},this.handleFocus=e=>{if(!this.component.state.focused){const t=this.initState();t.data.focused=!0,t.events.push({type:"onFocus"}),t.syntheticEvent=e,this.applyState(t)}},this.filterChanged=(e,t)=>{const{textField:i,filterable:o}=this.component.props;o&&t.events.push({type:"onFilterChange",filter:{field:i,operator:"contains",ignoreCase:!0,value:e}})},this.togglePopup=e=>{const t=this.component.props,i=t.opened!==void 0?t.opened:this.component.state.opened;t.opened===void 0&&(e.data.opened=!i),i?e.events.push({type:"onClose"}):(e.events.push({type:"onOpen"}),this.calculatePopupWidth())},this.pageChange=(e,t)=>{const i=this.initState();i.syntheticEvent=t,this.triggerOnPageChange(i,e.skip,e.take),this.applyState(i)},this.scrollToVirtualItem=(e,t)=>{const i=this.vs;if(e.skip===0)i.reset();else{let o=i.translate;o===0&&(i.calcScrollElementHeight(),o=i.itemHeight*e.skip,i.translateTo(o,!0)),t<0&&o>0&&(o+=i.itemHeight*(e.pageSize/4)),i.container&&(i.container.scrollTop=o),this.scrollToItem(t,!0)}},this.scrollPopupByPageSize=e=>{var p,u,d,g,f,m;const t=this.vs,i=(u=(p=this.list)==null?void 0:p.parentElement)==null?void 0:u.scrollTop,o=t.enabled&&t.itemHeight?t.itemHeight:this.list?this.list.children[0].offsetHeight:0,r=(g=(d=this.list)==null?void 0:d.parentElement)==null?void 0:g.offsetHeight;i!==void 0&&r!==void 0&&((m=(f=this.list)==null?void 0:f.parentElement)==null||m.scroll({top:i+e*Math.floor(r/o)*o}))},this.renderScrollElement=()=>{const e=this.vs;return e.enabled&&P.createElement("div",{ref:t=>e.scrollElement=t,key:"scrollElementKey"})},this.resetGroupStickyHeader=(e,t)=>{e!==t.state.group&&t.setState({...t.state,group:e})},this.listBoxId=s.props.id+"list",this.guid=s.props.id,this.component=s,this.vs.PageChange=this.pageChange}didUpdate(){this.vs.listTransform&&this.vs.list&&(this.vs.list.style.transform=this.vs.listTransform,this.vs.listTransform="")}didMount(){const s=this.component.props,e=s.popupSettings||{},t=s.style||{},i=e.width;let o=s.opened===!0;i===void 0&&this.calculatePopupWidth(),s.dir===void 0&&t.direction===void 0&&(this.calculateDir(),o=!0),o&&this.component.forceUpdate()}calculateDir(){const s=this.component.element;s&&s.ownerDocument&&s.ownerDocument.defaultView&&(this.dirCalculated=s.ownerDocument.defaultView.getComputedStyle(s).direction||void 0)}calculatePopupWidth(){this.wrapper&&(this.popupWidth=this.wrapper.offsetWidth+"px")}scrollToItem(s,e,t){const i=this.list||this.vs.list;if(!i&&!t&&setTimeout(()=>{this.scrollToItem(s,e,!0)},10),s===0&&e&&this.vs.skip===0){this.vs.reset();return}if(i&&s>=0){const o=this.vs,r=o.container||i.parentNode,p=e!==void 0?e:o.enabled;c.scrollToItem(r,i,s,o.translate,p)}}initState(){return{data:{},events:[],syntheticEvent:void 0}}applyState(s){Object.keys(s.data).length>0&&this.component.setState(s.data);const e={syntheticEvent:s.syntheticEvent,nativeEvent:s.syntheticEvent?s.syntheticEvent.nativeEvent:void 0,target:this.component,value:this.component.value};s.events.forEach(t=>{const i=t.type;delete t.type;const o=i&&this.component.props[i];o&&o.call(void 0,{...e,...t})})}triggerOnPageChange(s,e,t){const i=this.component.props.virtual;if(i){const o=Math.min(Math.max(0,e),Math.max(0,i.total-t));o!==i.skip&&s.events.push({type:"onPageChange",page:{skip:o,take:t}})}}triggerPageChangeCornerItems(s,e){const t=this.component.props,{data:i=[],dataItemKey:o,virtual:r}=t,p=t.opened!==void 0?t.opened:this.component.state.opened;s&&r&&this.vs.enabled&&(r.skip>0&&c.areSame(s,i[0],o)?this.triggerOnPageChange(e,r.skip-1,r.pageSize):!p&&r.skip+r.pageSize<r.total&&c.areSame(s,i[i.length-1],o)&&this.triggerOnPageChange(e,r.skip+1,r.pageSize))}getPopupSettings(){return Object.assign({},a.defaultProps.popupSettings,this.component.props.popupSettings)}getAdaptiveAnimation(){const s=this.getPopupSettings();return s.animate!==void 0?s.animate:!0}getGroupedDataModernMode(s,e){const t=[];return s.forEach((i,o)=>{s[o-1]&&i[e]!==s[o-1][e]&&t.push({[e]:i[e]}),t.push(s[o])}),t}};a.basicPropTypes={opened:n.bool,disabled:n.bool,dir:n.string,tabIndex:n.number,accessKey:n.string,data:n.array,textField:n.string,className:n.string,label:n.string,loading:n.bool,popupSettings:n.shape({animate:n.oneOfType([n.bool,n.shape({openDuration:n.number,closeDuration:n.number})]),popupClass:n.string,className:n.string,appendTo:n.any,width:n.oneOfType([n.string,n.number]),height:n.oneOfType([n.string,n.number])}),onOpen:n.func,onClose:n.func,onFocus:n.func,onBlur:n.func,onChange:n.func,itemRender:n.func,listNoDataRender:n.func,focusedItemIndex:n.func,header:n.node,footer:n.node},a.propTypes={...a.basicPropTypes,value:n.any,defaultValue:n.any,filterable:n.bool,filter:n.string,virtual:n.shape({pageSize:n.number.isRequired,skip:n.number.isRequired,total:n.number.isRequired}),onFilterChange:n.func,onPageChange:n.func},a.defaultProps={popupSettings:{height:"200px"},required:!1,validityStyles:!0};let h=a;module.exports=h;