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