@progress/kendo-react-dropdowns 7.5.0-develop.2 → 7.5.0-develop.20
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.
- package/AutoComplete/AutoComplete.js +1 -1
- package/AutoComplete/AutoComplete.mjs +30 -29
- package/ComboBox/ComboBox.js +1 -1
- package/ComboBox/ComboBox.mjs +62 -60
- package/DropDownList/DropDownList.js +1 -1
- package/DropDownList/DropDownList.mjs +59 -57
- package/DropDownTree/DropDownTree.js +1 -1
- package/DropDownTree/DropDownTree.mjs +188 -184
- package/DropDownTree/useDropdownWidth.js +1 -1
- package/DropDownTree/useDropdownWidth.mjs +12 -9
- package/MultiSelect/MultiSelect.js +1 -1
- package/MultiSelect/MultiSelect.mjs +4 -5
- package/MultiSelectTree/MultiSelectTree.js +1 -1
- package/MultiSelectTree/MultiSelectTree.mjs +92 -90
- package/common/AdaptiveMode.js +1 -1
- package/common/AdaptiveMode.mjs +10 -5
- package/common/DropDownBase.js +1 -1
- package/common/DropDownBase.mjs +63 -55
- package/common/ListFilter.js +1 -1
- package/common/ListFilter.mjs +31 -26
- package/common/VirtualScrollStatic.js +8 -0
- package/common/VirtualScrollStatic.mjs +77 -0
- package/dist/cdn/js/kendo-react-dropdowns.js +1 -1
- package/index.d.mts +27 -18
- package/index.d.ts +27 -18
- package/package-metadata.mjs +1 -1
- package/package.json +10 -10
- package/common/VirtualScroll.js +0 -8
- package/common/VirtualScroll.mjs +0 -75
|
@@ -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
|
|
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:
|
|
28
|
-
const { validationMessage: n, valid: K, required:
|
|
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 : !
|
|
31
|
+
valid: !!(K !== void 0 ? K : !x || R),
|
|
32
32
|
valueMissing: !R
|
|
33
33
|
};
|
|
34
|
-
},
|
|
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
|
-
|
|
51
|
-
const K =
|
|
50
|
+
rt(mt);
|
|
51
|
+
const K = ot(), x = n.id || K, {
|
|
52
52
|
data: q = [],
|
|
53
|
-
dataItemKey:
|
|
53
|
+
dataItemKey: I,
|
|
54
54
|
popupSettings: M = {},
|
|
55
|
-
style:
|
|
56
|
-
opened:
|
|
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:
|
|
61
|
+
label: B,
|
|
62
62
|
name: Oe,
|
|
63
|
-
checkField: fe =
|
|
64
|
-
checkIndeterminateField: me =
|
|
65
|
-
subItemsField: ge =
|
|
63
|
+
checkField: fe = F.checkField,
|
|
64
|
+
checkIndeterminateField: me = F.checkIndeterminateField,
|
|
65
|
+
subItemsField: ge = F.subItemsField,
|
|
66
66
|
validationMessage: W,
|
|
67
|
-
valid:
|
|
67
|
+
valid: Le,
|
|
68
68
|
tags: ve,
|
|
69
69
|
value: m,
|
|
70
|
-
required: he =
|
|
71
|
-
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,
|
|
73
|
-
width: ht(y,
|
|
74
|
-
...
|
|
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,
|
|
104
|
+
(e, i, r) => {
|
|
105
105
|
if (n.onChange) {
|
|
106
106
|
const b = {
|
|
107
107
|
items: i,
|
|
108
|
-
operation:
|
|
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,
|
|
117
|
+
if (vt(e.item, m, I) || !l.current)
|
|
118
118
|
return;
|
|
119
|
-
const { item: i, nativeEvent:
|
|
119
|
+
const { item: i, nativeEvent: r, syntheticEvent: b } = e, D = {
|
|
120
120
|
syntheticEvent: b,
|
|
121
|
-
nativeEvent:
|
|
121
|
+
nativeEvent: r,
|
|
122
122
|
target: l.current
|
|
123
123
|
};
|
|
124
|
-
k(
|
|
124
|
+
k(D, [i], "toggle");
|
|
125
125
|
},
|
|
126
|
-
[m,
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
148
|
+
S === void 0 && be(!1);
|
|
149
149
|
}
|
|
150
150
|
},
|
|
151
|
-
[s,
|
|
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 && (
|
|
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
|
-
|
|
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
|
|
196
|
-
n.onBlur.call(void 0,
|
|
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,
|
|
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
|
-
|
|
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,
|
|
223
|
-
const { keyCode: i, altKey:
|
|
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
|
|
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 ===
|
|
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,
|
|
233
|
+
let p = N ? c.findIndex((nt) => De(nt, N, I)) : -1, f;
|
|
234
234
|
const ue = p !== -1;
|
|
235
|
-
i ===
|
|
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 ===
|
|
239
|
-
e.preventDefault(), g(
|
|
240
|
-
else if (b && b.querySelector(".k-focus") && (i ===
|
|
241
|
-
if (i ===
|
|
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 ===
|
|
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
|
-
|
|
256
|
+
r && i === o.down && (e.preventDefault(), j(D));
|
|
257
257
|
},
|
|
258
|
-
[s, g, u, h, j, N,
|
|
258
|
+
[s, g, u, h, j, N, I, m, k]
|
|
259
259
|
), Ce = t.useCallback(
|
|
260
260
|
(e) => {
|
|
261
|
-
const { keyCode: i, altKey:
|
|
262
|
-
|
|
263
|
-
i ===
|
|
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
|
|
286
|
-
g({ target: l.current }), d || u((
|
|
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:
|
|
297
|
-
level:
|
|
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:
|
|
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
|
|
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,
|
|
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: (
|
|
348
|
-
windowWidth:
|
|
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: (
|
|
352
|
+
onCancel: (r) => n.onCancel ? Fe(r) : ce(r),
|
|
353
353
|
applyText: J.toLanguageString(Me, ne[Me]),
|
|
354
|
-
onApply: (
|
|
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:
|
|
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:
|
|
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 = !
|
|
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-${
|
|
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:
|
|
401
|
-
style:
|
|
402
|
-
dir:
|
|
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":
|
|
412
|
+
"aria-label": B,
|
|
413
413
|
"aria-labelledby": n.ariaLabelledBy,
|
|
414
|
-
"aria-describedby": n.ariaDescribedBy ? n.ariaDescribedBy : "tagslist-" +
|
|
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-" +
|
|
422
|
-
className: ee("k-input-values k-chip-list
|
|
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:
|
|
433
|
-
focused: N ? H.current.find((e) => De(e, N,
|
|
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:
|
|
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":
|
|
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:
|
|
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:
|
|
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
|
|
514
|
+
return B ? /* @__PURE__ */ t.createElement(
|
|
513
515
|
yt,
|
|
514
516
|
{
|
|
515
|
-
label:
|
|
517
|
+
label: B,
|
|
516
518
|
editorValue: le,
|
|
517
519
|
editorPlaceholder: pe,
|
|
518
520
|
editorValid: Ie,
|
|
519
521
|
editorDisabled: C,
|
|
520
|
-
editorId:
|
|
521
|
-
style: { width:
|
|
522
|
-
children:
|
|
523
|
-
dir:
|
|
522
|
+
editorId: x,
|
|
523
|
+
style: { width: L ? L.width : void 0 },
|
|
524
|
+
children: Se,
|
|
525
|
+
dir: T
|
|
524
526
|
}
|
|
525
|
-
) :
|
|
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 =
|
|
587
|
+
de.defaultProps = F;
|
|
586
588
|
de.propTypes = Rt;
|
|
587
589
|
export {
|
|
588
590
|
de as MultiSelectTree,
|
package/common/AdaptiveMode.js
CHANGED
|
@@ -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
|
|
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;
|
package/common/AdaptiveMode.mjs
CHANGED
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as e from "react";
|
|
10
|
-
import { ActionSheet as
|
|
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
|
-
|
|
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:
|
|
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(
|
|
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
|
-
|
|
77
|
+
C as AdaptiveMode
|
|
73
78
|
};
|
package/common/DropDownBase.js
CHANGED
|
@@ -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"),
|
|
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;
|