@progress/kendo-react-dropdowns 7.5.0-develop.2 → 7.5.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.
@@ -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 rt, validatePackage as it, 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,7 +24,7 @@ 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) => {
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
28
  const { validationMessage: n, valid: K, required: F } = O;
29
29
  return {
30
30
  customError: n !== void 0,
@@ -46,32 +46,32 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
46
46
  required: !1,
47
47
  validityStyles: !0
48
48
  }, Dt = at(), de = t.forwardRef((O, R) => {
49
- const n = it(Dt, O);
50
- ot(mt);
51
- const K = rt(), F = n.id || K, {
49
+ const n = rt(Dt, O);
50
+ it(mt);
51
+ const K = ot(), F = n.id || K, {
52
52
  data: q = [],
53
53
  dataItemKey: x,
54
54
  popupSettings: M = {},
55
- style: B = {},
55
+ style: L = {},
56
56
  opened: I,
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
63
  checkField: fe = D.checkField,
64
64
  checkIndeterminateField: me = D.checkIndeterminateField,
65
65
  subItemsField: ge = D.subItemsField,
66
66
  validationMessage: W,
67
- valid: Be,
67
+ valid: Le,
68
68
  tags: ve,
69
69
  value: m,
70
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 } : {}
71
+ validityStyles: Be = D.validityStyles
72
+ } = n, z = lt(n.tabIndex, C), l = t.useRef(null), y = t.useRef(null), S = t.useRef(null), re = 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, ie] = t.useState(!1), [oe, qe] = t.useState(), [Ae, We] = t.useState([]), [ye, ze] = t.useState(""), P = !!(oe && oe <= xt && n.adaptive), s = I !== void 0 ? I : Ke, le = !!(Array.isArray(m) && m.length), se = Tt({ validationMessage: W, valid: Le, required: he }, le), w = st(y, n.dir), _e = {
73
+ width: ht(y, D, M, L),
74
+ ...w !== void 0 ? { direction: w } : {}
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, r, i) => {
105
105
  if (n.onChange) {
106
106
  const b = {
107
- items: i,
108
- operation: o,
107
+ items: r,
108
+ operation: i,
109
109
  ...e
110
110
  };
111
111
  n.onChange.call(void 0, b);
@@ -116,34 +116,34 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
116
116
  (e) => {
117
117
  if (vt(e.item, m, x) || !l.current)
118
118
  return;
119
- const { item: i, nativeEvent: o, syntheticEvent: b } = e, T = {
119
+ const { item: r, nativeEvent: i, syntheticEvent: b } = e, T = {
120
120
  syntheticEvent: b,
121
- nativeEvent: o,
121
+ nativeEvent: i,
122
122
  target: l.current
123
123
  };
124
- k(T, [i], "toggle");
124
+ k(T, [r], "toggle");
125
125
  },
126
126
  [m, x, k]
127
127
  ), j = t.useCallback(
128
128
  (e) => {
129
129
  if (!s) {
130
130
  if (ae) {
131
- const i = { ...e };
132
- ae.call(void 0, i);
131
+ const r = { ...e };
132
+ ae.call(void 0, r);
133
133
  }
134
134
  I === void 0 && (be(!0), We(m || []), P && setTimeout(() => {
135
- var i;
136
- u((i = ie.current) == null ? void 0 : i.element);
135
+ var r;
136
+ u((r = re.current) == null ? void 0 : r.element);
137
137
  }, 300));
138
138
  }
139
139
  },
140
- [s, I, ae, P, ie]
140
+ [s, I, ae, P, re]
141
141
  ), g = t.useCallback(
142
142
  (e) => {
143
143
  if (s) {
144
144
  if (A) {
145
- const i = { ...e };
146
- A.call(void 0, i);
145
+ const r = { ...e };
146
+ A.call(void 0, r);
147
147
  }
148
148
  I === void 0 && be(!1);
149
149
  }
@@ -162,7 +162,7 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
162
162
  ), Ge = t.useCallback(
163
163
  () => {
164
164
  var e;
165
- !d && s ? g({ target: l.current }) : n.filterable ? u((e = w.current) == null ? void 0 : e.element) : u(E.current && E.current.element);
165
+ !d && s ? g({ target: l.current }) : n.filterable ? u((e = S.current) == null ? void 0 : e.element) : u(E.current && E.current.element);
166
166
  },
167
167
  [d, s, u, g, n.filterable]
168
168
  ), Ue = t.useCallback(
@@ -172,30 +172,30 @@ 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)) {
176
- const i = {
175
+ if (!d && !$.current && (ie(!0), n.onFocus && l.current)) {
176
+ const r = {
177
177
  syntheticEvent: e,
178
178
  nativeEvent: e.nativeEvent,
179
179
  target: l.current
180
180
  };
181
- n.onFocus.call(void 0, i);
181
+ n.onFocus.call(void 0, r);
182
182
  }
183
183
  },
184
184
  [d, n.onFocus]
185
185
  ), Je = t.useCallback(
186
186
  (e) => {
187
187
  if (d && !$.current && l.current) {
188
- oe(!1);
189
- const i = {
188
+ ie(!1);
189
+ const r = {
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 i = { ...r };
196
+ n.onBlur.call(void 0, i);
197
197
  }
198
- P || g(i);
198
+ P || g(r);
199
199
  }
200
200
  },
201
201
  [d, n.onBlur, s, I, A]
@@ -207,60 +207,60 @@ 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);
211
- const i = {
210
+ ie(!0);
211
+ const r = {
212
212
  syntheticEvent: e,
213
213
  nativeEvent: e.nativeEvent,
214
214
  target: l.current
215
215
  };
216
- s || j(i);
216
+ s || j(r);
217
217
  }
218
218
  },
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;
224
- if (!l.current || e.isDefaultPrevented() && ((Y = w.current) == null ? void 0 : Y.element) === e.target)
222
+ var Y, we;
223
+ const { keyCode: r, altKey: i } = e, b = E.current && E.current.element;
224
+ if (!l.current || e.isDefaultPrevented() && ((Y = S.current) == null ? void 0 : Y.element) === e.target)
225
225
  return;
226
226
  const T = {
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 && (r === o.left || r === o.right || r === o.home || r === o.end || r === o.delete)) {
232
232
  const c = H.current;
233
233
  let p = N ? c.findIndex((nt) => De(nt, N, x)) : -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
+ r === o.left ? (ue ? p = Math.max(0, p - 1) : p = c.length - 1, f = c[p]) : r === o.right ? p === c.length - 1 ? f = void 0 : ue && (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 && ue && k(T, c[p].data, "delete"), f !== N && Ve(f);
236
236
  }
237
237
  if (s)
238
- if (i === r.esc || o && i === r.up)
238
+ if (r === o.esc || i && r === o.up)
239
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)) {
240
+ 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)) {
241
+ if (r === o.up && ((we = S.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(() => {
245
245
  var f;
246
- u((f = w.current) == null ? void 0 : f.element);
246
+ u((f = S.current) == null ? void 0 : f.element);
247
247
  });
248
248
  }
249
249
  h(Z);
250
250
  } else
251
- i === r.down && h(() => {
251
+ r === o.down && h(() => {
252
252
  var c;
253
- u(((c = w.current) == null ? void 0 : c.element) || b);
253
+ u(((c = S.current) == null ? void 0 : c.element) || b);
254
254
  });
255
255
  else
256
- o && i === r.down && (e.preventDefault(), j(T));
256
+ i && r === o.down && (e.preventDefault(), j(T));
257
257
  },
258
258
  [s, g, u, h, j, N, x, 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: r, altKey: i } = e;
262
+ i || r !== o.up && r !== o.down || (e.preventDefault(), h(
263
+ r === o.up ? () => {
264
264
  u(y.current);
265
265
  } : () => {
266
266
  u(E.current && E.current.element);
@@ -272,20 +272,20 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
272
272
  (e) => {
273
273
  if (!l.current)
274
274
  return;
275
- const i = {
275
+ const r = {
276
276
  syntheticEvent: e,
277
277
  nativeEvent: e.nativeEvent,
278
278
  target: l.current
279
279
  };
280
- k(i, [], "clear"), g(i), e.preventDefault();
280
+ k(r, [], "clear"), g(r), e.preventDefault();
281
281
  },
282
282
  [k, g]
283
283
  ), Ze = t.useCallback(
284
- (e, i) => {
285
- var o;
286
- g({ target: l.current }), d || u((o = w.current) == null ? void 0 : o.element), k({
287
- syntheticEvent: i,
288
- nativeEvent: i.nativeEvent,
284
+ (e, r) => {
285
+ var i;
286
+ g({ target: l.current }), d || u((i = S.current) == null ? void 0 : i.element), k({
287
+ syntheticEvent: r,
288
+ nativeEvent: r.nativeEvent,
289
289
  target: l.current
290
290
  }, e, "delete");
291
291
  },
@@ -293,9 +293,9 @@ 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),
298
- item: i,
296
+ const { item: r, itemHierarchicalIndex: i, nativeEvent: b, syntheticEvent: T } = e, Y = {
297
+ level: wt(i),
298
+ item: r,
299
299
  nativeEvent: b,
300
300
  syntheticEvent: T,
301
301
  target: l.current
@@ -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 i = {
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, i), n.filter === void 0 && ze(e.target.value);
317
317
  }
318
318
  },
319
319
  [n.onFilterChange, n.filter, n.textField]
@@ -321,12 +321,12 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
321
321
  (e) => {
322
322
  if (!l.current)
323
323
  return;
324
- const i = {
324
+ const r = {
325
325
  syntheticEvent: e,
326
326
  nativeEvent: e.nativeEvent,
327
327
  target: l.current
328
328
  };
329
- n.onCancel && n.onCancel.call(void 0, i), g(i), e.preventDefault();
329
+ n.onCancel && n.onCancel.call(void 0, r), g(r), e.preventDefault();
330
330
  },
331
331
  [n.onCancel, g]
332
332
  ), et = () => {
@@ -334,27 +334,27 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
334
334
  Ne,
335
335
  {
336
336
  value: n.filter === void 0 ? ye : n.filter,
337
- ref: ie,
337
+ ref: re,
338
338
  onChange: ke,
339
339
  onKeyDown: Ce,
340
340
  size: v,
341
341
  rounded: V,
342
342
  fillMode: Q
343
343
  }
344
- ) : null, i = {
344
+ ) : null, r = {
345
345
  adaptiveTitle: n.adaptiveTitle,
346
346
  expand: s,
347
- onClose: (o) => n.onCancel ? Fe(o) : ce(o),
348
- windowWidth: re,
347
+ onClose: (i) => n.onCancel ? Fe(i) : ce(i),
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: (i) => n.onCancel ? Fe(i) : ce(i),
353
353
  applyText: J.toLanguageString(Me, ne[Me]),
354
- onApply: (o) => g(o)
354
+ onApply: (i) => g(i)
355
355
  }
356
356
  };
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(
357
+ return /* @__PURE__ */ t.createElement(kt, { ...r }, /* @__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(
358
358
  Te,
359
359
  {
360
360
  ref: E,
@@ -373,21 +373,21 @@ 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: w
377
377
  }
378
378
  ) : /* @__PURE__ */ t.createElement(xe, null, J.toLanguageString(te, ne[te]))))));
379
379
  }, tt = t.useCallback(
380
380
  (e) => {
381
- for (let i of e)
382
- qe(i.target.clientWidth);
381
+ for (let r of e)
382
+ qe(r.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,
@@ -398,8 +398,8 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
398
398
  tabIndex: z,
399
399
  accessKey: n.accessKey,
400
400
  id: F,
401
- style: L ? { ...B, width: void 0 } : B,
402
- dir: S,
401
+ style: B ? { ...L, width: void 0 } : L,
402
+ dir: w,
403
403
  ref: y,
404
404
  onKeyDown: C ? void 0 : Ye,
405
405
  onMouseDown: Qe,
@@ -409,7 +409,7 @@ 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
414
  "aria-describedby": n.ariaDescribedBy ? n.ariaDescribedBy : "tagslist-" + F,
415
415
  "aria-required": n.required,
@@ -419,7 +419,7 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
419
419
  "div",
420
420
  {
421
421
  id: "tagslist-" + F,
422
- className: ee("k-input-values k-chip-list k-selection-multiple", {
422
+ className: ee("k-input-values k-chip-list", {
423
423
  [`k-chip-list-${Pe[v] || v}`]: v
424
424
  })
425
425
  },
@@ -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": w === "rtl" }),
467
467
  style: _e,
468
468
  anchor: M.anchor || y.current,
469
469
  show: s,
@@ -475,13 +475,15 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: wt
475
475
  Ne,
476
476
  {
477
477
  value: n.filter === void 0 ? ye : n.filter,
478
- ref: w,
478
+ ref: S,
479
479
  onChange: ke,
480
480
  onKeyDown: Ce,
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(
@@ -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: w
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
522
  editorId: F,
521
- style: { width: B ? B.width : void 0 },
522
- children: we,
523
- dir: S
523
+ style: { width: L ? L.width : void 0 },
524
+ children: Se,
525
+ dir: w
524
526
  }
525
- ) : we;
527
+ ) : Se;
526
528
  }), Rt = {
527
529
  opened: a.bool,
528
530
  disabled: a.bool,
@@ -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("./VirtualScroll.js"),S=require("./Navigation.js"),c=require("./utils.js");function b(l){const i=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(i,e,t.get?t:{enumerable:!0,get:()=>l[e]})}}return i.default=l,Object.freeze(i)}const P=b(v),p=class p{constructor(i){this.wrapper=null,this.list=null,this.vs=new y,this.navigation=new S.Navigation,this.handleItemClick=(e,t)=>{const s=this.initState();s.syntheticEvent=t,t.stopPropagation(),this.component.handleItemSelect(e,s),this.togglePopup(s),this.applyState(s)},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:s,filterable:o}=this.component.props;o&&t.events.push({type:"onFilterChange",filter:{field:s,operator:"contains",ignoreCase:!0,value:e}})},this.togglePopup=e=>{const t=this.component.props,s=t.opened!==void 0?t.opened:this.component.state.opened;t.opened===void 0&&(e.data.opened=!s),s?e.events.push({type:"onClose"}):(e.events.push({type:"onOpen"}),this.calculatePopupWidth())},this.pageChange=(e,t)=>{const s=this.initState();s.syntheticEvent=t,this.triggerOnPageChange(s,e.skip,e.take),this.applyState(s)},this.scrollToVirtualItem=(e,t)=>{const s=this.vs;if(s.enabled=!1,e.skip===0)s.reset();else if(e.skip+e.pageSize===e.total)s.scrollToEnd();else{let o=s.translate;o===0&&(s.calcScrollElementHeight(),o=s.itemHeight*e.skip,s.translateTo(o-s.itemHeight)),s.container&&(s.container.scrollTop=o),this.scrollToItem(t,!0)}window.setTimeout(()=>s.enabled=!0,10)},this.scrollPopupByPageSize=e=>{var r,u,d,g,f,m;const t=this.vs,s=(u=(r=this.list)==null?void 0:r.parentElement)==null?void 0:u.scrollTop,o=t.enabled&&t.itemHeight?t.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+e*Math.floor(a/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=i.props.id+"list",this.guid=i.props.id,this.component=i,this.vs.PageChange=this.pageChange}didMount(){const i=this.component.props,e=i.popupSettings||{},t=i.style||{},s=e.width;let o=i.opened===!0;s===void 0&&this.calculatePopupWidth(),i.dir===void 0&&t.direction===void 0&&(this.calculateDir(),o=!0),o&&this.component.forceUpdate()}calculateDir(){const i=this.component.element;i&&i.ownerDocument&&i.ownerDocument.defaultView&&(this.dirCalculated=i.ownerDocument.defaultView.getComputedStyle(i).direction||void 0)}calculatePopupWidth(){this.wrapper&&(this.popupWidth=this.wrapper.offsetWidth+"px")}scrollToItem(i,e,t){const s=this.list||this.vs.list;if(!s&&!t&&setTimeout(()=>{this.scrollToItem(i,e,!0)},10),s&&i>=0){const o=this.vs,a=o.container||s.parentNode,r=e!==void 0?e:o.enabled;c.scrollToItem(a,s,i,o.translate,r)}}initState(){return{data:{},events:[],syntheticEvent:void 0}}applyState(i){Object.keys(i.data).length>0&&this.component.setState(i.data);const e={syntheticEvent:i.syntheticEvent,nativeEvent:i.syntheticEvent?i.syntheticEvent.nativeEvent:void 0,target:this.component,value:this.component.value};i.events.forEach(t=>{const s=t.type;delete t.type;const o=s&&this.component.props[s];o&&o.call(void 0,{...e,...t})})}triggerOnPageChange(i,e,t){const s=this.component.props.virtual;if(s){const o=Math.min(Math.max(0,e),Math.max(0,s.total-t));o!==s.skip&&i.events.push({type:"onPageChange",page:{skip:o,take:t}})}}triggerPageChangeCornerItems(i,e){const t=this.component.props,{data:s=[],dataItemKey:o,virtual:a}=t,r=t.opened!==void 0?t.opened:this.component.state.opened;i&&a&&this.vs.enabled&&(a.skip>0&&c.areSame(i,s[0],o)?this.triggerOnPageChange(e,a.skip-1,a.pageSize):!r&&a.skip+a.pageSize<a.total&&c.areSame(i,s[s.length-1],o)&&this.triggerOnPageChange(e,a.skip+1,a.pageSize))}getPopupSettings(){return Object.assign({},p.defaultProps.popupSettings,this.component.props.popupSettings)}getAdaptiveAnimation(){const i=this.getPopupSettings();return i.animate!==void 0?i.animate:!0}getGroupedDataModernMode(i,e){let t=[];return i.forEach((s,o)=>{i[o-1]&&s[e]!==i[o-1][e]&&t.push({[e]:s[e]}),t.push(i[o])}),t}};p.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},p.propTypes={...p.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},p.defaultProps={popupSettings:{height:"200px"},required:!1,validityStyles:!0};let h=p;module.exports=h;