@progress/kendo-react-dropdowns 8.1.0-develop.22 → 8.1.0-develop.23
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/MultiColumnComboBox/MultiColumnComboBox.js +1 -1
- package/MultiColumnComboBox/MultiColumnComboBox.mjs +82 -81
- package/MultiSelectTree/MultiSelectTree.js +1 -1
- package/MultiSelectTree/MultiSelectTree.mjs +226 -224
- package/dist/cdn/js/kendo-react-dropdowns.js +1 -1
- package/package-metadata.mjs +1 -1
- package/package.json +9 -9
|
@@ -7,31 +7,31 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as t from "react";
|
|
10
|
-
import
|
|
10
|
+
import n from "prop-types";
|
|
11
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
|
-
import { TreeView as
|
|
14
|
+
import { TreeView as we } from "@progress/kendo-react-treeview";
|
|
15
15
|
import { packageMetadata as mt } from "../package-metadata.mjs";
|
|
16
|
-
import { getItemValue as gt, areSame as vt, matchTags as
|
|
16
|
+
import { getItemValue as gt, areSame as vt, matchTags as Te } from "../common/utils.mjs";
|
|
17
17
|
import { useDropdownWidth as ht } from "../DropDownTree/useDropdownWidth.mjs";
|
|
18
18
|
import { ListNoData as bt } from "../DropDownTree/ListNoData.mjs";
|
|
19
|
-
import { nodata as te, messages as ne, adaptiveModeFooterCancel as
|
|
19
|
+
import { nodata as te, messages as ne, adaptiveModeFooterCancel as De, adaptiveModeFooterApply as Me } from "../messages/index.mjs";
|
|
20
20
|
import { FloatingLabel as yt } from "@progress/kendo-react-labels";
|
|
21
21
|
import Ct from "../MultiSelect/TagList.mjs";
|
|
22
22
|
import Et from "../common/ClearButton.mjs";
|
|
23
|
-
import
|
|
23
|
+
import Re 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:
|
|
28
|
-
const { validationMessage:
|
|
27
|
+
const It = "Please select a value from the list!", { sizeMap: Ne, roundedMap: St } = dt, wt = (O) => O.split("_").map((M) => parseInt(M, 10)), Tt = (O, M) => {
|
|
28
|
+
const { validationMessage: a, valid: K, required: x } = O;
|
|
29
29
|
return {
|
|
30
|
-
customError:
|
|
31
|
-
valid: !!(K !== void 0 ? K : !x ||
|
|
32
|
-
valueMissing: !
|
|
30
|
+
customError: a !== void 0,
|
|
31
|
+
valid: !!(K !== void 0 ? K : !x || M),
|
|
32
|
+
valueMissing: !M
|
|
33
33
|
};
|
|
34
|
-
},
|
|
34
|
+
}, y = {
|
|
35
35
|
checkField: "checkField",
|
|
36
36
|
checkIndeterminateField: "checkIndeterminateField",
|
|
37
37
|
subItemsField: "items",
|
|
@@ -45,49 +45,52 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: St
|
|
|
45
45
|
fillMode: "solid",
|
|
46
46
|
required: !1,
|
|
47
47
|
validityStyles: !0
|
|
48
|
-
}, Dt = at(),
|
|
49
|
-
const
|
|
48
|
+
}, Dt = at(), Pe = t.forwardRef((O, M) => {
|
|
49
|
+
const a = it(Dt, O);
|
|
50
50
|
rt(mt);
|
|
51
|
-
const K = ot(), x =
|
|
51
|
+
const K = ot(), x = a.id || K, {
|
|
52
52
|
data: q = [],
|
|
53
53
|
dataItemKey: I,
|
|
54
|
-
popupSettings: M = {},
|
|
55
54
|
style: L = {},
|
|
56
|
-
|
|
57
|
-
disabled: C,
|
|
58
|
-
onOpen: ae = Z,
|
|
59
|
-
onClose: A = Z,
|
|
60
|
-
placeholder: pe,
|
|
55
|
+
placeholder: de,
|
|
61
56
|
label: B,
|
|
62
57
|
name: Oe,
|
|
63
|
-
|
|
64
|
-
checkIndeterminateField: me = F.checkIndeterminateField,
|
|
65
|
-
subItemsField: ge = F.subItemsField,
|
|
66
|
-
validationMessage: W,
|
|
58
|
+
validationMessage: A,
|
|
67
59
|
valid: Le,
|
|
68
|
-
tags:
|
|
60
|
+
tags: pe,
|
|
69
61
|
value: m,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
62
|
+
opened: S,
|
|
63
|
+
disabled: E,
|
|
64
|
+
popupSettings: R = y.popupSettings,
|
|
65
|
+
checkField: fe = y.checkField,
|
|
66
|
+
checkIndeterminateField: me = y.checkIndeterminateField,
|
|
67
|
+
subItemsField: ge = y.subItemsField,
|
|
68
|
+
size: v = y.size,
|
|
69
|
+
rounded: V = y.rounded,
|
|
70
|
+
fillMode: W = y.fillMode,
|
|
71
|
+
required: ve = y.required,
|
|
72
|
+
validityStyles: Be = y.validityStyles,
|
|
73
|
+
onOpen: ae = Z,
|
|
74
|
+
onClose: z = Z
|
|
75
|
+
} = a, _ = lt(a.tabIndex, E), l = t.useRef(null), C = t.useRef(null), w = t.useRef(null), ie = t.useRef(null), $ = t.useRef(null), k = t.useRef(null), H = t.useRef(!1), G = t.useRef([]), U = t.useRef(null), [N, Ve] = t.useState(), [Ke, he] = t.useState(!1), [d, re] = t.useState(!1), [oe, qe] = t.useState(), [Ae, We] = t.useState([]), [be, ze] = t.useState(""), P = !!(oe && oe <= xt && a.adaptive), s = S !== void 0 ? S : Ke, le = !!(Array.isArray(m) && m.length), se = Tt({ validationMessage: A, valid: Le, required: ve }, le), T = st(C, a.dir), _e = {
|
|
76
|
+
width: ht(C, y, R, L),
|
|
74
77
|
...T !== void 0 ? { direction: T } : {}
|
|
75
|
-
}, $e = t.useCallback(() =>
|
|
76
|
-
|
|
78
|
+
}, $e = t.useCallback(() => C.current && C.current.focus(), []);
|
|
79
|
+
G.current = pe === void 0 ? (m || []).map((e) => ({ text: gt(e, a.textField), data: [e] })) : [...pe], t.useImperativeHandle(
|
|
77
80
|
l,
|
|
78
81
|
() => ({
|
|
79
|
-
props:
|
|
80
|
-
element:
|
|
82
|
+
props: a,
|
|
83
|
+
element: C.current,
|
|
81
84
|
focus: $e
|
|
82
85
|
})
|
|
83
|
-
), t.useImperativeHandle(
|
|
86
|
+
), t.useImperativeHandle(M, () => l.current);
|
|
84
87
|
const He = t.useCallback(
|
|
85
88
|
() => {
|
|
86
|
-
|
|
87
|
-
se.valid ? "" :
|
|
89
|
+
$.current && $.current.setCustomValidity && $.current.setCustomValidity(
|
|
90
|
+
se.valid ? "" : A === void 0 ? It : A
|
|
88
91
|
);
|
|
89
92
|
},
|
|
90
|
-
[
|
|
93
|
+
[A, se]
|
|
91
94
|
);
|
|
92
95
|
t.useEffect(He), t.useEffect(() => {
|
|
93
96
|
const e = ct && window.ResizeObserver && new window.ResizeObserver(tt.bind(void 0));
|
|
@@ -96,23 +99,23 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: St
|
|
|
96
99
|
};
|
|
97
100
|
}, []), t.useEffect(
|
|
98
101
|
() => {
|
|
99
|
-
|
|
102
|
+
U.current && s && U.current.setPosition(U.current._popup);
|
|
100
103
|
},
|
|
101
104
|
[m, s]
|
|
102
105
|
);
|
|
103
|
-
const
|
|
106
|
+
const F = t.useCallback(
|
|
104
107
|
(e, i, r) => {
|
|
105
|
-
if (
|
|
108
|
+
if (a.onChange) {
|
|
106
109
|
const b = {
|
|
107
110
|
items: i,
|
|
108
111
|
operation: r,
|
|
109
112
|
...e
|
|
110
113
|
};
|
|
111
|
-
|
|
114
|
+
a.onChange.call(void 0, b);
|
|
112
115
|
}
|
|
113
116
|
},
|
|
114
|
-
[
|
|
115
|
-
),
|
|
117
|
+
[a.onChange]
|
|
118
|
+
), j = t.useCallback(
|
|
116
119
|
(e) => {
|
|
117
120
|
if (vt(e.item, m, I) || !l.current)
|
|
118
121
|
return;
|
|
@@ -121,17 +124,17 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: St
|
|
|
121
124
|
nativeEvent: r,
|
|
122
125
|
target: l.current
|
|
123
126
|
};
|
|
124
|
-
|
|
127
|
+
F(D, [i], "toggle");
|
|
125
128
|
},
|
|
126
|
-
[m, I,
|
|
127
|
-
),
|
|
129
|
+
[m, I, F]
|
|
130
|
+
), J = t.useCallback(
|
|
128
131
|
(e) => {
|
|
129
132
|
if (!s) {
|
|
130
133
|
if (ae) {
|
|
131
134
|
const i = { ...e };
|
|
132
135
|
ae.call(void 0, i);
|
|
133
136
|
}
|
|
134
|
-
S === void 0 && (
|
|
137
|
+
S === void 0 && (he(!0), We(m || []), P && setTimeout(() => {
|
|
135
138
|
var i;
|
|
136
139
|
u((i = ie.current) == null ? void 0 : i.element);
|
|
137
140
|
}, 300));
|
|
@@ -141,17 +144,17 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: St
|
|
|
141
144
|
), g = t.useCallback(
|
|
142
145
|
(e) => {
|
|
143
146
|
if (s) {
|
|
144
|
-
if (
|
|
147
|
+
if (z) {
|
|
145
148
|
const i = { ...e };
|
|
146
|
-
|
|
149
|
+
z.call(void 0, i);
|
|
147
150
|
}
|
|
148
|
-
S === void 0 &&
|
|
151
|
+
S === void 0 && he(!1);
|
|
149
152
|
}
|
|
150
153
|
},
|
|
151
|
-
[s, S,
|
|
154
|
+
[s, S, z]
|
|
152
155
|
), h = t.useCallback(
|
|
153
156
|
(e) => {
|
|
154
|
-
|
|
157
|
+
H.current = !0, e(), window.setTimeout(() => H.current = !1, 0);
|
|
155
158
|
},
|
|
156
159
|
[]
|
|
157
160
|
), u = t.useCallback(
|
|
@@ -162,43 +165,43 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: St
|
|
|
162
165
|
), Ge = t.useCallback(
|
|
163
166
|
() => {
|
|
164
167
|
var e;
|
|
165
|
-
!d && s ? g({ target: l.current }) :
|
|
168
|
+
!d && s ? g({ target: l.current }) : a.filterable ? u((e = w.current) == null ? void 0 : e.element) : u(k.current && k.current.element);
|
|
166
169
|
},
|
|
167
|
-
[d, s, u, g,
|
|
170
|
+
[d, s, u, g, a.filterable]
|
|
168
171
|
), Ue = t.useCallback(
|
|
169
172
|
() => {
|
|
170
|
-
d && u(
|
|
173
|
+
d && u(C.current);
|
|
171
174
|
},
|
|
172
175
|
[d, u]
|
|
173
176
|
), je = t.useCallback(
|
|
174
177
|
(e) => {
|
|
175
|
-
if (!d &&
|
|
178
|
+
if (!d && !H.current && (re(!0), a.onFocus && l.current)) {
|
|
176
179
|
const i = {
|
|
177
180
|
syntheticEvent: e,
|
|
178
181
|
nativeEvent: e.nativeEvent,
|
|
179
182
|
target: l.current
|
|
180
183
|
};
|
|
181
|
-
|
|
184
|
+
a.onFocus.call(void 0, i);
|
|
182
185
|
}
|
|
183
186
|
},
|
|
184
|
-
[d,
|
|
187
|
+
[d, a.onFocus]
|
|
185
188
|
), Je = t.useCallback(
|
|
186
189
|
(e) => {
|
|
187
|
-
if (d &&
|
|
190
|
+
if (d && !H.current && l.current) {
|
|
188
191
|
re(!1);
|
|
189
192
|
const i = {
|
|
190
193
|
syntheticEvent: e,
|
|
191
194
|
nativeEvent: e.nativeEvent,
|
|
192
195
|
target: l.current
|
|
193
196
|
};
|
|
194
|
-
if (
|
|
197
|
+
if (a.onBlur) {
|
|
195
198
|
const r = { ...i };
|
|
196
|
-
|
|
199
|
+
a.onBlur.call(void 0, r);
|
|
197
200
|
}
|
|
198
201
|
P || g(i);
|
|
199
202
|
}
|
|
200
203
|
},
|
|
201
|
-
[d,
|
|
204
|
+
[d, a.onBlur, s, S, z]
|
|
202
205
|
), Qe = t.useCallback(
|
|
203
206
|
() => {
|
|
204
207
|
d && h(Z);
|
|
@@ -213,14 +216,14 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: St
|
|
|
213
216
|
nativeEvent: e.nativeEvent,
|
|
214
217
|
target: l.current
|
|
215
218
|
};
|
|
216
|
-
s ||
|
|
219
|
+
s || J(i);
|
|
217
220
|
}
|
|
218
221
|
},
|
|
219
|
-
[s,
|
|
222
|
+
[s, J]
|
|
220
223
|
), Ye = t.useCallback(
|
|
221
224
|
(e) => {
|
|
222
|
-
var Y,
|
|
223
|
-
const { keyCode: i, altKey: r } = e, b =
|
|
225
|
+
var Y, Se;
|
|
226
|
+
const { keyCode: i, altKey: r } = e, b = k.current && k.current.element;
|
|
224
227
|
if (!l.current || e.isDefaultPrevented() && ((Y = w.current) == null ? void 0 : Y.element) === e.target)
|
|
225
228
|
return;
|
|
226
229
|
const D = {
|
|
@@ -229,16 +232,16 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: St
|
|
|
229
232
|
target: l.current
|
|
230
233
|
};
|
|
231
234
|
if (m && m.length > 0 && (i === o.left || i === o.right || i === o.home || i === o.end || i === o.delete)) {
|
|
232
|
-
const c =
|
|
233
|
-
let p = N ? c.findIndex((nt) =>
|
|
235
|
+
const c = G.current;
|
|
236
|
+
let p = N ? c.findIndex((nt) => Te(nt, N, I)) : -1, f;
|
|
234
237
|
const ue = p !== -1;
|
|
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 &&
|
|
238
|
+
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);
|
|
236
239
|
}
|
|
237
240
|
if (s)
|
|
238
241
|
if (i === o.esc || r && i === o.up)
|
|
239
242
|
e.preventDefault(), g(D);
|
|
240
243
|
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 && ((
|
|
244
|
+
if (i === o.up && ((Se = w.current) != null && Se.element)) {
|
|
242
245
|
const c = Array.from(b.querySelectorAll(".k-treeview-item")), p = [...c].reverse().find((f) => !!(f && f.querySelector(".k-focus")));
|
|
243
246
|
if (p && c.indexOf(p) === 0)
|
|
244
247
|
return h(() => {
|
|
@@ -253,17 +256,17 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: St
|
|
|
253
256
|
u(((c = w.current) == null ? void 0 : c.element) || b);
|
|
254
257
|
});
|
|
255
258
|
else
|
|
256
|
-
r && i === o.down && (e.preventDefault(),
|
|
259
|
+
r && i === o.down && (e.preventDefault(), J(D));
|
|
257
260
|
},
|
|
258
|
-
[s, g, u, h,
|
|
259
|
-
),
|
|
261
|
+
[s, g, u, h, J, N, I, m, F]
|
|
262
|
+
), ye = t.useCallback(
|
|
260
263
|
(e) => {
|
|
261
264
|
const { keyCode: i, altKey: r } = e;
|
|
262
265
|
r || i !== o.up && i !== o.down || (e.preventDefault(), h(
|
|
263
266
|
i === o.up ? () => {
|
|
264
|
-
u(
|
|
267
|
+
u(C.current);
|
|
265
268
|
} : () => {
|
|
266
|
-
u(
|
|
269
|
+
u(k.current && k.current.element);
|
|
267
270
|
}
|
|
268
271
|
));
|
|
269
272
|
},
|
|
@@ -277,22 +280,22 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: St
|
|
|
277
280
|
nativeEvent: e.nativeEvent,
|
|
278
281
|
target: l.current
|
|
279
282
|
};
|
|
280
|
-
|
|
283
|
+
F(i, [], "clear"), g(i), e.preventDefault();
|
|
281
284
|
},
|
|
282
|
-
[
|
|
285
|
+
[F, g]
|
|
283
286
|
), Ze = t.useCallback(
|
|
284
287
|
(e, i) => {
|
|
285
288
|
var r;
|
|
286
|
-
g({ target: l.current }), d || u((r = w.current) == null ? void 0 : r.element),
|
|
289
|
+
g({ target: l.current }), d || u((r = w.current) == null ? void 0 : r.element), F({
|
|
287
290
|
syntheticEvent: i,
|
|
288
291
|
nativeEvent: i.nativeEvent,
|
|
289
292
|
target: l.current
|
|
290
293
|
}, e, "delete");
|
|
291
294
|
},
|
|
292
|
-
[
|
|
293
|
-
),
|
|
295
|
+
[F, g, u, d]
|
|
296
|
+
), Ce = t.useCallback(
|
|
294
297
|
(e) => {
|
|
295
|
-
if (
|
|
298
|
+
if (a.onExpandChange && l.current) {
|
|
296
299
|
const { item: i, itemHierarchicalIndex: r, nativeEvent: b, syntheticEvent: D } = e, Y = {
|
|
297
300
|
level: wt(r),
|
|
298
301
|
item: i,
|
|
@@ -300,24 +303,24 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: St
|
|
|
300
303
|
syntheticEvent: D,
|
|
301
304
|
target: l.current
|
|
302
305
|
};
|
|
303
|
-
|
|
306
|
+
a.onExpandChange.call(void 0, Y);
|
|
304
307
|
}
|
|
305
308
|
},
|
|
306
|
-
[
|
|
307
|
-
),
|
|
309
|
+
[a.onExpandChange]
|
|
310
|
+
), Ee = t.useCallback(
|
|
308
311
|
(e) => {
|
|
309
|
-
if (
|
|
312
|
+
if (a.onFilterChange && l.current) {
|
|
310
313
|
const r = {
|
|
311
|
-
filter: { field:
|
|
314
|
+
filter: { field: a.textField, operator: "contains", value: e.target.value },
|
|
312
315
|
syntheticEvent: e.syntheticEvent,
|
|
313
316
|
nativeEvent: e.nativeEvent,
|
|
314
317
|
target: l.current
|
|
315
318
|
};
|
|
316
|
-
|
|
319
|
+
a.onFilterChange.call(void 0, r), a.filter === void 0 && ze(e.target.value);
|
|
317
320
|
}
|
|
318
321
|
},
|
|
319
|
-
[
|
|
320
|
-
),
|
|
322
|
+
[a.onFilterChange, a.filter, a.textField]
|
|
323
|
+
), ke = t.useCallback(
|
|
321
324
|
(e) => {
|
|
322
325
|
if (!l.current)
|
|
323
326
|
return;
|
|
@@ -326,123 +329,123 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: St
|
|
|
326
329
|
nativeEvent: e.nativeEvent,
|
|
327
330
|
target: l.current
|
|
328
331
|
};
|
|
329
|
-
|
|
332
|
+
a.onCancel && a.onCancel.call(void 0, i), g(i), e.preventDefault();
|
|
330
333
|
},
|
|
331
|
-
[
|
|
334
|
+
[a.onCancel, g]
|
|
332
335
|
), et = () => {
|
|
333
|
-
const e =
|
|
334
|
-
|
|
336
|
+
const e = a.filterable ? /* @__PURE__ */ t.createElement(
|
|
337
|
+
Re,
|
|
335
338
|
{
|
|
336
|
-
value:
|
|
339
|
+
value: a.filter === void 0 ? be : a.filter,
|
|
337
340
|
ref: ie,
|
|
338
|
-
onChange:
|
|
339
|
-
onKeyDown:
|
|
341
|
+
onChange: Ee,
|
|
342
|
+
onKeyDown: ye,
|
|
340
343
|
size: v,
|
|
341
344
|
rounded: V,
|
|
342
|
-
fillMode:
|
|
345
|
+
fillMode: W
|
|
343
346
|
}
|
|
344
347
|
) : null, i = {
|
|
345
|
-
adaptiveTitle:
|
|
348
|
+
adaptiveTitle: a.adaptiveTitle,
|
|
346
349
|
expand: s,
|
|
347
|
-
onClose: (r) =>
|
|
350
|
+
onClose: (r) => a.onCancel ? ke(r) : ce(r),
|
|
348
351
|
windowWidth: oe,
|
|
349
352
|
mobileFilter: e,
|
|
350
353
|
footer: {
|
|
351
|
-
cancelText:
|
|
352
|
-
onCancel: (r) =>
|
|
353
|
-
applyText:
|
|
354
|
+
cancelText: Q.toLanguageString(De, ne[De]),
|
|
355
|
+
onCancel: (r) => a.onCancel ? ke(r) : ce(r),
|
|
356
|
+
applyText: Q.toLanguageString(Me, ne[Me]),
|
|
354
357
|
onApply: (r) => g(r)
|
|
355
358
|
}
|
|
356
359
|
};
|
|
357
360
|
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(
|
|
358
|
-
|
|
361
|
+
we,
|
|
359
362
|
{
|
|
360
|
-
ref:
|
|
361
|
-
tabIndex:
|
|
363
|
+
ref: k,
|
|
364
|
+
tabIndex: _,
|
|
362
365
|
data: q,
|
|
363
366
|
focusIdField: I,
|
|
364
|
-
textField:
|
|
367
|
+
textField: a.textField,
|
|
365
368
|
checkField: fe,
|
|
366
369
|
checkIndeterminateField: me,
|
|
367
|
-
expandField:
|
|
370
|
+
expandField: a.expandField,
|
|
368
371
|
childrenField: ge,
|
|
369
372
|
expandIcons: !0,
|
|
370
|
-
onItemClick:
|
|
371
|
-
onCheckChange:
|
|
372
|
-
onExpandChange:
|
|
373
|
+
onItemClick: j,
|
|
374
|
+
onCheckChange: j,
|
|
375
|
+
onExpandChange: Ce,
|
|
373
376
|
checkboxes: !0,
|
|
374
377
|
size: v,
|
|
375
|
-
item:
|
|
378
|
+
item: a.item,
|
|
376
379
|
dir: T
|
|
377
380
|
}
|
|
378
|
-
) : /* @__PURE__ */ t.createElement(
|
|
381
|
+
) : /* @__PURE__ */ t.createElement(Fe, null, Q.toLanguageString(te, ne[te]))))));
|
|
379
382
|
}, tt = t.useCallback(
|
|
380
383
|
(e) => {
|
|
381
384
|
for (let i of e)
|
|
382
385
|
qe(i.target.clientWidth);
|
|
383
386
|
},
|
|
384
387
|
[]
|
|
385
|
-
),
|
|
388
|
+
), Fe = a.listNoData || bt, Q = ft(), xe = !Be || se.valid, X = P && s ? Ae : G.current, Ie = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
|
|
386
389
|
"span",
|
|
387
390
|
{
|
|
388
|
-
className: ee("k-multiselecttree k-input",
|
|
389
|
-
[`k-input-${
|
|
391
|
+
className: ee("k-multiselecttree k-input", a.className, {
|
|
392
|
+
[`k-input-${Ne[v] || v}`]: v,
|
|
390
393
|
[`k-rounded-${St[V] || V}`]: V,
|
|
391
|
-
[`k-input-${
|
|
392
|
-
"k-focus": d && !
|
|
393
|
-
"k-invalid": !
|
|
394
|
-
"k-disabled":
|
|
395
|
-
"k-loading":
|
|
396
|
-
"k-required":
|
|
394
|
+
[`k-input-${W}`]: W,
|
|
395
|
+
"k-focus": d && !E,
|
|
396
|
+
"k-invalid": !xe,
|
|
397
|
+
"k-disabled": E,
|
|
398
|
+
"k-loading": a.loading,
|
|
399
|
+
"k-required": ve
|
|
397
400
|
}),
|
|
398
|
-
tabIndex:
|
|
399
|
-
accessKey:
|
|
401
|
+
tabIndex: _,
|
|
402
|
+
accessKey: a.accessKey,
|
|
400
403
|
id: x,
|
|
401
404
|
style: B ? { ...L, width: void 0 } : L,
|
|
402
405
|
dir: T,
|
|
403
|
-
ref:
|
|
404
|
-
onKeyDown:
|
|
406
|
+
ref: C,
|
|
407
|
+
onKeyDown: E ? void 0 : Ye,
|
|
405
408
|
onMouseDown: Qe,
|
|
406
409
|
onFocus: je,
|
|
407
410
|
onBlur: Je,
|
|
408
411
|
role: "combobox",
|
|
409
412
|
"aria-haspopup": "tree",
|
|
410
413
|
"aria-expanded": s,
|
|
411
|
-
"aria-disabled":
|
|
414
|
+
"aria-disabled": E,
|
|
412
415
|
"aria-label": B,
|
|
413
|
-
"aria-labelledby":
|
|
414
|
-
"aria-describedby":
|
|
415
|
-
"aria-required":
|
|
416
|
-
onClick:
|
|
416
|
+
"aria-labelledby": a.ariaLabelledBy,
|
|
417
|
+
"aria-describedby": a.ariaDescribedBy ? a.ariaDescribedBy : "tagslist-" + x,
|
|
418
|
+
"aria-required": a.required,
|
|
419
|
+
onClick: E ? void 0 : Xe
|
|
417
420
|
},
|
|
418
421
|
/* @__PURE__ */ t.createElement(
|
|
419
422
|
"div",
|
|
420
423
|
{
|
|
421
424
|
id: "tagslist-" + x,
|
|
422
425
|
className: ee("k-input-values k-chip-list", {
|
|
423
|
-
[`k-chip-list-${
|
|
426
|
+
[`k-chip-list-${Ne[v] || v}`]: v
|
|
424
427
|
})
|
|
425
428
|
},
|
|
426
429
|
X.length > 0 && /* @__PURE__ */ t.createElement(
|
|
427
430
|
Ct,
|
|
428
431
|
{
|
|
429
|
-
tag:
|
|
432
|
+
tag: a.tag,
|
|
430
433
|
onTagDelete: Ze,
|
|
431
434
|
data: X,
|
|
432
435
|
guid: x,
|
|
433
|
-
focused: N ?
|
|
436
|
+
focused: N ? G.current.find((e) => Te(e, N, I)) : void 0,
|
|
434
437
|
size: v
|
|
435
438
|
}
|
|
436
439
|
)
|
|
437
440
|
),
|
|
438
|
-
/* @__PURE__ */ t.createElement("span", { className: "k-input-inner" }, X.length === 0 && /* @__PURE__ */ t.createElement("span", { className: "k-input-value-text" },
|
|
439
|
-
|
|
440
|
-
le && !
|
|
441
|
+
/* @__PURE__ */ t.createElement("span", { className: "k-input-inner" }, X.length === 0 && /* @__PURE__ */ t.createElement("span", { className: "k-input-value-text" }, de)),
|
|
442
|
+
a.loading && /* @__PURE__ */ t.createElement(ut, { className: "k-input-loading-icon", name: "loading" }),
|
|
443
|
+
le && !E && X.length > 0 && /* @__PURE__ */ t.createElement(Et, { onClick: ce }),
|
|
441
444
|
/* @__PURE__ */ t.createElement(
|
|
442
445
|
"select",
|
|
443
446
|
{
|
|
444
447
|
name: Oe,
|
|
445
|
-
ref:
|
|
448
|
+
ref: $,
|
|
446
449
|
tabIndex: -1,
|
|
447
450
|
"aria-hidden": !0,
|
|
448
451
|
title: B,
|
|
@@ -451,64 +454,64 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: St
|
|
|
451
454
|
/* @__PURE__ */ t.createElement(
|
|
452
455
|
"option",
|
|
453
456
|
{
|
|
454
|
-
value:
|
|
457
|
+
value: a.valueMap ? a.valueMap.call(void 0, m) : m
|
|
455
458
|
}
|
|
456
459
|
)
|
|
457
460
|
),
|
|
458
461
|
!P && /* @__PURE__ */ t.createElement(
|
|
459
462
|
pt,
|
|
460
463
|
{
|
|
461
|
-
...
|
|
464
|
+
...R,
|
|
462
465
|
popupClass: ee(
|
|
463
|
-
|
|
466
|
+
R.popupClass,
|
|
464
467
|
"k-multiselecttree-popup"
|
|
465
468
|
),
|
|
466
|
-
className: ee(
|
|
469
|
+
className: ee(R.className, { "k-rtl": T === "rtl" }),
|
|
467
470
|
style: _e,
|
|
468
|
-
anchor:
|
|
471
|
+
anchor: R.anchor || C.current,
|
|
469
472
|
show: s,
|
|
470
473
|
onOpen: Ge,
|
|
471
474
|
onClose: Ue,
|
|
472
|
-
ref:
|
|
475
|
+
ref: U
|
|
473
476
|
},
|
|
474
|
-
|
|
475
|
-
|
|
477
|
+
a.filterable && /* @__PURE__ */ t.createElement(
|
|
478
|
+
Re,
|
|
476
479
|
{
|
|
477
|
-
value:
|
|
480
|
+
value: a.filter === void 0 ? be : a.filter,
|
|
478
481
|
ref: w,
|
|
479
|
-
onChange:
|
|
480
|
-
onKeyDown:
|
|
481
|
-
tabIndex:
|
|
482
|
+
onChange: Ee,
|
|
483
|
+
onKeyDown: ye,
|
|
484
|
+
tabIndex: _,
|
|
482
485
|
size: v,
|
|
483
486
|
rounded: V,
|
|
484
|
-
fillMode:
|
|
487
|
+
fillMode: W,
|
|
485
488
|
renderListFilterWrapper: !0,
|
|
486
489
|
renderPrefixSeparator: !0
|
|
487
490
|
}
|
|
488
491
|
),
|
|
489
492
|
q.length > 0 ? /* @__PURE__ */ t.createElement(
|
|
490
|
-
|
|
493
|
+
we,
|
|
491
494
|
{
|
|
492
|
-
style: { height:
|
|
493
|
-
ref:
|
|
494
|
-
tabIndex:
|
|
495
|
+
style: { height: R.height },
|
|
496
|
+
ref: k,
|
|
497
|
+
tabIndex: _,
|
|
495
498
|
data: q,
|
|
496
499
|
focusIdField: I,
|
|
497
|
-
textField:
|
|
500
|
+
textField: a.textField,
|
|
498
501
|
checkField: fe,
|
|
499
502
|
checkIndeterminateField: me,
|
|
500
|
-
expandField:
|
|
503
|
+
expandField: a.expandField,
|
|
501
504
|
childrenField: ge,
|
|
502
505
|
expandIcons: !0,
|
|
503
|
-
onItemClick:
|
|
504
|
-
onCheckChange:
|
|
505
|
-
onExpandChange:
|
|
506
|
+
onItemClick: j,
|
|
507
|
+
onCheckChange: j,
|
|
508
|
+
onExpandChange: Ce,
|
|
506
509
|
checkboxes: !0,
|
|
507
510
|
size: v,
|
|
508
|
-
item:
|
|
511
|
+
item: a.item,
|
|
509
512
|
dir: T
|
|
510
513
|
}
|
|
511
|
-
) : /* @__PURE__ */ t.createElement(
|
|
514
|
+
) : /* @__PURE__ */ t.createElement(Fe, null, Q.toLanguageString(te, ne[te]))
|
|
512
515
|
)
|
|
513
516
|
), P && et());
|
|
514
517
|
return B ? /* @__PURE__ */ t.createElement(
|
|
@@ -516,77 +519,76 @@ const It = "Please select a value from the list!", { sizeMap: Pe, roundedMap: St
|
|
|
516
519
|
{
|
|
517
520
|
label: B,
|
|
518
521
|
editorValue: le,
|
|
519
|
-
editorPlaceholder:
|
|
520
|
-
editorValid:
|
|
521
|
-
editorDisabled:
|
|
522
|
+
editorPlaceholder: de,
|
|
523
|
+
editorValid: xe,
|
|
524
|
+
editorDisabled: E,
|
|
522
525
|
editorId: x,
|
|
523
526
|
style: { width: L ? L.width : void 0 },
|
|
524
|
-
children:
|
|
527
|
+
children: Ie,
|
|
525
528
|
dir: T
|
|
526
529
|
}
|
|
527
|
-
) :
|
|
528
|
-
}),
|
|
529
|
-
opened:
|
|
530
|
-
disabled:
|
|
531
|
-
dir:
|
|
532
|
-
tabIndex:
|
|
533
|
-
accessKey:
|
|
534
|
-
data:
|
|
535
|
-
value:
|
|
536
|
-
valueMap:
|
|
537
|
-
placeholder:
|
|
538
|
-
dataItemKey:
|
|
539
|
-
textField:
|
|
540
|
-
checkField:
|
|
541
|
-
checkIndeterminateField:
|
|
542
|
-
expandField:
|
|
543
|
-
subItemsField:
|
|
544
|
-
className:
|
|
545
|
-
style:
|
|
546
|
-
label:
|
|
547
|
-
validationMessage:
|
|
548
|
-
validityStyles:
|
|
549
|
-
valid:
|
|
550
|
-
required:
|
|
551
|
-
name:
|
|
552
|
-
id:
|
|
553
|
-
ariaLabelledBy:
|
|
554
|
-
ariaDescribedBy:
|
|
555
|
-
filterable:
|
|
556
|
-
filter:
|
|
557
|
-
loading:
|
|
558
|
-
tags:
|
|
559
|
-
text:
|
|
560
|
-
data:
|
|
530
|
+
) : Ie;
|
|
531
|
+
}), Mt = {
|
|
532
|
+
opened: n.bool,
|
|
533
|
+
disabled: n.bool,
|
|
534
|
+
dir: n.string,
|
|
535
|
+
tabIndex: n.number,
|
|
536
|
+
accessKey: n.string,
|
|
537
|
+
data: n.array,
|
|
538
|
+
value: n.any,
|
|
539
|
+
valueMap: n.func,
|
|
540
|
+
placeholder: n.string,
|
|
541
|
+
dataItemKey: n.string.isRequired,
|
|
542
|
+
textField: n.string.isRequired,
|
|
543
|
+
checkField: n.string,
|
|
544
|
+
checkIndeterminateField: n.string,
|
|
545
|
+
expandField: n.string,
|
|
546
|
+
subItemsField: n.string,
|
|
547
|
+
className: n.string,
|
|
548
|
+
style: n.object,
|
|
549
|
+
label: n.string,
|
|
550
|
+
validationMessage: n.string,
|
|
551
|
+
validityStyles: n.bool,
|
|
552
|
+
valid: n.bool,
|
|
553
|
+
required: n.bool,
|
|
554
|
+
name: n.string,
|
|
555
|
+
id: n.string,
|
|
556
|
+
ariaLabelledBy: n.string,
|
|
557
|
+
ariaDescribedBy: n.string,
|
|
558
|
+
filterable: n.bool,
|
|
559
|
+
filter: n.string,
|
|
560
|
+
loading: n.bool,
|
|
561
|
+
tags: n.arrayOf(n.shape({
|
|
562
|
+
text: n.string,
|
|
563
|
+
data: n.arrayOf(n.any)
|
|
561
564
|
})),
|
|
562
|
-
popupSettings:
|
|
563
|
-
animate:
|
|
564
|
-
openDuration:
|
|
565
|
-
closeDuration:
|
|
565
|
+
popupSettings: n.shape({
|
|
566
|
+
animate: n.oneOfType([n.bool, n.shape({
|
|
567
|
+
openDuration: n.number,
|
|
568
|
+
closeDuration: n.number
|
|
566
569
|
})]),
|
|
567
|
-
popupClass:
|
|
568
|
-
className:
|
|
569
|
-
appendTo:
|
|
570
|
-
width:
|
|
571
|
-
height:
|
|
570
|
+
popupClass: n.string,
|
|
571
|
+
className: n.string,
|
|
572
|
+
appendTo: n.any,
|
|
573
|
+
width: n.oneOfType([n.string, n.number]),
|
|
574
|
+
height: n.oneOfType([n.string, n.number])
|
|
572
575
|
}),
|
|
573
|
-
onOpen:
|
|
574
|
-
onClose:
|
|
575
|
-
onFocus:
|
|
576
|
-
onBlur:
|
|
577
|
-
onChange:
|
|
578
|
-
onFilterChange:
|
|
579
|
-
onExpandChange:
|
|
580
|
-
onCancel:
|
|
581
|
-
item:
|
|
582
|
-
listNoData:
|
|
583
|
-
adaptiveTitle:
|
|
584
|
-
adaptive:
|
|
576
|
+
onOpen: n.func,
|
|
577
|
+
onClose: n.func,
|
|
578
|
+
onFocus: n.func,
|
|
579
|
+
onBlur: n.func,
|
|
580
|
+
onChange: n.func,
|
|
581
|
+
onFilterChange: n.func,
|
|
582
|
+
onExpandChange: n.func,
|
|
583
|
+
onCancel: n.func,
|
|
584
|
+
item: n.func,
|
|
585
|
+
listNoData: n.func,
|
|
586
|
+
adaptiveTitle: n.string,
|
|
587
|
+
adaptive: n.bool
|
|
585
588
|
};
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
de.propTypes = Rt;
|
|
589
|
+
Pe.displayName = "KendoReactMultiSelectTree";
|
|
590
|
+
Pe.propTypes = Mt;
|
|
589
591
|
export {
|
|
590
|
-
|
|
592
|
+
Pe as MultiSelectTree,
|
|
591
593
|
Dt as MultiSelectTreePropsContext
|
|
592
594
|
};
|